linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/ERR: use panic instead pci_info for device recovery failure in PCIe
@ 2024-12-27  6:52 Atharva Tiwari
  2025-01-03 11:16 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Atharva Tiwari @ 2024-12-27  6:52 UTC (permalink / raw)
  Cc: evepolonium, Mahesh J Salgaonkar, Oliver O'Halloran,
	Bjorn Helgaas, linuxppc-dev, linux-pci, linux-kernel

update failed in drivers/pci/pcie/err.c to 
trigger a kernel panic instead of pci_info

Thanks

Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
---
 drivers/pci/pcie/err.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
index 31090770fffc..2630b88564d8 100644
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -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;
 }
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI/ERR: use panic instead pci_info for device recovery failure in PCIe
  2024-12-27  6:52 [PATCH] PCI/ERR: use panic instead pci_info for device recovery failure in PCIe Atharva Tiwari
@ 2025-01-03 11:16 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2025-01-03 11:16 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: Mahesh J Salgaonkar, Oliver O'Halloran, Bjorn Helgaas,
	linuxppc-dev, linux-pci, linux-kernel

On Fri, 27 Dec 2024 12:22:53 +0530
Atharva Tiwari <evepolonium@gmail.com> wrote:

> update failed in drivers/pci/pcie/err.c to 
> trigger a kernel panic instead of pci_info
> 
> Thanks
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

> 
> Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
> ---
>  drivers/pci/pcie/err.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
> index 31090770fffc..2630b88564d8 100644
> --- a/drivers/pci/pcie/err.c
> +++ b/drivers/pci/pcie/err.c
> @@ -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;
>  }



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-03 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-27  6:52 [PATCH] PCI/ERR: use panic instead pci_info for device recovery failure in PCIe Atharva Tiwari
2025-01-03 11:16 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).