Skip to content

Commit ac865f0

Browse files
committed
Merge tag 'pci-v6.7-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull PCI fixes from Bjorn Helgaas: - Revert an ASPM patch that caused an unintended reboot when resuming after suspend (Bjorn Helgaas) - Orphan Cadence PCIe IP (Bjorn Helgaas) * tag 'pci-v6.7-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: MAINTAINERS: Orphan Cadence PCIe IP Revert "PCI/ASPM: Remove pcie_aspm_pm_state_change()"
2 parents d7807d8 + 0ee2030 commit ac865f0

File tree

5 files changed

+33
-3
lines changed

5 files changed

+33
-3
lines changed

CREDITS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,6 +1855,10 @@ D: Fedora kernel maintenance (2003-2014).
18551855
D: 'Trinity' and similar fuzz testing work.
18561856
D: Misc/Other.
18571857

1858+
N: Tom Joseph
1859+
E: tjoseph@cadence.com
1860+
D: Cadence PCIe driver
1861+
18581862
N: Martin Josfsson
18591863
E: gandalf@wlug.westbo.se
18601864
P: 1024D/F6B6D3B1 7610 7CED 5C34 4AA6 DBA2 8BE1 5A6D AF95 F6B6 D3B1

MAINTAINERS

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16458,11 +16458,10 @@ F: Documentation/devicetree/bindings/pci/pci-armada8k.txt
1645816458
F: drivers/pci/controller/dwc/pcie-armada8k.c
1645916459

1646016460
PCI DRIVER FOR CADENCE PCIE IP
16461-
M: Tom Joseph <tjoseph@cadence.com>
1646216461
L: linux-pci@vger.kernel.org
16463-
S: Maintained
16462+
S: Orphan
1646416463
F: Documentation/devicetree/bindings/pci/cdns,*
16465-
F: drivers/pci/controller/cadence/
16464+
F: drivers/pci/controller/cadence/*cadence*
1646616465

1646716466
PCI DRIVER FOR FREESCALE LAYERSCAPE
1646816467
M: Minghuan Lian <minghuan.Lian@nxp.com>

drivers/pci/pci.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,9 @@ static int pci_set_full_power_state(struct pci_dev *dev)
13351335
pci_restore_bars(dev);
13361336
}
13371337

1338+
if (dev->bus->self)
1339+
pcie_aspm_pm_state_change(dev->bus->self);
1340+
13381341
return 0;
13391342
}
13401343

@@ -1429,6 +1432,9 @@ static int pci_set_low_power_state(struct pci_dev *dev, pci_power_t state)
14291432
pci_power_name(dev->current_state),
14301433
pci_power_name(state));
14311434

1435+
if (dev->bus->self)
1436+
pcie_aspm_pm_state_change(dev->bus->self);
1437+
14321438
return 0;
14331439
}
14341440

drivers/pci/pci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,12 @@ int pcie_retrain_link(struct pci_dev *pdev, bool use_lt);
569569
#ifdef CONFIG_PCIEASPM
570570
void pcie_aspm_init_link_state(struct pci_dev *pdev);
571571
void pcie_aspm_exit_link_state(struct pci_dev *pdev);
572+
void pcie_aspm_pm_state_change(struct pci_dev *pdev);
572573
void pcie_aspm_powersave_config_link(struct pci_dev *pdev);
573574
#else
574575
static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) { }
575576
static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) { }
577+
static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) { }
576578
static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) { }
577579
#endif
578580

drivers/pci/pcie/aspm.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,25 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)
10081008
up_read(&pci_bus_sem);
10091009
}
10101010

1011+
/* @pdev: the root port or switch downstream port */
1012+
void pcie_aspm_pm_state_change(struct pci_dev *pdev)
1013+
{
1014+
struct pcie_link_state *link = pdev->link_state;
1015+
1016+
if (aspm_disabled || !link)
1017+
return;
1018+
/*
1019+
* Devices changed PM state, we should recheck if latency
1020+
* meets all functions' requirement
1021+
*/
1022+
down_read(&pci_bus_sem);
1023+
mutex_lock(&aspm_lock);
1024+
pcie_update_aspm_capable(link->root);
1025+
pcie_config_aspm_path(link);
1026+
mutex_unlock(&aspm_lock);
1027+
up_read(&pci_bus_sem);
1028+
}
1029+
10111030
void pcie_aspm_powersave_config_link(struct pci_dev *pdev)
10121031
{
10131032
struct pcie_link_state *link = pdev->link_state;

0 commit comments

Comments
 (0)