]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: lpfc: Restrict the REG_FCFI MAM field to FCoE adapters only
authorJustin Tee <justin.tee@broadcom.com>
Thu, 12 Dec 2024 23:33:01 +0000 (15:33 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 2 Jan 2025 20:01:22 +0000 (15:01 -0500)
Qualify setting the REG_FCFI MAM field to FCoE adapters only by keying off
HBA_FCOE_MODE phba->hba_flag.  The field is not applicable to FC adapters.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20241212233309.71356-3-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_mbox.c

index e98f1c2b22202e9e104c8efee3a5b4cd0be364e8..fb6dbcb86c09112fc6ac4d58294dbf70115e1de5 100644 (file)
@@ -2524,8 +2524,10 @@ lpfc_reg_fcfi(struct lpfc_hba *phba, struct lpfcMboxq *mbox)
                bf_set(lpfc_reg_fcfi_rq_id1, reg_fcfi, REG_FCF_INVALID_QID);
 
                /* addr mode is bit wise inverted value of fcf addr_mode */
-               bf_set(lpfc_reg_fcfi_mam, reg_fcfi,
-                      (~phba->fcf.addr_mode) & 0x3);
+               if (test_bit(HBA_FCOE_MODE, &phba->hba_flag)) {
+                       bf_set(lpfc_reg_fcfi_mam, reg_fcfi,
+                              (~phba->fcf.addr_mode) & 0x3);
+               }
        } else {
                /* This is ONLY for NVMET MRQ == 1 */
                if (phba->cfg_nvmet_mrq != 1)