PCI/ERR: use panic instead pci_info for device recovery failure in PCIe
Subsystems (2)
PATCH 1/1 PCI/ERR: use panic instead pci_info for device recovery failure in PCIe
update failed in drivers/pci/pcie/err.c to
trigger a kernel panic instead of pci_info
Thanks
Signed-off-by Atharva Tiwari <[email protected]>
--- drivers/pci/pcie/err.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pcie/err.c +2 -2
@@ -271,8 +271,8 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,pci_uevent_ers (bridge,PCI_ERS_RESULT_DISCONNECT ); -/* TODO: Should kernel panic here? */ -pci_info (bridge,"device recovery failed\n" ); + +panic ("Kernel Panic: %s: Device recovery failed\n" ,pci_name (bridge));return status; }
Signature · 1 line
2.39.5
Quoted 4 lines · On Fri, 27 Dec 2024 12:22:53 +0530 Atharva Tiwari <[email protected]> wrote:
update failed in
drivers/pci/pcie/err.cto
trigger a kernel panic instead ofpci_infoThanks
Rewrite message as described in submitting patches documentation.
Key thing here is question of 'why?'
A question was in that comment, what is your reasoning for panic being the correct choice?
Jonathan
Quoted 21 lines
Signed-off-by Atharva Tiwari <[email protected]>--- drivers/pci/pcie/err.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/pcie/err.c +2
-2@@ -271,8 +271,8 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,pci_uevent_ers (bridge,PCI_ERS_RESULT_DISCONNECT ); -/* TODO: Should kernel panic here? */ -pci_info (bridge,"device recovery failed\n" ); + +panic ("Kernel Panic: %s: Device recovery failed\n" ,pci_name (bridge));return status; }