]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: lpfc: Reduce log message generation during ELS ring clean up
authorJustin Tee <justin.tee@broadcom.com>
Fri, 31 Jan 2025 00:05:19 +0000 (16:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:13:40 +0000 (11:13 +0200)
[ Upstream commit 8eccc58d71eafbd2635077916b68fda15791d270 ]

A clean up log message is output from lpfc_els_flush_cmd() for each
outstanding ELS I/O and repeated for every NPIV instance.  The log message
should only be generated for active I/Os matching the NPIV vport.  Thus,
move the vport check to before logging the message.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20250131000524.163662-2-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc_els.c

index 1d7db49a8fe451d9917903e0491e57a4b435bd0e..318dc83e9a2acfbb2a62e9f0898f9f938b83a5d8 100644 (file)
@@ -9569,18 +9569,16 @@ lpfc_els_flush_cmd(struct lpfc_vport *vport)
        mbx_tmo_err = test_bit(MBX_TMO_ERR, &phba->bit_flags);
        /* First we need to issue aborts to outstanding cmds on txcmpl */
        list_for_each_entry_safe(piocb, tmp_iocb, &pring->txcmplq, list) {
+               if (piocb->vport != vport)
+                       continue;
+
                lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
                                 "2243 iotag = 0x%x cmd_flag = 0x%x "
-                                "ulp_command = 0x%x this_vport %x "
-                                "sli_flag = 0x%x\n",
+                                "ulp_command = 0x%x sli_flag = 0x%x\n",
                                 piocb->iotag, piocb->cmd_flag,
                                 get_job_cmnd(phba, piocb),
-                                (piocb->vport == vport),
                                 phba->sli.sli_flag);
 
-               if (piocb->vport != vport)
-                       continue;
-
                if ((phba->sli.sli_flag & LPFC_SLI_ACTIVE) && !mbx_tmo_err) {
                        if (piocb->cmd_flag & LPFC_IO_LIBDFC)
                                continue;