Skip to content

Commit f0eeb5f

Browse files
committed
Merge tag 'pci-v6.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull PCI fixes from Bjorn Helgaas: - Set up runtime PM even for devices that lack a PM Capability as we did before 4d4c10f ("PCI: Explicitly put devices into D0 when initializing"), which broke resume in some VFIO scenarios (Mario Limonciello) - Ignore pciehp Presence Detect Changed events caused by DPC, even if they occur after a Data Link Layer State Changed event, to fix a VFIO GPU passthrough regression in v6.13 (Lukas Wunner) * tag 'pci-v6.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: pciehp: Ignore belated Presence Detect Changed caused by DPC PCI/PM: Set up runtime PM even for devices without PCI PM
2 parents afa3d8b + bbf10cd commit f0eeb5f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/pci/hotplug/pciehp_hpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ static irqreturn_t pciehp_ist(int irq, void *dev_id)
771771
u16 ignored_events = PCI_EXP_SLTSTA_DLLSC;
772772

773773
if (!ctrl->inband_presence_disabled)
774-
ignored_events |= events & PCI_EXP_SLTSTA_PDC;
774+
ignored_events |= PCI_EXP_SLTSTA_PDC;
775775

776776
events &= ~ignored_events;
777777
pciehp_ignore_link_change(ctrl, pdev, irq, ignored_events);

drivers/pci/pci.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3217,14 +3217,14 @@ void pci_pm_init(struct pci_dev *dev)
32173217
/* find PCI PM capability in list */
32183218
pm = pci_find_capability(dev, PCI_CAP_ID_PM);
32193219
if (!pm)
3220-
return;
3220+
goto poweron;
32213221
/* Check device's ability to generate PME# */
32223222
pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc);
32233223

32243224
if ((pmc & PCI_PM_CAP_VER_MASK) > 3) {
32253225
pci_err(dev, "unsupported PM cap regs version (%u)\n",
32263226
pmc & PCI_PM_CAP_VER_MASK);
3227-
return;
3227+
goto poweron;
32283228
}
32293229

32303230
dev->pm_cap = pm;
@@ -3269,6 +3269,7 @@ void pci_pm_init(struct pci_dev *dev)
32693269
pci_read_config_word(dev, PCI_STATUS, &status);
32703270
if (status & PCI_STATUS_IMM_READY)
32713271
dev->imm_ready = 1;
3272+
poweron:
32723273
pci_pm_power_up_and_verify_state(dev);
32733274
pm_runtime_forbid(&dev->dev);
32743275
pm_runtime_set_active(&dev->dev);

0 commit comments

Comments
 (0)