Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d011fb31 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe
Browse files

NVMe: Reduce driver log spamming



Reduce error logging when no corrective action is required.

Suggessted-by: default avatarChris Petersen <cpetersen@fb.com>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 921920ab
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2060,14 +2060,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;