Skip to content

Commit dd86e7f

Browse files
committed
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"
2 parents 5c279c4 + 40fb68c commit dd86e7f

File tree

3 files changed

+0
-55
lines changed

3 files changed

+0
-55
lines changed

drivers/pci/pci.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,6 @@ int pci_save_state(struct pci_dev *dev)
15581558
return i;
15591559

15601560
pci_save_ltr_state(dev);
1561-
pci_save_aspm_l1ss_state(dev);
15621561
pci_save_dpc_state(dev);
15631562
pci_save_aer_state(dev);
15641563
pci_save_ptm_state(dev);
@@ -1665,7 +1664,6 @@ void pci_restore_state(struct pci_dev *dev)
16651664
* LTR itself (in the PCIe capability).
16661665
*/
16671666
pci_restore_ltr_state(dev);
1668-
pci_restore_aspm_l1ss_state(dev);
16691667

16701668
pci_restore_pcie_state(dev);
16711669
pci_restore_pasid_state(dev);
@@ -3353,11 +3351,6 @@ void pci_allocate_cap_save_buffers(struct pci_dev *dev)
33533351
if (error)
33543352
pci_err(dev, "unable to allocate suspend buffer for LTR\n");
33553353

3356-
error = pci_add_ext_cap_save_buffer(dev, PCI_EXT_CAP_ID_L1SS,
3357-
2 * sizeof(u32));
3358-
if (error)
3359-
pci_err(dev, "unable to allocate suspend buffer for ASPM-L1SS\n");
3360-
33613354
pci_allocate_vc_save_buffers(dev);
33623355
}
33633356

drivers/pci/pci.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,15 +582,11 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev);
582582
void pcie_aspm_exit_link_state(struct pci_dev *pdev);
583583
void pcie_aspm_pm_state_change(struct pci_dev *pdev);
584584
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);
587585
#else
588586
static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) { }
589587
static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) { }
590588
static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) { }
591589
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) { }
594590
#endif
595591

596592
#ifdef CONFIG_PCIE_ECRC

drivers/pci/pcie/aspm.c

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -734,50 +734,6 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
734734
PCI_L1SS_CTL1_L1SS_MASK, val);
735735
}
736736

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-
781737
static void pcie_config_aspm_dev(struct pci_dev *pdev, u32 val)
782738
{
783739
pcie_capability_clear_and_set_word(pdev, PCI_EXP_LNKCTL,

0 commit comments

Comments
 (0)