Skip to content

Commit 27f0b41

Browse files
Ranjan Kumarmartinkpetersen
authored andcommitted
scsi: mpt3sas: Suppress unnecessary IOCLogInfo on CONFIG_INVALID_PAGE
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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1703fe4 commit 27f0b41

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/scsi/mpt3sas/mpt3sas_base.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,13 @@ _base_display_reply_info(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
14201420

14211421
if (ioc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) {
14221422
loginfo = le32_to_cpu(mpi_reply->IOCLogInfo);
1423-
_base_sas_log_info(ioc, loginfo);
1423+
if (ioc->logging_level & MPT_DEBUG_REPLY)
1424+
_base_sas_log_info(ioc, loginfo);
1425+
else {
1426+
if (!((ioc_status & MPI2_IOCSTATUS_MASK) &
1427+
MPI2_IOCSTATUS_CONFIG_INVALID_PAGE))
1428+
_base_sas_log_info(ioc, loginfo);
1429+
}
14241430
}
14251431

14261432
if (ioc_status || loginfo) {

0 commit comments

Comments
 (0)