Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pci-v5.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
"Revert ASPM suspend/resume fix that regressed NVMe devices (Bjorn
Helgaas)"

* tag 'pci-v5.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
Revert "PCI/ASPM: Save/restore L1SS Capability for suspend/resume"

-55
-7
drivers/pci/pci.c
··· 1558 1558 return i; 1559 1559 1560 1560 pci_save_ltr_state(dev); 1561 - pci_save_aspm_l1ss_state(dev); 1562 1561 pci_save_dpc_state(dev); 1563 1562 pci_save_aer_state(dev); 1564 1563 pci_save_ptm_state(dev); ··· 1664 1665 * LTR itself (in the PCIe capability). 1665 1666 */ 1666 1667 pci_restore_ltr_state(dev); 1667 - pci_restore_aspm_l1ss_state(dev); 1668 1668 1669 1669 pci_restore_pcie_state(dev); 1670 1670 pci_restore_pasid_state(dev); ··· 3350 3352 2 * sizeof(u16)); 3351 3353 if (error) 3352 3354 pci_err(dev, "unable to allocate suspend buffer for LTR\n"); 3353 - 3354 - error = pci_add_ext_cap_save_buffer(dev, PCI_EXT_CAP_ID_L1SS, 3355 - 2 * sizeof(u32)); 3356 - if (error) 3357 - pci_err(dev, "unable to allocate suspend buffer for ASPM-L1SS\n"); 3358 3355 3359 3356 pci_allocate_vc_save_buffers(dev); 3360 3357 }
-4
drivers/pci/pci.h
··· 582 582 void pcie_aspm_exit_link_state(struct pci_dev *pdev); 583 583 void pcie_aspm_pm_state_change(struct pci_dev *pdev); 584 584 void pcie_aspm_powersave_config_link(struct pci_dev *pdev); 585 - void pci_save_aspm_l1ss_state(struct pci_dev *dev); 586 - void pci_restore_aspm_l1ss_state(struct pci_dev *dev); 587 585 #else 588 586 static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) { } 589 587 static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) { } 590 588 static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) { } 591 589 static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) { } 592 - static inline void pci_save_aspm_l1ss_state(struct pci_dev *dev) { } 593 - static inline void pci_restore_aspm_l1ss_state(struct pci_dev *dev) { } 594 590 #endif 595 591 596 592 #ifdef CONFIG_PCIE_ECRC
-44
drivers/pci/pcie/aspm.c
··· 734 734 PCI_L1SS_CTL1_L1SS_MASK, val); 735 735 } 736 736 737 - void pci_save_aspm_l1ss_state(struct pci_dev *dev) 738 - { 739 - int aspm_l1ss; 740 - struct pci_cap_saved_state *save_state; 741 - u32 *cap; 742 - 743 - if (!pci_is_pcie(dev)) 744 - return; 745 - 746 - aspm_l1ss = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_L1SS); 747 - if (!aspm_l1ss) 748 - return; 749 - 750 - save_state = pci_find_saved_ext_cap(dev, PCI_EXT_CAP_ID_L1SS); 751 - if (!save_state) 752 - return; 753 - 754 - cap = (u32 *)&save_state->cap.data[0]; 755 - pci_read_config_dword(dev, aspm_l1ss + PCI_L1SS_CTL1, cap++); 756 - pci_read_config_dword(dev, aspm_l1ss + PCI_L1SS_CTL2, cap++); 757 - } 758 - 759 - void pci_restore_aspm_l1ss_state(struct pci_dev *dev) 760 - { 761 - int aspm_l1ss; 762 - struct pci_cap_saved_state *save_state; 763 - u32 *cap; 764 - 765 - if (!pci_is_pcie(dev)) 766 - return; 767 - 768 - aspm_l1ss = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_L1SS); 769 - if (!aspm_l1ss) 770 - return; 771 - 772 - save_state = pci_find_saved_ext_cap(dev, PCI_EXT_CAP_ID_L1SS); 773 - if (!save_state) 774 - return; 775 - 776 - cap = (u32 *)&save_state->cap.data[0]; 777 - pci_write_config_dword(dev, aspm_l1ss + PCI_L1SS_CTL1, *cap++); 778 - pci_write_config_dword(dev, aspm_l1ss + PCI_L1SS_CTL2, *cap++); 779 - } 780 - 781 737 static void pcie_config_aspm_dev(struct pci_dev *pdev, u32 val) 782 738 { 783 739 pcie_capability_clear_and_set_word(pdev, PCI_EXP_LNKCTL,