File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -958,13 +958,15 @@ void pci_save_aspm_l1ss_state(struct pci_dev *dev);
958958void pci_restore_aspm_l1ss_state (struct pci_dev * dev );
959959
960960#ifdef CONFIG_PCIEASPM
961+ void pcie_aspm_remove_cap (struct pci_dev * pdev , u32 lnkcap );
961962void pcie_aspm_init_link_state (struct pci_dev * pdev );
962963void pcie_aspm_exit_link_state (struct pci_dev * pdev );
963964void pcie_aspm_pm_state_change (struct pci_dev * pdev , bool locked );
964965void pcie_aspm_powersave_config_link (struct pci_dev * pdev );
965966void pci_configure_ltr (struct pci_dev * pdev );
966967void pci_bridge_reconfigure_ltr (struct pci_dev * pdev );
967968#else
969+ static inline void pcie_aspm_remove_cap (struct pci_dev * pdev , u32 lnkcap ) { }
968970static inline void pcie_aspm_init_link_state (struct pci_dev * pdev ) { }
969971static inline void pcie_aspm_exit_link_state (struct pci_dev * pdev ) { }
970972static inline void pcie_aspm_pm_state_change (struct pci_dev * pdev , bool locked ) { }
Original file line number Diff line number Diff line change @@ -1542,6 +1542,19 @@ int pci_enable_link_state_locked(struct pci_dev *pdev, int state)
15421542}
15431543EXPORT_SYMBOL (pci_enable_link_state_locked );
15441544
1545+ void pcie_aspm_remove_cap (struct pci_dev * pdev , u32 lnkcap )
1546+ {
1547+ if (lnkcap & PCI_EXP_LNKCAP_ASPM_L0S )
1548+ pdev -> aspm_l0s_support = 0 ;
1549+ if (lnkcap & PCI_EXP_LNKCAP_ASPM_L1 )
1550+ pdev -> aspm_l1_support = 0 ;
1551+
1552+ pci_info (pdev , "ASPM: Link Capabilities%s%s treated as unsupported to avoid device defect\n" ,
1553+ lnkcap & PCI_EXP_LNKCAP_ASPM_L0S ? " L0s" : "" ,
1554+ lnkcap & PCI_EXP_LNKCAP_ASPM_L1 ? " L1" : "" );
1555+
1556+ }
1557+
15451558static int pcie_aspm_set_policy (const char * val ,
15461559 const struct kernel_param * kp )
15471560{
You can’t perform that action at this time.
0 commit comments