Skip to content

Commit 0bbdd00

Browse files
committed
Merge: storage: Add VMD Device ID
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6545 ``` JIRA: https://issues.redhat.com/browse/RHEL-47438 Add new VMD Device ID and while at it, include a VMD related bug fix. Signed-off-by: Myron Stowe <[email protected]> ``` Approved-by: Steve Best <[email protected]> Approved-by: John W. Linville <[email protected]> Approved-by: Tony Camuso <[email protected]> Approved-by: Lenny Szubowicz <[email protected]> Approved-by: CKI KWF Bot <[email protected]> Merged-by: Augusto Caringi <[email protected]>
2 parents 5be648b + aa81822 commit 0bbdd00

File tree

1 file changed

+13
-4
lines changed
  • drivers/pci/controller

1 file changed

+13
-4
lines changed

drivers/pci/controller/vmd.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -740,19 +740,17 @@ static int vmd_pm_enable_quirk(struct pci_dev *pdev, void *userdata)
740740
if (!(features & VMD_FEAT_BIOS_PM_QUIRK))
741741
return 0;
742742

743-
pci_enable_link_state_locked(pdev, PCIE_LINK_STATE_ALL);
744-
745743
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_LTR);
746744
if (!pos)
747-
return 0;
745+
goto out_state_change;
748746

749747
/*
750748
* Skip if the max snoop LTR is non-zero, indicating BIOS has set it
751749
* so the LTR quirk is not needed.
752750
*/
753751
pci_read_config_dword(pdev, pos + PCI_LTR_MAX_SNOOP_LAT, &ltr_reg);
754752
if (!!(ltr_reg & (PCI_LTR_VALUE_MASK | PCI_LTR_SCALE_MASK)))
755-
return 0;
753+
goto out_state_change;
756754

757755
/*
758756
* Set the default values to the maximum required by the platform to
@@ -764,6 +762,13 @@ static int vmd_pm_enable_quirk(struct pci_dev *pdev, void *userdata)
764762
pci_write_config_dword(pdev, pos + PCI_LTR_MAX_SNOOP_LAT, ltr_reg);
765763
pci_info(pdev, "VMD: Default LTR value set by driver\n");
766764

765+
out_state_change:
766+
/*
767+
* Ensure devices are in D0 before enabling PCI-PM L1 PM Substates, per
768+
* PCIe r6.0, sec 5.5.4.
769+
*/
770+
pci_set_power_state_locked(pdev, PCI_D0);
771+
pci_enable_link_state_locked(pdev, PCIE_LINK_STATE_ALL);
767772
return 0;
768773
}
769774

@@ -1100,6 +1105,10 @@ static const struct pci_device_id vmd_ids[] = {
11001105
.driver_data = VMD_FEATS_CLIENT,},
11011106
{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
11021107
.driver_data = VMD_FEATS_CLIENT,},
1108+
{PCI_VDEVICE(INTEL, 0xb60b),
1109+
.driver_data = VMD_FEATS_CLIENT,},
1110+
{PCI_VDEVICE(INTEL, 0xb06f),
1111+
.driver_data = VMD_FEATS_CLIENT,},
11031112
{0,}
11041113
};
11051114
MODULE_DEVICE_TABLE(pci, vmd_ids);

0 commit comments

Comments
 (0)