]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: lpfc: Select mailbox rq_create cmd version based on SLI4 if_type
authorJustin Tee <justin.tee@broadcom.com>
Tue, 31 Mar 2026 20:59:20 +0000 (13:59 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 3 Apr 2026 01:34:01 +0000 (21:34 -0400)
When specifying rq version, it is preferred to refer to SLI4 interface type
instead of the get_sli4_parameters mailbox command response.  If SLI4
if_type is 2 or above, then the newer version 1 is used for rq_create
mailbox commands.  Otherwise, version 0 is used and is meant for older
adapters.

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

index 764feaef8a676e19da203619b2b2dd60ef57ca5f..6bfc57d21c57c85aec50f999ee128b4db5fdc0d9 100644 (file)
@@ -13758,7 +13758,9 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
        sli4_params->cqv = bf_get(cfg_cqv, mbx_sli4_parameters);
        sli4_params->mqv = bf_get(cfg_mqv, mbx_sli4_parameters);
        sli4_params->wqv = bf_get(cfg_wqv, mbx_sli4_parameters);
-       sli4_params->rqv = bf_get(cfg_rqv, mbx_sli4_parameters);
+       sli4_params->rqv =
+               (sli4_params->if_type < LPFC_SLI_INTF_IF_TYPE_2) ?
+                       LPFC_Q_CREATE_VERSION_0 : LPFC_Q_CREATE_VERSION_1;
        sli4_params->eqav = bf_get(cfg_eqav, mbx_sli4_parameters);
        sli4_params->cqav = bf_get(cfg_cqav, mbx_sli4_parameters);
        sli4_params->wqsize = bf_get(cfg_wqsize, mbx_sli4_parameters);