Commit a10c8803 authored by Martin Wilck's avatar Martin Wilck Committed by Martin K. Petersen

scsi: qla2xxx: don't use zero for FC4_PRIORITY_NVME

Avoid an uninitialized value (0) for ha->fc4_type_priority being falsely
interpreted as NVMe priority. Not strictly needed any more after the
previous patch, but makes the fc4_type_priority handling more explicit.

Link: https://lore.kernel.org/r/20191107224839.32417-3-martin.wilck@suse.comTested-by: default avatarDavid Bond <dbond@suse.com>
Acked-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin Wilck <mwilck@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f5a2b219
......@@ -2480,8 +2480,10 @@ typedef struct fc_port {
u16 n2n_chip_reset;
} fc_port_t;
#define FC4_PRIORITY_NVME 0
#define FC4_PRIORITY_FCP 1
enum {
FC4_PRIORITY_NVME = 1,
FC4_PRIORITY_FCP = 2,
};
#define QLA_FCPORT_SCAN 1
#define QLA_FCPORT_FOUND 2
......
......@@ -317,5 +317,5 @@ qla2xxx_get_fc4_priority(struct scsi_qla_host *vha)
((uint8_t *)vha->hw->nvram)[NVRAM_DUAL_FCP_NVME_FLAG_OFFSET];
return ((data >> 6) & BIT_0);
return (data >> 6) & BIT_0 ? FC4_PRIORITY_FCP : FC4_PRIORITY_NVME;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment