Skip to content

Commit a0f2371

Browse files
author
Myron Stowe
committed
PCI: Support Immediate Readiness on devices without PM capabilities
JIRA: https://issues.redhat.com/browse/RHEL-107898 Upstream Status: 5c0d0ee Conflict(s): Patching file drivers/pci/pci.c; Hunk #2 FAILED at 3265. Context fuzz due to upstream patch not taking into account a prior commit (907a7a2 "PCI/PM: Set up runtime PM even for devices without PCI PM"). commit 5c0d0ee Author: Sean Christopherson <seanjc@google.com> Date: Tue Jul 22 08:59:26 2025 -0700 PCI: Support Immediate Readiness on devices without PM capabilities Query support for Immediate Readiness irrespective of whether or not the device supports PM capabilities, as nothing in the PCIe spec suggests that Immediate Readiness is in any way dependent on PM functionality. Fixes: d6112f8 ("PCI: Add support for Immediate Readiness") Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: David Matlack <dmatlack@google.com> Cc: Vipin Sharma <vipinsh@google.com> Cc: Aaron Lewis <aaronlewis@google.com> Link: https://patch.msgid.link/20250722155926.352248-1-seanjc@google.com Signed-off-by: Myron Stowe <mstowe@redhat.com>
1 parent de3fed0 commit a0f2371

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

drivers/pci/pci.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3205,7 +3205,6 @@ void pci_pm_power_up_and_verify_state(struct pci_dev *pci_dev)
32053205
void pci_pm_init(struct pci_dev *dev)
32063206
{
32073207
int pm;
3208-
u16 status;
32093208
u16 pmc;
32103209

32113210
device_enable_async_suspend(&dev->dev);
@@ -3266,9 +3265,6 @@ void pci_pm_init(struct pci_dev *dev)
32663265
pci_pme_active(dev, false);
32673266
}
32683267

3269-
pci_read_config_word(dev, PCI_STATUS, &status);
3270-
if (status & PCI_STATUS_IMM_READY)
3271-
dev->imm_ready = 1;
32723268
poweron:
32733269
pci_pm_power_up_and_verify_state(dev);
32743270
pm_runtime_forbid(&dev->dev);

drivers/pci/probe.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,6 +2554,15 @@ void pcie_report_downtraining(struct pci_dev *dev)
25542554
__pcie_print_link_status(dev, false);
25552555
}
25562556

2557+
static void pci_imm_ready_init(struct pci_dev *dev)
2558+
{
2559+
u16 status;
2560+
2561+
pci_read_config_word(dev, PCI_STATUS, &status);
2562+
if (status & PCI_STATUS_IMM_READY)
2563+
dev->imm_ready = 1;
2564+
}
2565+
25572566
static void pci_init_capabilities(struct pci_dev *dev)
25582567
{
25592568
pci_ea_init(dev); /* Enhanced Allocation */
@@ -2563,6 +2572,7 @@ static void pci_init_capabilities(struct pci_dev *dev)
25632572
/* Buffers for saving PCIe and PCI-X capabilities */
25642573
pci_allocate_cap_save_buffers(dev);
25652574

2575+
pci_imm_ready_init(dev); /* Immediate Readiness */
25662576
pci_pm_init(dev); /* Power Management */
25672577
pci_vpd_init(dev); /* Vital Product Data */
25682578
pci_configure_ari(dev); /* Alternative Routing-ID Forwarding */

0 commit comments

Comments
 (0)