From: Keith Busch Date: Mon, 4 Apr 2016 21:07:41 +0000 (-0600) Subject: NVMe: Reduce driver log spamming X-Git-Tag: v4.1.12-102.0.20170601_1400~76 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e97e08cf5d5a1b4b2798e7ecc875ea8a89ac52f8;p=users%2Fjedix%2Flinux-maple.git NVMe: Reduce driver log spamming Reduce error logging when no corrective action is required. Suggessted-by: Chris Petersen Signed-off-by: Keith Busch Signed-off-by: Jens Axboe (cherry picked from commit d011fb3164e8694d7839f10a497f8ab6c660149a) Orabug: 25130845 Signed-off-by: Ashok Vairavan Reviewed-by: Martin K. Petersen --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 4599e117fdc39..a2c2aa1bb8dfb 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2077,14 +2077,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;