scsi: lpfc: Select mailbox rq_create cmd version based on SLI4 if_type

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>
This commit is contained in:
Justin Tee 2026-03-31 13:59:20 -07:00 committed by Martin K. Petersen
parent e32b5e8f09
commit 35f22f84be

View 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);