]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: lpfc: Log MCQE contents for mbox commands with no context
authorJustin Tee <justin.tee@broadcom.com>
Tue, 31 Mar 2026 20:59:21 +0000 (13:59 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 3 Apr 2026 01:34:01 +0000 (21:34 -0400)
Update log message to display the entirety of an MCQE for which there is no
submission context.  This log message is not expected to occur and hence is
tagged as a LOG_TRACE_EVENT.  As such, move the hbalock release to before
this log message so that the trace event process does not hold the hbalock
for too long.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260331205928.119833-4-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c

index bd71292e7480e505888006359733de7bf12fcc7f..b32a1870eec2ac3f68a9d2e2baa7a0bccc42ea4a 100644 (file)
@@ -14337,13 +14337,15 @@ lpfc_sli4_sp_handle_mbox_event(struct lpfc_hba *phba, struct lpfc_mcqe *mcqe)
        /* Get the reference to the active mbox command */
        spin_lock_irqsave(&phba->hbalock, iflags);
        pmb = phba->sli.mbox_active;
+       spin_unlock_irqrestore(&phba->hbalock, iflags);
        if (unlikely(!pmb)) {
                lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
-                               "1832 No pending MBOX command to handle\n");
-               spin_unlock_irqrestore(&phba->hbalock, iflags);
+                               "1832 No pending MBOX command to handle, "
+                               "mcqe: x%08x x%08x x%08x x%08x\n",
+                               mcqe->word0, mcqe->mcqe_tag0,
+                               mcqe->mcqe_tag1, mcqe->trailer);
                goto out_no_mqe_complete;
        }
-       spin_unlock_irqrestore(&phba->hbalock, iflags);
        mqe = &pmb->u.mqe;
        pmbox = (MAILBOX_t *)&pmb->u.mqe;
        mbox = phba->mbox;