]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: lpfc: Log discarded and insufficient RQE buffer events
authorJustin Tee <justin.tee@broadcom.com>
Thu, 12 Feb 2026 21:29:57 +0000 (13:29 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 24 Feb 2026 18:06:51 +0000 (13:06 -0500)
An RCQE with statuses indicating that an RQE is dropped or when there
are insufficient buffers to receive new RQEs are currently occuring
silently.  Add a new log message to warn when such events occur.

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

index 1cbfbe44cb7cddcf241a6600f03b015c0a537376..fc7d478779f84e832ce615954f10c69d100d48f8 100644 (file)
@@ -1,7 +1,7 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
  * Fibre Channel Host Bus Adapters.                                *
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
+ * Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term *
  * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.     *
  * Copyright (C) 2004-2016 Emulex.  All rights reserved.           *
  * EMULEX and SLI are trademarks of Emulex.                        *
@@ -14736,11 +14736,22 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe)
                                        atomic_read(&tgtp->rcv_fcp_cmd_out),
                                        atomic_read(&tgtp->xmt_fcp_release));
                }
+               hrq->RQ_discard_frm++;
                fallthrough;
-
        case FC_STATUS_INSUFF_BUF_NEED_BUF:
+               /* Unexpected event - bump the counter for support. */
                hrq->RQ_no_posted_buf++;
-               /* Post more buffers if possible */
+
+               lpfc_log_msg(phba, KERN_WARNING,
+                            LOG_ELS | LOG_DISCOVERY | LOG_SLI,
+                            "6423 RQE completion Status x%x, needed x%x "
+                            "discarded x%x\n", status,
+                            hrq->RQ_no_posted_buf - hrq->RQ_discard_frm,
+                            hrq->RQ_discard_frm);
+
+               /* For SLI3, post more buffers if possible. No action for SLI4.
+                * SLI4 is reposting immediately after processing the RQE.
+                */
                set_bit(HBA_POST_RECEIVE_BUFFER, &phba->hba_flag);
                workposted = true;
                break;
index ee58383492b2bbab8f8011a8348155d94dcdb164..0aa105cab125980ad3e38455c1254545535b9d4f 100644 (file)
@@ -1,7 +1,7 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
  * Fibre Channel Host Bus Adapters.                                *
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
+ * Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term *
  * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.     *
  * Copyright (C) 2009-2016 Emulex.  All rights reserved.           *
  * EMULEX and SLI are trademarks of Emulex.                        *
@@ -246,6 +246,8 @@ struct lpfc_queue {
        uint32_t q_cnt_2;
        uint32_t q_cnt_3;
        uint64_t q_cnt_4;
+       uint32_t q_cnt_5;
+
 /* defines for EQ stats */
 #define        EQ_max_eqe              q_cnt_1
 #define        EQ_no_entry             q_cnt_2
@@ -268,6 +270,7 @@ struct lpfc_queue {
 #define        RQ_no_buf_found         q_cnt_2
 #define        RQ_buf_posted           q_cnt_3
 #define        RQ_rcv_buf              q_cnt_4
+#define RQ_discard_frm         q_cnt_5
 
        struct work_struct      irqwork;
        struct work_struct      spwork;