From 94a78fcc9417ee99ba45ea01e6fc1c491a7cef44 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 2 May 2019 00:50:02 +0000 Subject: [PATCH 1/3] qla2x00t-32gbit/qla_gbl.h: Minimize diffs with upstream git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8311 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_gbl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qla2x00t-32gbit/qla_gbl.h b/qla2x00t-32gbit/qla_gbl.h index 84b287d08..0ed81082c 100644 --- a/qla2x00t-32gbit/qla_gbl.h +++ b/qla2x00t-32gbit/qla_gbl.h @@ -79,7 +79,7 @@ int qla2x00_post_work(struct scsi_qla_host *vha, struct qla_work_evt *e); extern void *qla2x00_alloc_iocbs_ready(struct qla_qpair *, srb_t *); extern int qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *, fc_port_t *); -extern void qla2x00_set_fcport_state(fc_port_t *fcport, int state); +extern void qla2x00_set_fcport_state(fc_port_t *fcport, int state); extern fc_port_t * qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t ); From 038450686200954234690d30201781cf7f32189e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 2 May 2019 00:52:23 +0000 Subject: [PATCH 2/3] qla2x00t-32gbit/qla_init.c: Minimize diffs with upstream git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8312 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qla2x00t-32gbit/qla_init.c b/qla2x00t-32gbit/qla_init.c index a4ac73ad6..a3ca42c22 100644 --- a/qla2x00t-32gbit/qla_init.c +++ b/qla2x00t-32gbit/qla_init.c @@ -7880,7 +7880,7 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) fwcode = (void *)blob->fw->data; dcode = fwcode; if (qla24xx_risc_firmware_invalid(dcode)) { - ql_log(ql_log_fatal, vha, 0x0094, + ql_log(ql_log_fatal, vha, 0x0093, "Unable to verify integrity of firmware image (%zd).\n", blob->fw->size); ql_log(ql_log_fatal, vha, 0x0095, From ff892731e157f1c33f21c666568210f0bd824eaf Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 2 May 2019 01:23:37 +0000 Subject: [PATCH 3/3] qla2x00t-32gbit: display FC-NVMe port roles Currently the FC-NVMe driver is leverating the SCSI FC transport class to access the remote ports. Which means that all FC-NVMe remote ports will be visible to the fc transport layer, but due to missing definitions the port roles will always be 'unknown'. This patch adds the missing definitions to the fc transport class to that the port roles are correctly displayed. Upstream commit: a6a6d0589ac4 ("scsi: scsi_transport_fc: nvme: display FC-NVMe port roles"). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8313 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_def.h | 5 ++++- qla2x00t-32gbit/qla_mbx.c | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/qla2x00t-32gbit/qla_def.h b/qla2x00t-32gbit/qla_def.h index a090f153f..4069742ad 100644 --- a/qla2x00t-32gbit/qla_def.h +++ b/qla2x00t-32gbit/qla_def.h @@ -2249,7 +2249,10 @@ typedef enum { FCT_BROADCAST, FCT_INITIATOR, FCT_TARGET, - FCT_NVME + FCT_NVME_INITIATOR = 0x10, + FCT_NVME_TARGET = 0x20, + FCT_NVME_DISCOVERY = 0x40, + FCT_NVME = 0xf0, } fc_port_type_t; enum qla_sess_deletion { diff --git a/qla2x00t-32gbit/qla_mbx.c b/qla2x00t-32gbit/qla_mbx.c index 4548fad98..e206a62ba 100644 --- a/qla2x00t-32gbit/qla_mbx.c +++ b/qla2x00t-32gbit/qla_mbx.c @@ -6388,7 +6388,13 @@ int __qla24xx_parse_gpdb(struct scsi_qla_host *vha, fc_port_t *fcport, fcport->d_id.b.rsvd_1 = 0; if (fcport->fc4f_nvme) { - fcport->port_type = FCT_NVME; + fcport->port_type = 0; + if ((pd->prli_svc_param_word_3[0] & BIT_5) == 0) + fcport->port_type |= FCT_NVME_INITIATOR; + if ((pd->prli_svc_param_word_3[0] & BIT_4) == 0) + fcport->port_type |= FCT_NVME_TARGET; + if ((pd->prli_svc_param_word_3[0] & BIT_3) == 0) + fcport->port_type |= FCT_NVME_DISCOVERY; } else { /* If not target must be initiator or unknown type. */ if ((pd->prli_svc_param_word_3[0] & BIT_4) == 0)