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-v6.8-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fixes from Bjorn Helgaas:

- Keep bridges in D0 if we need to poll downstream devices for PME to
resolve a v6.6 regression where we failed to enumerate devices below
bridges put in D3hot by runtime PM, e.g., NVMe drives connected via
Thunderbolt or USB4 docks (Alex Williamson)

- Add Siddharth Vadapalli as PCI TI DRA7XX/J721E reviewer

* tag 'pci-v6.8-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
MAINTAINERS: Add Siddharth Vadapalli as PCI TI DRA7XX/J721E reviewer
PCI: Fix active state requirement in PME polling

+23 -15
+1
MAINTAINERS
··· 16837 16837 16838 16838 PCI DRIVER FOR TI DRA7XX/J721E 16839 16839 M: Vignesh Raghavendra <vigneshr@ti.com> 16840 + R: Siddharth Vadapalli <s-vadapalli@ti.com> 16840 16841 L: linux-omap@vger.kernel.org 16841 16842 L: linux-pci@vger.kernel.org 16842 16843 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
+22 -15
drivers/pci/pci.c
··· 2522 2522 if (pdev->pme_poll) { 2523 2523 struct pci_dev *bridge = pdev->bus->self; 2524 2524 struct device *dev = &pdev->dev; 2525 - int pm_status; 2525 + struct device *bdev = bridge ? &bridge->dev : NULL; 2526 + int bref = 0; 2526 2527 2527 2528 /* 2528 - * If bridge is in low power state, the 2529 - * configuration space of subordinate devices 2530 - * may be not accessible 2529 + * If we have a bridge, it should be in an active/D0 2530 + * state or the configuration space of subordinate 2531 + * devices may not be accessible or stable over the 2532 + * course of the call. 2531 2533 */ 2532 - if (bridge && bridge->current_state != PCI_D0) 2533 - continue; 2534 + if (bdev) { 2535 + bref = pm_runtime_get_if_active(bdev, true); 2536 + if (!bref) 2537 + continue; 2538 + 2539 + if (bridge->current_state != PCI_D0) 2540 + goto put_bridge; 2541 + } 2534 2542 2535 2543 /* 2536 - * If the device is in a low power state it 2537 - * should not be polled either. 2544 + * The device itself should be suspended but config 2545 + * space must be accessible, therefore it cannot be in 2546 + * D3cold. 2538 2547 */ 2539 - pm_status = pm_runtime_get_if_active(dev, true); 2540 - if (!pm_status) 2541 - continue; 2542 - 2543 - if (pdev->current_state != PCI_D3cold) 2548 + if (pm_runtime_suspended(dev) && 2549 + pdev->current_state != PCI_D3cold) 2544 2550 pci_pme_wakeup(pdev, NULL); 2545 2551 2546 - if (pm_status > 0) 2547 - pm_runtime_put(dev); 2552 + put_bridge: 2553 + if (bref > 0) 2554 + pm_runtime_put(bdev); 2548 2555 } else { 2549 2556 list_del(&pme_dev->list); 2550 2557 kfree(pme_dev);