scsi: qla2xxx: Fix FC-NVMe LUN discovery
commita4239945b8
("scsi: qla2xxx: Add switch command to simplify fabric discovery") introduced regression when it did not consider FC-NVMe code path which broke NVMe LUN discovery. Fixes:a4239945b8
("scsi: qla2xxx: Add switch command to simplify fabric discovery") Signed-off-by: Darren Trapp <darren.trapp@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
e39a97353e
commit
2b5b96473e
|
@ -2217,6 +2217,7 @@ typedef struct {
|
|||
|
||||
/* FCP-4 types */
|
||||
#define FC4_TYPE_FCP_SCSI 0x08
|
||||
#define FC4_TYPE_NVME 0x28
|
||||
#define FC4_TYPE_OTHER 0x0
|
||||
#define FC4_TYPE_UNKNOWN 0xff
|
||||
|
||||
|
|
|
@ -3973,6 +3973,9 @@ out:
|
|||
spin_lock_irqsave(&vha->work_lock, flags);
|
||||
vha->scan.scan_flags &= ~SF_SCANNING;
|
||||
spin_unlock_irqrestore(&vha->work_lock, flags);
|
||||
|
||||
if ((fc4type == FC4_TYPE_FCP_SCSI) && vha->flags.nvme_enabled)
|
||||
qla24xx_async_gpnft(vha, FC4_TYPE_NVME);
|
||||
}
|
||||
|
||||
static void qla2x00_async_gpnft_gnnft_sp_done(void *s, int res)
|
||||
|
|
|
@ -1061,6 +1061,7 @@ void qla24xx_handle_gpdb_event(scsi_qla_host_t *vha, struct event_arg *ea)
|
|||
fc_port_t *fcport = ea->fcport;
|
||||
struct port_database_24xx *pd;
|
||||
struct srb *sp = ea->sp;
|
||||
uint8_t ls;
|
||||
|
||||
pd = (struct port_database_24xx *)sp->u.iocb_cmd.u.mbx.in;
|
||||
|
||||
|
@ -1073,7 +1074,12 @@ void qla24xx_handle_gpdb_event(scsi_qla_host_t *vha, struct event_arg *ea)
|
|||
if (fcport->disc_state == DSC_DELETE_PEND)
|
||||
return;
|
||||
|
||||
switch (pd->current_login_state) {
|
||||
if (fcport->fc4f_nvme)
|
||||
ls = pd->current_login_state >> 4;
|
||||
else
|
||||
ls = pd->current_login_state & 0xf;
|
||||
|
||||
switch (ls) {
|
||||
case PDS_PRLI_COMPLETE:
|
||||
__qla24xx_parse_gpdb(vha, fcport, pd);
|
||||
break;
|
||||
|
|
|
@ -4807,9 +4807,12 @@ 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 == FC4_TYPE_FCP_SCSI)
|
||||
if (e->u.new_sess.fc4_type == FC4_TYPE_FCP_SCSI) {
|
||||
fcport->fc4_type = FC4_TYPE_FCP_SCSI;
|
||||
|
||||
} else if (e->u.new_sess.fc4_type == FC4_TYPE_NVME) {
|
||||
fcport->fc4_type = FC4_TYPE_OTHER;
|
||||
fcport->fc4f_nvme = FC4_TYPE_NVME;
|
||||
}
|
||||
memcpy(fcport->port_name, e->u.new_sess.port_name,
|
||||
WWN_SIZE);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue