aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuinn Tran <[email protected]>2018-09-26 22:05:12 -0700
committerMartin K. Petersen <[email protected]>2018-09-27 20:15:05 -0400
commitdb186382af21e926e90df19499475f2552192b77 (patch)
tree1f9d50e741127ec524472df1ddb4ace2f9a939a8
parentf7d61c995df74d6bb57bbff6a2b7b1874c4a2baa (diff)
scsi: qla2xxx: Fix NVMe Target discovery
This patch fixes issue when remoteport registers itself as both FCP and FC-NVMe with the switch, driver will pick FC-NVMe personality as default when scanning for targets. Driver was using comaprative operator instead of bitwise operator to check for fc4_type for both FCP and FC-NVME. Fixes: 2b5b96473efc ("scsi: qla2xxx: Fix FC-NVMe LUN discovery") Cc: <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 429033ab6897..dba672f87cb2 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4880,10 +4880,10 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
fcport->d_id = e->u.new_sess.id;
fcport->flags |= FCF_FABRIC_DEVICE;
fcport->fw_login_state = DSC_LS_PLOGI_PEND;
- if (e->u.new_sess.fc4_type == FS_FC4TYPE_FCP)
+ if (e->u.new_sess.fc4_type & FS_FC4TYPE_FCP)
fcport->fc4_type = FC4_TYPE_FCP_SCSI;
- if (e->u.new_sess.fc4_type == FS_FC4TYPE_NVME) {
+ if (e->u.new_sess.fc4_type & FS_FC4TYPE_NVME) {
fcport->fc4_type = FC4_TYPE_OTHER;
fcport->fc4f_nvme = FC4_TYPE_NVME;
}