]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.29/mpt3sas-don-t-spam-logs-if-logging-level-is-0.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.29 / mpt3sas-don-t-spam-logs-if-logging-level-is-0.patch
CommitLineData
322a9451
GKH
1From 0d667f72b2a20bbac72bec0ab11467fc70bb0f1f Mon Sep 17 00:00:00 2001
2From: Johannes Thumshirn <jthumshirn@suse.de>
3Date: Wed, 3 Aug 2016 15:00:18 +0200
4Subject: mpt3sas: Don't spam logs if logging level is 0
5
6From: Johannes Thumshirn <jthumshirn@suse.de>
7
8commit 0d667f72b2a20bbac72bec0ab11467fc70bb0f1f upstream.
9
10In _scsih_io_done() we test if the ioc->logging_level does _not_ have
11the MPT_DEBUG_REPLY bit set and if it hasn't we print the debug
12messages. This unfortunately is the wrong way around.
13
14Note, the actual bug is older than af0094115 but this commit removed the
15CONFIG_SCSI_MPT3SAS_LOGGING Kconfig option which hid the bug.
16
17Fixes: af0094115 'mpt2sas, mpt3sas: Remove SCSI_MPTXSAS_LOGGING entry from Kconfig'
18Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
19Acked-by: Chaitra P B <chaitra.basappa@broadcom.com>
20Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23---
24 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
28+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
29@@ -4510,7 +4510,7 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *i
30 le16_to_cpu(mpi_reply->DevHandle));
31 mpt3sas_trigger_scsi(ioc, data.skey, data.asc, data.ascq);
32
33- if (!(ioc->logging_level & MPT_DEBUG_REPLY) &&
34+ if ((ioc->logging_level & MPT_DEBUG_REPLY) &&
35 ((scmd->sense_buffer[2] == UNIT_ATTENTION) ||
36 (scmd->sense_buffer[2] == MEDIUM_ERROR) ||
37 (scmd->sense_buffer[2] == HARDWARE_ERROR)))