Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Ranjan Kumar <ranjan.kumar@broadcom.com>
To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com
Cc: sathya.prakash@broadcom.com, chandrakanth.patil@broadcom.com,
	prayas.patel@broadcom.com,
	Ranjan Kumar <ranjan.kumar@broadcom.com>
Subject: [PATCH v1 2/4] mpt3sas: suppress unnecessary IOCLogInfo on CONFIG_INVALID_PAGE
Date: Mon, 22 Sep 2025 15:21:11 +0530	[thread overview]
Message-ID: <20250922095113.281484-3-ranjan.kumar@broadcom.com> (raw)
In-Reply-To: <20250922095113.281484-1-ranjan.kumar@broadcom.com>

Avoid unconditional IOCLogInfo prints for CONFIG_INVALID_PAGE.
Log only if MPT_DEBUG_REPLY is enabled or when loginfo
represents other errors. This reduces uncessary logging without losing
useful error reporting.

Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index bd3efa5b46c7..0d652db8fe24 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1420,7 +1420,13 @@ _base_display_reply_info(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
 
 	if (ioc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) {
 		loginfo = le32_to_cpu(mpi_reply->IOCLogInfo);
-		_base_sas_log_info(ioc, loginfo);
+		if (ioc->logging_level & MPT_DEBUG_REPLY)
+			_base_sas_log_info(ioc, loginfo);
+		else {
+			if (!((ioc_status & MPI2_IOCSTATUS_MASK) &
+			MPI2_IOCSTATUS_CONFIG_INVALID_PAGE))
+				_base_sas_log_info(ioc, loginfo);
+		}
 	}
 
 	if (ioc_status || loginfo) {
-- 
2.47.3


  parent reply	other threads:[~2025-09-22  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22  9:51 [PATCH v1 0/4] mpt3sas: Few Enhancements and minor fixes Ranjan Kumar
2025-09-22  9:51 ` [PATCH v1 1/4] mpt3sas: Fix crash in transport port remove by using ioc_info() Ranjan Kumar
2025-09-22  9:51 ` Ranjan Kumar [this message]
2025-09-22  9:51 ` [PATCH v1 3/4] mpt3sas: Add support for 22.5 Gbps SAS link rate Ranjan Kumar
2025-09-22  9:51 ` [PATCH v1 4/4] mpt3sas: update driver version to 54.100.00.00 Ranjan Kumar
2025-09-25  2:36 ` [PATCH v1 0/4] mpt3sas: Few Enhancements and minor fixes Martin K. Petersen
2025-09-30  2:36 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250922095113.281484-3-ranjan.kumar@broadcom.com \
    --to=ranjan.kumar@broadcom.com \
    --cc=chandrakanth.patil@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=prayas.patel@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox