From f75754f2feaa3be2f07838ef53914d15a10fd587 Mon Sep 17 00:00:00 2001 From: Justin Tee Date: Tue, 31 Mar 2026 13:59:21 -0700 Subject: [PATCH] scsi: lpfc: Log MCQE contents for mbox commands with no context 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 Link: https://patch.msgid.link/20260331205928.119833-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen --- drivers/scsi/lpfc/lpfc_sli.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index bd71292e7480..b32a1870eec2 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -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; -- 2.47.3