Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Restrict the REG_FCFI MAM field to FCoE adapters only

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>

authored by

Justin Tee and committed by
Martin K. Petersen
17cb5e98 1ff0f95a

+4 -2
+4 -2
drivers/scsi/lpfc/lpfc_mbox.c
··· 2524 2524 bf_set(lpfc_reg_fcfi_rq_id1, reg_fcfi, REG_FCF_INVALID_QID); 2525 2525 2526 2526 /* addr mode is bit wise inverted value of fcf addr_mode */ 2527 - bf_set(lpfc_reg_fcfi_mam, reg_fcfi, 2528 - (~phba->fcf.addr_mode) & 0x3); 2527 + if (test_bit(HBA_FCOE_MODE, &phba->hba_flag)) { 2528 + bf_set(lpfc_reg_fcfi_mam, reg_fcfi, 2529 + (~phba->fcf.addr_mode) & 0x3); 2530 + } 2529 2531 } else { 2530 2532 /* This is ONLY for NVMET MRQ == 1 */ 2531 2533 if (phba->cfg_nvmet_mrq != 1)