Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NVMe: Reduce driver log spamming
@ 2016-04-04 20:30 Keith Busch
  2016-04-05  6:52 ` Johannes Thumshirn
  0 siblings, 1 reply; 2+ messages in thread
From: Keith Busch @ 2016-04-04 20:30 UTC (permalink / raw)


Reduce error logging when no corrective action is required.

Suggessted-by: Chris Petersen <cpetersen at fb.com>
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
 drivers/nvme/host/pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 5acd6e4..29f31bc 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2130,14 +2130,17 @@ static pci_ers_result_t nvme_error_detected(struct pci_dev *pdev,
 	 * shutdown the controller to quiesce. The controller will be restarted
 	 * after the slot reset through driver's slot_reset callback.
 	 */
-	dev_warn(dev->ctrl.device, "error detected: state:%d\n", state);
 	switch (state) {
 	case pci_channel_io_normal:
 		return PCI_ERS_RESULT_CAN_RECOVER;
 	case pci_channel_io_frozen:
+		dev_warn(dev->ctrl.device,
+			"frozen state error detected, reset controller\n");
 		nvme_dev_disable(dev, false);
 		return PCI_ERS_RESULT_NEED_RESET;
 	case pci_channel_io_perm_failure:
+		dev_warn(dev->ctrl.device,
+			"failure state error detected, request disconnect\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 	return PCI_ERS_RESULT_NEED_RESET;
-- 
2.7.2

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

* [PATCH] NVMe: Reduce driver log spamming
  2016-04-04 20:30 [PATCH] NVMe: Reduce driver log spamming Keith Busch
@ 2016-04-05  6:52 ` Johannes Thumshirn
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Thumshirn @ 2016-04-05  6:52 UTC (permalink / raw)


On 2016-04-04 22:30, Keith Busch wrote:
> Reduce error logging when no corrective action is required.
> 
> Suggessted-by: Chris Petersen <cpetersen at fb.com>
> Signed-off-by: Keith Busch <keith.busch at intel.com>

Looks good to me,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>

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

end of thread, other threads:[~2016-04-05  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-04 20:30 [PATCH] NVMe: Reduce driver log spamming Keith Busch
2016-04-05  6:52 ` Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox