Skip to content

Commit d8ddab6

Browse files
committed
Merge branch 'remotes/lorenzo/pci/vmd'
- Add VMD bus 224-255 restriction decode (Jon Derrick) - Add VMD 8086:9A0B device ID (Jon Derrick) - Remove Keith from VMD maintainer list (Keith Busch) * remotes/lorenzo/pci/vmd: MAINTAINERS: Remove Keith from VMD maintainer PCI: vmd: Add device id for VMD device 8086:9A0B PCI: vmd: Add bus 224-255 restriction decode
2 parents 7747151 + e3d023b commit d8ddab6

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12447,7 +12447,6 @@ F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
1244712447
F: drivers/pci/controller/dwc/*imx6*
1244812448

1244912449
PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD)
12450-
M: Keith Busch <[email protected]>
1245112450
M: Jonathan Derrick <[email protected]>
1245212451
1245312452
S: Supported

drivers/pci/controller/vmd.c

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -602,16 +602,30 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
602602

603603
/*
604604
* Certain VMD devices may have a root port configuration option which
605-
* limits the bus range to between 0-127 or 128-255
605+
* limits the bus range to between 0-127, 128-255, or 224-255
606606
*/
607607
if (features & VMD_FEAT_HAS_BUS_RESTRICTIONS) {
608-
u32 vmcap, vmconfig;
609-
610-
pci_read_config_dword(vmd->dev, PCI_REG_VMCAP, &vmcap);
611-
pci_read_config_dword(vmd->dev, PCI_REG_VMCONFIG, &vmconfig);
612-
if (BUS_RESTRICT_CAP(vmcap) &&
613-
(BUS_RESTRICT_CFG(vmconfig) == 0x1))
614-
vmd->busn_start = 128;
608+
u16 reg16;
609+
610+
pci_read_config_word(vmd->dev, PCI_REG_VMCAP, &reg16);
611+
if (BUS_RESTRICT_CAP(reg16)) {
612+
pci_read_config_word(vmd->dev, PCI_REG_VMCONFIG,
613+
&reg16);
614+
615+
switch (BUS_RESTRICT_CFG(reg16)) {
616+
case 1:
617+
vmd->busn_start = 128;
618+
break;
619+
case 2:
620+
vmd->busn_start = 224;
621+
break;
622+
case 3:
623+
pci_err(vmd->dev, "Unknown Bus Offset Setting\n");
624+
return -ENODEV;
625+
default:
626+
break;
627+
}
628+
}
615629
}
616630

617631
res = &vmd->dev->resource[VMD_CFGBAR];
@@ -854,6 +868,8 @@ static const struct pci_device_id vmd_ids[] = {
854868
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
855869
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW |
856870
VMD_FEAT_HAS_BUS_RESTRICTIONS,},
871+
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
872+
.driver_data = VMD_FEAT_HAS_BUS_RESTRICTIONS,},
857873
{0,}
858874
};
859875
MODULE_DEVICE_TABLE(pci, vmd_ids);

include/linux/pci_ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3006,6 +3006,7 @@
30063006
#define PCI_DEVICE_ID_INTEL_84460GX 0x84ea
30073007
#define PCI_DEVICE_ID_INTEL_IXP4XX 0x8500
30083008
#define PCI_DEVICE_ID_INTEL_IXP2800 0x9004
3009+
#define PCI_DEVICE_ID_INTEL_VMD_9A0B 0x9a0b
30093010
#define PCI_DEVICE_ID_INTEL_S21152BB 0xb152
30103011

30113012
#define PCI_VENDOR_ID_SCALEMP 0x8686

0 commit comments

Comments
 (0)