Skip to content

Commit 1f08739

Browse files
maciej-w-rozyckibjorn-helgaas
authored andcommitted
PCI: pciehp: Rely on dev->link_active_reporting
Use dev->link_active_reporting to determine whether Data Link Layer Link Active Reporting is available rather than re-retrieving the capability. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Lukas Wunner <[email protected]>
1 parent 42adbdc commit 1f08739

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/pci/hotplug/pciehp_hpc.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ static inline int pcie_hotplug_depth(struct pci_dev *dev)
984984
struct controller *pcie_init(struct pcie_device *dev)
985985
{
986986
struct controller *ctrl;
987-
u32 slot_cap, slot_cap2, link_cap;
987+
u32 slot_cap, slot_cap2;
988988
u8 poweron;
989989
struct pci_dev *pdev = dev->port;
990990
struct pci_bus *subordinate = pdev->subordinate;
@@ -1030,9 +1030,6 @@ struct controller *pcie_init(struct pcie_device *dev)
10301030
if (dmi_first_match(inband_presence_disabled_dmi_table))
10311031
ctrl->inband_presence_disabled = 1;
10321032

1033-
/* Check if Data Link Layer Link Active Reporting is implemented */
1034-
pcie_capability_read_dword(pdev, PCI_EXP_LNKCAP, &link_cap);
1035-
10361033
/* Clear all remaining event bits in Slot Status register. */
10371034
pcie_capability_write_word(pdev, PCI_EXP_SLTSTA,
10381035
PCI_EXP_SLTSTA_ABP | PCI_EXP_SLTSTA_PFD |
@@ -1051,7 +1048,7 @@ struct controller *pcie_init(struct pcie_device *dev)
10511048
FLAG(slot_cap, PCI_EXP_SLTCAP_EIP),
10521049
FLAG(slot_cap, PCI_EXP_SLTCAP_NCCS),
10531050
FLAG(slot_cap2, PCI_EXP_SLTCAP2_IBPD),
1054-
FLAG(link_cap, PCI_EXP_LNKCAP_DLLLARC),
1051+
FLAG(pdev->link_active_reporting, true),
10551052
pdev->broken_cmd_compl ? " (with Cmd Compl erratum)" : "");
10561053

10571054
/*

0 commit comments

Comments
 (0)