PCI/DPC: Hold pci_dev reference during error recovery

The AER and EDR error handling paths hold a reference on the pci_dev during
recovery.  Hold a reference during the DPC recovery path as well.

Signed-off-by: Sizhe Liu <liusizhe5@huawei.com>
[bhelgaas: split to separate patch]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
https://patch.msgid.link/20260214081130.1878424-1-liusizhe5@huawei.com
This commit is contained in:
Sizhe Liu 2026-03-11 14:52:11 -05:00 committed by Bjorn Helgaas
parent 6de23f81a5
commit a1ed752bc7

View File

@ -372,11 +372,13 @@ static irqreturn_t dpc_handler(int irq, void *context)
return IRQ_HANDLED;
}
pci_dev_get(pdev);
dpc_process_error(pdev);
/* We configure DPC so it only triggers on ERR_FATAL */
pcie_do_recovery(pdev, pci_channel_io_frozen, dpc_reset_link);
pci_dev_put(pdev);
return IRQ_HANDLED;
}