Skip to content

Commit 17cb5e9

Browse files
Justin Teemartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1ff0f95 commit 17cb5e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/scsi/lpfc/lpfc_mbox.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,8 +2524,10 @@ lpfc_reg_fcfi(struct lpfc_hba *phba, struct lpfcMboxq *mbox)
25242524
bf_set(lpfc_reg_fcfi_rq_id1, reg_fcfi, REG_FCF_INVALID_QID);
25252525

25262526
/* 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+
}
25292531
} else {
25302532
/* This is ONLY for NVMET MRQ == 1 */
25312533
if (phba->cfg_nvmet_mrq != 1)

0 commit comments

Comments
 (0)