Skip to contentSkip to conversation

qla2xxx driver bug fixes

PATCH Applied Nilesh Javali 2 participants 16 messages Aug 10, 2021 – Aug 17, 2021

Subsystems (2)
lore
Share & tools
lore

Nilesh Javali

author maintainer
#0 lore raw

v2 cover qla2xxx driver bug fixes

Martin,

Please apply the qla2xxx driver bug fixes to the scsi tree at your earliest convenience.

v2:
- Add Reviewed-by tag
- fix split of log message across lines (04/14)
- fix commit message (06/16)
- add Cc stable and Fixes tags

Thanks,
Nilesh

Arun Easi (3):
qla2xxx: Add host attribute to trigger MPI hang
qla2xxx: Show OS name and version in FDMI-1
qla2xxx: suppress unnecessary log messages during login

Nilesh Javali (1):
qla2xxx: Update version to 10.02.06.100-k

Quinn Tran (5):
qla2xxx: adjust request/response queue size for 28xx
qla2xxx: add debug print of 64G link speed
qla2xxx: fix port type info
qla2xxx: fix unsafe removal from link list
qla2xxx: fix npiv create erroneous error

Saurav Kashyap (5):
qla2xxx: Change %p to %px in the log messages
qla2xxx: Changes to support FCP2 Target
qla2xxx: Changes to support kdump kernel
qla2xxx: Changes to support kdump kernel for NVMe BFS
qla2xxx: Sync queue idx with queue_pair_map idx

 drivers/scsi/qla2xxx/qla_attr.c    |  25 +++++
 drivers/scsi/qla2xxx/qla_dbg.c     |   3 +-
 drivers/scsi/qla2xxx/qla_def.h     |  11 +-
 drivers/scsi/qla2xxx/qla_edif.c    |  78 +++++++-------
 drivers/scsi/qla2xxx/qla_gs.c      |   6 +-
 drivers/scsi/qla2xxx/qla_init.c    |  63 +++++++----
 drivers/scsi/qla2xxx/qla_iocb.c    |  18 ++--
 drivers/scsi/qla2xxx/qla_isr.c     |  51 +++++----
 drivers/scsi/qla2xxx/qla_mbx.c     |   2 +-
 drivers/scsi/qla2xxx/qla_mid.c     |  58 +++++-----
 drivers/scsi/qla2xxx/qla_nvme.c    |  61 +++++------
 drivers/scsi/qla2xxx/qla_os.c      | 110 +++++++++++--------
 drivers/scsi/qla2xxx/qla_sup.c     |   4 +-
 drivers/scsi/qla2xxx/qla_target.c  | 168 +++++++++++++++--------------
 drivers/scsi/qla2xxx/qla_tmpl.c    |   8 +-
 drivers/scsi/qla2xxx/qla_version.h |   6 +-
 drivers/scsi/qla2xxx/tcm_qla2xxx.c |  18 ++--
 17 files changed, 383 insertions(+), 307 deletions(-)

base-commit: 2c03a047d2fcae6d526e8630c820bc40560ec1eb

Signature · 1 line
2.19.0.rc0
author maintainer
#1 lore raw

PATCH v2 1/14 qla2xxx: Add host attribute to trigger MPI hang

From: Arun Easi <[email protected]>

Add a mechanism to trigger MPI pause for debugging purpose.

---
 drivers/scsi/qla2xxx/qla_attr.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
drivers/scsi/qla2xxx/qla_attr.c +25 -0
index 22191e9a04a0..4a0a5b4e688d 100644
@@ -1887,6 +1887,30 @@ qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr,
 	return scnprintf(buf, PAGE_SIZE, "%s\n", spd[ha->link_data_rate]);
 }
 
+static ssize_t
+qla2x00_mpi_pause_store(struct device *dev,
+	struct device_attribute *attr, const char *buf, size_t count)
+{
+	scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
+	int rval = 0;
+
+	if (sscanf(buf, "%d", &rval) != 1)
+		return -EINVAL;
+
+	ql_log(ql_log_warn, vha, 0x7089, "Pausing MPI...\n");
+
+	rval = qla83xx_wr_reg(vha, 0x002012d4, 0x30000001);
+
+	if (rval != QLA_SUCCESS) {
+		ql_log(ql_log_warn, vha, 0x708a, "Unable to pause MPI.\n");
+		count = 0;
+	}
+
+	return count;
+}
+
+static DEVICE_ATTR(mpi_pause, S_IWUSR, NULL, qla2x00_mpi_pause_store);
+
 /* ----- */
 
 static ssize_t
@@ -2482,6 +2506,7 @@ struct device_attribute *qla2x00_host_attrs[] = {
 	&dev_attr_fw_attr,
 	&dev_attr_dport_diagnostics,
 	&dev_attr_edif_doorbell,
+	&dev_attr_mpi_pause,
 	NULL, /* reserve for qlini_mode */
 	NULL, /* reserve for ql2xiniexchg */
 	NULL, /* reserve for ql2xexchoffld */
Signature · 1 line
2.19.0.rc0
author maintainer
#2 lore raw

PATCH v2 2/14 qla2xxx: Change %p to %px in the log messages

In reply to Nilesh Javali

From: Saurav Kashyap <[email protected]>

Improve debuggability of the log messages.

---
 drivers/scsi/qla2xxx/qla_edif.c    |  78 +++++++-------
 drivers/scsi/qla2xxx/qla_gs.c      |   2 +-
 drivers/scsi/qla2xxx/qla_init.c    |  18 ++--
 drivers/scsi/qla2xxx/qla_iocb.c    |  18 ++--
 drivers/scsi/qla2xxx/qla_isr.c     |  24 ++---
 drivers/scsi/qla2xxx/qla_mbx.c     |   2 +-
 drivers/scsi/qla2xxx/qla_mid.c     |  16 +--
 drivers/scsi/qla2xxx/qla_nvme.c    |  18 ++--
 drivers/scsi/qla2xxx/qla_os.c      |  82 +++++++-------
 drivers/scsi/qla2xxx/qla_sup.c     |   4 +-
 drivers/scsi/qla2xxx/qla_target.c  | 168 +++++++++++++++--------------
 drivers/scsi/qla2xxx/qla_tmpl.c    |   8 +-
 drivers/scsi/qla2xxx/tcm_qla2xxx.c |  18 ++--
 13 files changed, 229 insertions(+), 227 deletions(-)
drivers/scsi/qla2xxx/qla_edif.c +39 -39
index ccbe0e1bfcbc..567c3013fb1a 100644
@@ -105,7 +105,7 @@ static void qla2x00_sa_replace_iocb_timeout(struct timer_list *t)
 
 		if (sa_ctl) {
 			ql_dbg(ql_dbg_edif, vha, 0x3063,
-			    "%s: sa_ctl: %p, delete index %d, update index: %d, lid: 0x%x\n",
+			    "%s: sa_ctl: %px, delete index %d, update index: %d, lid: 0x%x\n",
 			    __func__, sa_ctl, delete_sa_index, edif_entry->update_sa_index,
 			    nport_handle);
 
@@ -234,7 +234,7 @@ fc_port_t *fcport)
 		qla_pur_get_pending(vha, fcport, bsg_job);
 
 		ql_dbg(ql_dbg_edif, vha, 0x911d,
-			"%s %s %8phN sid=%x. xchg %x, nb=%xh bsg ptr %p\n",
+			"%s %s %8phN sid=%x. xchg %x, nb=%xh bsg ptr %px\n",
 			__func__, sc_to_str(p->sub_cmd), fcport->port_name,
 			fcport->d_id.b24, rpl->rx_xchg_address,
 			rpl->r.reply_payload_rcv_len, bsg_job);
@@ -336,12 +336,12 @@ static void qla_edif_reset_auth_wait(struct fc_port *fcport, int state,
 
 	if (!waitonly) {
 		ql_dbg(ql_dbg_edif, fcport->vha, 0xf086,
-		    "%s: waited for session - %8phC, loopid=%x portid=%06x fcport=%p state=%u, cnt=%u\n",
+		    "%s: waited for session - %8phC, loopid=%x portid=%06x fcport=%px state=%u, cnt=%u\n",
 		    __func__, fcport->port_name, fcport->loop_id,
 		    fcport->d_id.b24, fcport, fcport->disc_state, cnt);
 	} else {
 		ql_dbg(ql_dbg_edif, fcport->vha, 0xf086,
-		    "%s: waited ONLY for session - %8phC, loopid=%x portid=%06x fcport=%p state=%u, cnt=%u\n",
+		    "%s: waited ONLY for session - %8phC, loopid=%x portid=%06x fcport=%px state=%u, cnt=%u\n",
 		    __func__, fcport->port_name, fcport->loop_id,
 		    fcport->d_id.b24, fcport, fcport->disc_state, cnt);
 	}
@@ -420,7 +420,7 @@ static void __qla2x00_release_all_sadb(struct scsi_qla_host *vha,
 			qla_edif_free_sa_ctl(fcport, sa_ctl, sa_ctl->index);
 		} else {
 			ql_dbg(ql_dbg_edif, vha, 0x3063,
-			    "%s: sa_ctl NOT freed, sa_ctl: %p\n", __func__, sa_ctl);
+			    "%s: sa_ctl NOT freed, sa_ctl: %px\n", __func__, sa_ctl);
 		}
 
 		/* Release the index */
@@ -439,7 +439,7 @@ static void __qla2x00_release_all_sadb(struct scsi_qla_host *vha,
 				qla_edif_list_find_sa_index(fcport, entry->handle);
 			if (edif_entry) {
 				ql_dbg(ql_dbg_edif, vha, 0x5033,
-				    "%s: remove edif_entry %p, update_sa_index: 0x%x, delete_sa_index: 0x%x\n",
+				    "%s: remove edif_entry %px, update_sa_index: 0x%x, delete_sa_index: 0x%x\n",
 				    __func__, edif_entry, edif_entry->update_sa_index,
 				    edif_entry->delete_sa_index);
 				qla_edif_list_delete_sa_index(fcport, edif_entry);
@@ -460,7 +460,7 @@ static void __qla2x00_release_all_sadb(struct scsi_qla_host *vha,
 							QL_VND_RX_SA_KEY, fcport);
 				}
 				ql_dbg(ql_dbg_edif, vha, 0x5033,
-				    "%s: release edif_entry %p, update_sa_index: 0x%x, delete_sa_index: 0x%x\n",
+				    "%s: release edif_entry %px, update_sa_index: 0x%x, delete_sa_index: 0x%x\n",
 				    __func__, edif_entry, edif_entry->update_sa_index,
 				    edif_entry->delete_sa_index);
 
@@ -548,7 +548,7 @@ qla_edif_app_start(scsi_qla_host_t *vha, struct bsg_job *bsg_job)
 
 	list_for_each_entry_safe(fcport, tf, &vha->vp_fcports, list) {
 		ql_dbg(ql_dbg_edif, vha, 0xf084,
-		    "%s: sess %p %8phC lid %#04x s_id %06x logout %d\n",
+		    "%s: sess %px %8phC lid %#04x s_id %06x logout %d\n",
 		    __func__, fcport, fcport->port_name,
 		    fcport->loop_id, fcport->d_id.b24,
 		    fcport->logout_on_delete);
@@ -636,7 +636,7 @@ qla_edif_app_stop(scsi_qla_host_t *vha, struct bsg_job *bsg_job)
 
 		if (fcport->flags & FCF_FCSP_DEVICE) {
 			ql_dbg(ql_dbg_edif, vha, 0xf084,
-			    "%s: sess %p from port %8phC lid %#04x s_id %06x logout %d keep %d els_logo %d\n",
+			    "%s: sess %px from port %8phC lid %#04x s_id %06x logout %d keep %d els_logo %d\n",
 			    __func__, fcport,
 			    fcport->port_name, fcport->loop_id, fcport->d_id.b24,
 			    fcport->logout_on_delete, fcport->keep_nport_handle,
@@ -847,7 +847,7 @@ qla_edif_app_authfail(scsi_qla_host_t *vha, struct bsg_job *bsg_job)
 	}
 
 	ql_dbg(ql_dbg_edif, vha, 0x911d,
-	    "%s fcport is 0x%p\n", __func__, fcport);
+	    "%s fcport is 0x%px\n", __func__, fcport);
 
 	if (fcport) {
 		/* set/reset edif values and flags */
@@ -1068,7 +1068,7 @@ qla_edif_app_mgmt(struct bsg_job *bsg_job)
 	if (!vha->hw->flags.edif_enabled ||
 		test_bit(VPORT_DELETE, &vha->dpc_flags)) {
 		ql_dbg(ql_dbg_edif, vha, 0x911d,
-		    "%s edif not enabled or vp delete. bsg ptr done %p. dpc_flags %lx\n",
+		    "%s edif not enabled or vp delete. bsg ptr done %px. dpc_flags %lx\n",
 		    __func__, bsg_job, vha->dpc_flags);
 
 		SET_DID_STATUS(bsg_reply->result, DID_ERROR);
@@ -1121,7 +1121,7 @@ qla_edif_app_mgmt(struct bsg_job *bsg_job)
 done:
 	if (done) {
 		ql_dbg(ql_dbg_user, vha, 0x7009,
-		    "%s: %d  bsg ptr done %p\n", __func__, __LINE__, bsg_job);
+		    "%s: %d  bsg ptr done %px\n", __func__, __LINE__, bsg_job);
 		bsg_job_done(bsg_job, bsg_reply->result,
 		    bsg_reply->reply_payload_rcv_len);
 	}
@@ -1159,7 +1159,7 @@ qla_edif_add_sa_ctl(fc_port_t *fcport, struct qla_sa_update_frame *sa_frame,
 	sa_ctl->flags = 0;
 	sa_ctl->state = 0L;
 	ql_dbg(ql_dbg_edif, fcport->vha, 0x9100,
-	    "%s: Added sa_ctl %p, index %d, state 0x%lx\n",
+	    "%s: Added sa_ctl %px, index %d, state 0x%lx\n",
 	    __func__, sa_ctl, sa_ctl->index, sa_ctl->state);
 	spin_lock_irqsave(&fcport->edif.sa_list_lock, flags);
 	if (dir == SAU_FLG_TX)
@@ -1272,7 +1272,7 @@ qla24xx_check_sadb_avail_slot(struct bsg_job *bsg_job, fc_port_t *fcport,
 		fcport->edif.rx_rekey_cnt++;
 
 	ql_dbg(ql_dbg_edif, fcport->vha, 0x9100,
-	    "%s: Found sa_ctl %p, index %d, state 0x%lx, tx_cnt %d, rx_cnt %d, nport_handle: 0x%x\n",
+	    "%s: Found sa_ctl %px, index %d, state 0x%lx, tx_cnt %d, rx_cnt %d, nport_handle: 0x%x\n",
 	    __func__, sa_ctl, sa_ctl->index, sa_ctl->state,
 	    fcport->edif.tx_rekey_cnt,
 	    fcport->edif.rx_rekey_cnt, fcport->loop_id);
@@ -1448,7 +1448,7 @@ qla24xx_sadb_update(struct bsg_job *bsg_job)
 		edif_entry->timer.expires = jiffies + RX_DELAY_DELETE_TIMEOUT * HZ;
 
 		ql_dbg(ql_dbg_edif, vha, 0x911d,
-		    "%s: adding timer, entry: %p, delete sa_index %d, lid 0x%x to edif_list\n",
+		    "%s: adding timer, entry: %px, delete sa_index %d, lid 0x%x to edif_list\n",
 		    __func__, edif_entry, sa_index, nport_handle);
 
 		/*
@@ -1466,7 +1466,7 @@ qla24xx_sadb_update(struct bsg_job *bsg_job)
 		 */
 
 		ql_dbg(ql_dbg_edif, vha, 0x911d,
-		    "%s: delete sa_index %d, lid 0x%x to edif_list. bsg done ptr %p\n",
+		    "%s: delete sa_index %d, lid 0x%x to edif_list. bsg done ptr %px\n",
 		    __func__, sa_index, nport_handle, bsg_job);
 
 		edif_entry->delete_sa_index = sa_index;
@@ -1557,7 +1557,7 @@ qla24xx_sadb_update(struct bsg_job *bsg_job)
 done:
 	bsg_job->reply_len = sizeof(struct fc_bsg_reply);
 	ql_dbg(ql_dbg_edif, vha, 0x911d,
-	    "%s:status: FAIL, result: 0x%x, bsg ptr done %p\n",
+	    "%s:status: FAIL, result: 0x%x, bsg ptr done %px\n",
 	    __func__, bsg_reply->result, bsg_job);
 	bsg_job_done(bsg_job, bsg_reply->result,
 	    bsg_reply->reply_payload_rcv_len);
@@ -1989,7 +1989,7 @@ qla_edb_eventcreate(scsi_qla_host_t *vha, uint32_t dbtype,
 	if (edbnode && fcport)
 		fcport->edif.auth_state = dbtype;
 	ql_dbg(ql_dbg_edif, vha, 0x09102,
-	    "%s Doorbell produced : type=%d %p\n", __func__, dbtype, edbnode);
+	    "%s Doorbell produced : type=%d %px\n", __func__, dbtype, edbnode);
 }
 
 static struct edb_node *
@@ -2074,7 +2074,7 @@ edif_doorbell_show(struct device *dev, struct device_attribute *attr,
 			}
 
 			ql_dbg(ql_dbg_edif, vha, 0x09102,
-				"%s Doorbell consumed : type=%d %p\n",
+				"%s Doorbell consumed : type=%d %px\n",
 				__func__, dbnode->ntype, dbnode);
 			/* we're done with the db node, so free it up */
 			qla_edb_node_free(vha, dbnode);
@@ -2111,7 +2111,7 @@ qla24xx_issue_sa_replace_iocb(scsi_qla_host_t *vha, struct qla_work_evt *e)
 	uint16_t nport_handle = e->u.sa_update.nport_handle;
 
 	ql_dbg(ql_dbg_edif, vha, 0x70e6,
-	    "%s: starting,  sa_ctl: %p\n", __func__, sa_ctl);
+	    "%s: starting,  sa_ctl: %px\n", __func__, sa_ctl);
 
 	if (!sa_ctl) {
 		ql_dbg(ql_dbg_edif, vha, 0x70e6,
@@ -2134,7 +2134,7 @@ qla24xx_issue_sa_replace_iocb(scsi_qla_host_t *vha, struct qla_work_evt *e)
 	iocb_cmd->u.sa_update.sa_ctl = sa_ctl;
 
 	ql_dbg(ql_dbg_edif, vha, 0x3073,
-	    "Enter: SA REPL portid=%06x, sa_ctl %p, index %x, nport_handle: 0x%x\n",
+	    "Enter: SA REPL portid=%06x, sa_ctl %px, index %x, nport_handle: 0x%x\n",
 	    fcport->d_id.b24, sa_ctl, sa_ctl->index, nport_handle);
 	/*
 	 * if this is a sadb cleanup delete, mark it so the isr can
@@ -2144,7 +2144,7 @@ qla24xx_issue_sa_replace_iocb(scsi_qla_host_t *vha, struct qla_work_evt *e)
 		/* mark this srb as a cleanup delete */
 		sp->flags |= SRB_EDIF_CLEANUP_DELETE;
 		ql_dbg(ql_dbg_edif, vha, 0x70e6,
-		    "%s: sp 0x%p flagged as cleanup delete\n", __func__, sp);
+		    "%s: sp 0x%px flagged as cleanup delete\n", __func__, sp);
 	}
 
 	sp->type = SRB_SA_REPLACE;
@@ -2172,24 +2172,24 @@ void qla24xx_sa_update_iocb(srb_t *sp, struct sa_update_28xx *sa_update_iocb)
 	switch (sa_frame->flags & (SAU_FLG_INV | SAU_FLG_TX)) {
 	case 0:
 		ql_dbg(ql_dbg_edif, vha, 0x911d,
-		    "%s: EDIF SA UPDATE RX IOCB  vha: 0x%p  index: %d\n",
+		    "%s: EDIF SA UPDATE RX IOCB  vha: 0x%px  index: %d\n",
 		    __func__, vha, sa_frame->fast_sa_index);
 		break;
 	case 1:
 		ql_dbg(ql_dbg_edif, vha, 0x911d,
-		    "%s: EDIF SA DELETE RX IOCB  vha: 0x%p  index: %d\n",
+		    "%s: EDIF SA DELETE RX IOCB  vha: 0x%px  index: %d\n",
 		    __func__, vha, sa_frame->fast_sa_index);
 		flags |= SA_FLAG_INVALIDATE;
 		break;
 	case 2:
 		ql_dbg(ql_dbg_edif, vha, 0x911d,
-		    "%s: EDIF SA UPDATE TX IOCB  vha: 0x%p  index: %d\n",
+		    "%s: EDIF SA UPDATE TX IOCB  vha: 0x%px  index: %d\n",
 		    __func__, vha, sa_frame->fast_sa_index);
 		flags |= SA_FLAG_TX;
 		break;
 	case 3:
 		ql_dbg(ql_dbg_edif, vha, 0x911d,
-		    "%s: EDIF SA DELETE TX IOCB  vha: 0x%p  index: %d\n",
+		    "%s: EDIF SA DELETE TX IOCB  vha: 0x%px  index: %d\n",
 		    __func__, vha, sa_frame->fast_sa_index);
 		flags |= SA_FLAG_TX | SA_FLAG_INVALIDATE;
 		break;
@@ -2529,22 +2529,22 @@ qla28xx_sa_update_iocb_entry(scsi_qla_host_t *v, struct req_que *req,
 	switch (pkt->flags & (SA_FLAG_INVALIDATE | SA_FLAG_TX)) {
 	case 0:
 		ql_dbg(ql_dbg_edif, vha, 0x3063,
-		    "%s: EDIF SA UPDATE RX IOCB  vha: 0x%p  index: %d\n",
+		    "%s: EDIF SA UPDATE RX IOCB  vha: 0x%px  index: %d\n",
 		    __func__, vha, pkt->sa_index);
 		break;
 	case 1:
 		ql_dbg(ql_dbg_edif, vha, 0x3063,
-		    "%s: EDIF SA DELETE RX IOCB  vha: 0x%p  index: %d\n",
+		    "%s: EDIF SA DELETE RX IOCB  vha: 0x%px  index: %d\n",
 		    __func__, vha, pkt->sa_index);
 		break;
 	case 2:
 		ql_dbg(ql_dbg_edif, vha, 0x3063,
-		    "%s: EDIF SA UPDATE TX IOCB  vha: 0x%p  index: %d\n",
+		    "%s: EDIF SA UPDATE TX IOCB  vha: 0x%px  index: %d\n",
 		    __func__, vha, pkt->sa_index);
 		break;
 	case 3:
 		ql_dbg(ql_dbg_edif, vha, 0x3063,
-		    "%s: EDIF SA DELETE TX IOCB  vha: 0x%p  index: %d\n",
+		    "%s: EDIF SA DELETE TX IOCB  vha: 0x%px  index: %d\n",
 		    __func__, vha, pkt->sa_index);
 		break;
 	}
@@ -2569,13 +2569,13 @@ qla28xx_sa_update_iocb_entry(scsi_qla_host_t *v, struct req_que *req,
 		edif_entry = qla_edif_list_find_sa_index(sp->fcport, nport_handle);
 		if (edif_entry) {
 			ql_dbg(ql_dbg_edif, vha, 0x5033,
-			    "%s: removing edif_entry %p, new sa_index: 0x%x\n",
+			    "%s: removing edif_entry %px, new sa_index: 0x%x\n",
 			    __func__, edif_entry, pkt->sa_index);
 			qla_edif_list_delete_sa_index(sp->fcport, edif_entry);
 			del_timer(&edif_entry->timer);
 
 			ql_dbg(ql_dbg_edif, vha, 0x5033,
-			    "%s: releasing edif_entry %p, new sa_index: 0x%x\n",
+			    "%s: releasing edif_entry %px, new sa_index: 0x%x\n",
 			    __func__, edif_entry, pkt->sa_index);
 
 			kfree(edif_entry);
@@ -2656,7 +2656,7 @@ qla28xx_sa_update_iocb_entry(scsi_qla_host_t *v, struct req_que *req,
 			qla_edif_free_sa_ctl(sp->fcport, sa_ctl, sa_ctl->index);
 		} else {
 			ql_dbg(ql_dbg_edif, vha, 0x3063,
-			    "%s: sa_ctl NOT freed, sa_ctl: %p\n",
+			    "%s: sa_ctl NOT freed, sa_ctl: %px\n",
 			    __func__, sa_ctl);
 		}
 		ql_dbg(ql_dbg_edif, vha, 0x3063,
@@ -2720,7 +2720,7 @@ qla28xx_start_scsi_edif(srb_t *sp)
 		if (qla2x00_marker(vha, sp->qpair, 0, 0, MK_SYNC_ALL) !=
 			QLA_SUCCESS) {
 			ql_log(ql_log_warn, vha, 0x300c,
-			    "qla2x00_marker failed for cmd=%p.\n", cmd);
+			    "qla2x00_marker failed for cmd=%px.\n", cmd);
 			return QLA_FUNCTION_FAILED;
 		}
 		vha->marker_needed = 0;
@@ -2769,7 +2769,7 @@ qla28xx_start_scsi_edif(srb_t *sp)
 	    mempool_alloc(ha->ctx_mempool, GFP_ATOMIC);
 	if (!ctx) {
 		ql_log(ql_log_fatal, vha, 0x3010,
-		    "Failed to allocate ctx for cmd=%p.\n", cmd);
+		    "Failed to allocate ctx for cmd=%px.\n", cmd);
 		goto queuing_error;
 	}
 
@@ -2778,7 +2778,7 @@ qla28xx_start_scsi_edif(srb_t *sp)
 	    GFP_ATOMIC, &ctx->fcp_cmnd_dma);
 	if (!ctx->fcp_cmnd) {
 		ql_log(ql_log_fatal, vha, 0x3011,
-		    "Failed to allocate fcp_cmnd for cmd=%p.\n", cmd);
+		    "Failed to allocate fcp_cmnd for cmd=%px.\n", cmd);
 		goto queuing_error;
 	}
 
@@ -2989,7 +2989,7 @@ static uint16_t qla_edif_sadb_get_sa_index(fc_port_t *fcport,
 	uint16_t nport_handle = fcport->loop_id;
 
 	ql_dbg(ql_dbg_edif, vha, 0x3063,
-	    "%s: entry  fc_port: %p, nport_handle: 0x%x\n",
+	    "%s: entry  fc_port: %px, nport_handle: 0x%x\n",
 	    __func__, fcport, nport_handle);
 
 	if (dir)
@@ -3197,7 +3197,7 @@ static void __chk_edif_rx_sa_delete_pending(scsi_qla_host_t *vha,
 	sa_ctl = qla_edif_find_sa_ctl_by_index(fcport, delete_sa_index, 0);
 	if (sa_ctl) {
 		ql_dbg(ql_dbg_edif, vha, 0x3063,
-		    "%s: POST SA DELETE sa_ctl: %p, index recvd %d\n",
+		    "%s: POST SA DELETE sa_ctl: %px, index recvd %d\n",
 		    __func__, sa_ctl, sa_index);
 		ql_dbg(ql_dbg_edif, vha, 0x3063,
 		    "delete index %d, update index: %d, nport handle: 0x%x, handle: 0x%x\n",
@@ -3368,7 +3368,7 @@ int qla_edif_process_els(scsi_qla_host_t *vha, struct bsg_job *bsg_job)
 	rval = qla2x00_start_sp(sp);
 
 	ql_dbg(ql_dbg_edif, vha, 0x700a,
-	    "%s %s %8phN xchg %x ctlflag %x hdl %x reqlen %xh bsg ptr %p\n",
+	    "%s %s %8phN xchg %x ctlflag %x hdl %x reqlen %xh bsg ptr %px\n",
 	    __func__, sc_to_str(p->e.sub_cmd), fcport->port_name,
 	    p->e.extra_rx_xchg_address, p->e.extra_control_flags,
 	    sp->handle, sp->remap.req.len, bsg_job);
drivers/scsi/qla2xxx/qla_gs.c +1 -1
index b16b7d16be12..b0b15fac5f3b 100644
@@ -3861,7 +3861,7 @@ static int qla24xx_async_gnnft(scsi_qla_host_t *vha, struct srb *sp,
 
 	if (!sp->u.iocb_cmd.u.ctarg.req || !sp->u.iocb_cmd.u.ctarg.rsp) {
 		ql_log(ql_log_warn, vha, 0xffff,
-		    "%s: req %p rsp %p are not setup\n",
+		    "%s: req %px rsp %px are not setup\n",
 		    __func__, sp->u.iocb_cmd.u.ctarg.req,
 		    sp->u.iocb_cmd.u.ctarg.rsp);
 		spin_lock_irqsave(&vha->work_lock, flags);
drivers/scsi/qla2xxx/qla_init.c +9 -9
index ad0d3f536a31..24683ac1a620 100644
@@ -1610,7 +1610,7 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
 	u16 sec;
 
 	ql_dbg(ql_dbg_disc, vha, 0x20d8,
-	    "%s %8phC DS %d LS %d P %d fl %x confl %p rscn %d|%d login %d lid %d scan %d\n",
+	    "%s %8phC DS %d LS %d P %d fl %x confl %px rscn %d|%d login %d lid %d scan %d\n",
 	    __func__, fcport->port_name, fcport->disc_state,
 	    fcport->fw_login_state, fcport->login_pause, fcport->flags,
 	    fcport->conflict, fcport->last_rscn_gen, fcport->rscn_gen,
@@ -1809,7 +1809,7 @@ void qla24xx_handle_relogin_event(scsi_qla_host_t *vha,
 		return;
 
 	ql_dbg(ql_dbg_disc, vha, 0x2102,
-	    "%s %8phC DS %d LS %d P %d del %d cnfl %p rscn %d|%d login %d|%d fl %x\n",
+	    "%s %8phC DS %d LS %d P %d del %d cnfl %px rscn %d|%d login %d|%d fl %x\n",
 	    __func__, fcport->port_name, fcport->disc_state,
 	    fcport->fw_login_state, fcport->login_pause,
 	    fcport->deleted, fcport->conflict,
@@ -3169,7 +3169,7 @@ qla2x00_chip_diag(scsi_qla_host_t *vha)
 	/* Assume a failed state */
 	rval = QLA_FUNCTION_FAILED;
 
-	ql_dbg(ql_dbg_init, vha, 0x007b, "Testing device at %p.\n",
+	ql_dbg(ql_dbg_init, vha, 0x007b, "Testing device at %px.\n",
 	       &reg->flash_address);
 
 	spin_lock_irqsave(&ha->hardware_lock, flags);
@@ -3638,7 +3638,7 @@ qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha, struct req_que *req)
 		if (!req->outstanding_cmds) {
 			ql_log(ql_log_fatal, NULL, 0x0126,
 			    "Failed to allocate memory for "
-			    "outstanding_cmds for req_que %p.\n", req);
+			    "outstanding_cmds for req_que %px.\n", req);
 			req->num_outstanding_cmds = 0;
 			return QLA_FUNCTION_FAILED;
 		}
@@ -5072,7 +5072,7 @@ qla2x00_rport_del(void *data)
 	spin_unlock_irqrestore(fcport->vha->host->host_lock, flags);
 	if (rport) {
 		ql_dbg(ql_dbg_disc, fcport->vha, 0x210b,
-		    "%s %8phN. rport %p roles %x\n",
+		    "%s %8phN. rport %px roles %x\n",
 		    __func__, fcport->port_name, rport,
 		    rport->roles);
 
@@ -5678,7 +5678,7 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
 	fc_remote_port_rolechg(rport, rport_ids.roles);
 
 	ql_dbg(ql_dbg_disc, vha, 0x20ee,
-	    "%s: %8phN. rport %ld:0:%d (%p) is %s mode\n",
+	    "%s: %8phN. rport %ld:0:%d (%px) is %s mode\n",
 	    __func__, fcport->port_name, vha->host_no,
 	    rport->scsi_target_id, rport,
 	    (fcport->port_type == FCT_TARGET) ? "tgt" :
@@ -6884,7 +6884,7 @@ qla2xxx_mctp_dump(scsi_qla_host_t *vha)
 		    "Failed to capture mctp dump\n");
 	} else {
 		ql_log(ql_log_info, vha, 0x5070,
-		    "Mctp dump capture for host (%ld/%p).\n",
+		    "Mctp dump capture for host (%ld/%px).\n",
 		    vha->host_no, ha->mctp_dump);
 		ha->mctp_dumped = 1;
 	}
@@ -6921,7 +6921,7 @@ qla2x00_quiesce_io(scsi_qla_host_t *vha)
 	struct scsi_qla_host *vp;
 
 	ql_dbg(ql_dbg_dpc, vha, 0x401d,
-	    "Quiescing I/O - ha=%p.\n", ha);
+	    "Quiescing I/O - ha=%px.\n", ha);
 
 	atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);
 	if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
@@ -6958,7 +6958,7 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
 	vha->qla_stats.total_isp_aborts++;
 
 	ql_log(ql_log_info, vha, 0x00af,
-	    "Performing ISP error recovery - ha=%p.\n", ha);
+	    "Performing ISP error recovery - ha=%px.\n", ha);
 
 	ha->flags.purge_mbox = 1;
 	/* For ISP82XX, reset_chip is just disabling interrupts.
drivers/scsi/qla2xxx/qla_iocb.c +9 -9
index 625d6b237fb2..b97346bd3c2b 100644
@@ -1048,7 +1048,7 @@ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp,
 		difctx = sp->u.scmd.crc_ctx;
 		direction_to_device = cmd->sc_data_direction == DMA_TO_DEVICE;
 		ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe021,
-		  "%s: scsi_cmnd: %p, crc_ctx: %p, sp: %p\n",
+		  "%s: scsi_cmnd: %px, crc_ctx: %px, sp: %px\n",
 			__func__, cmd, difctx, sp);
 	} else if (tc) {
 		vha = tc->vha;
@@ -3018,7 +3018,7 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode,
 		goto out;
 	}
 
-	ql_dbg(ql_dbg_io, vha, 0x3073, "PLOGI %p %p\n", ptr, resp_ptr);
+	ql_dbg(ql_dbg_io, vha, 0x3073, "PLOGI %px %px\n", ptr, resp_ptr);
 
 	memset(ptr, 0, sizeof(struct els_plogi_payload));
 	memset(resp_ptr, 0, sizeof(struct els_plogi_payload));
@@ -3327,7 +3327,7 @@ qla82xx_start_scsi(srb_t *sp)
 		if (qla2x00_marker(vha, ha->base_qpair,
 			0, 0, MK_SYNC_ALL) != QLA_SUCCESS) {
 			ql_log(ql_log_warn, vha, 0x300c,
-			    "qla2x00_marker failed for cmd=%p.\n", cmd);
+			    "qla2x00_marker failed for cmd=%px.\n", cmd);
 			return QLA_FUNCTION_FAILED;
 		}
 		vha->marker_needed = 0;
@@ -3360,7 +3360,7 @@ qla82xx_start_scsi(srb_t *sp)
 		more_dsd_lists = qla24xx_calc_dsd_lists(tot_dsds);
 		if ((more_dsd_lists + ha->gbl_dsd_inuse) >= NUM_DSD_CHAIN) {
 			ql_dbg(ql_dbg_io, vha, 0x300d,
-			    "Num of DSD list %d is than %d for cmd=%p.\n",
+			    "Num of DSD list %d is than %d for cmd=%px.\n",
 			    more_dsd_lists + ha->gbl_dsd_inuse, NUM_DSD_CHAIN,
 			    cmd);
 			goto queuing_error;
@@ -3376,7 +3376,7 @@ qla82xx_start_scsi(srb_t *sp)
 			if (!dsd_ptr) {
 				ql_log(ql_log_fatal, vha, 0x300e,
 				    "Failed to allocate memory for dsd_dma "
-				    "for cmd=%p.\n", cmd);
+				    "for cmd=%px.\n", cmd);
 				goto queuing_error;
 			}
 
@@ -3386,7 +3386,7 @@ qla82xx_start_scsi(srb_t *sp)
 				kfree(dsd_ptr);
 				ql_log(ql_log_fatal, vha, 0x300f,
 				    "Failed to allocate memory for dsd_addr "
-				    "for cmd=%p.\n", cmd);
+				    "for cmd=%px.\n", cmd);
 				goto queuing_error;
 			}
 			list_add_tail(&dsd_ptr->list, &ha->gbl_dsd_list);
@@ -3412,7 +3412,7 @@ qla82xx_start_scsi(srb_t *sp)
 		    mempool_alloc(ha->ctx_mempool, GFP_ATOMIC);
 		if (!ctx) {
 			ql_log(ql_log_fatal, vha, 0x3010,
-			    "Failed to allocate ctx for cmd=%p.\n", cmd);
+			    "Failed to allocate ctx for cmd=%px.\n", cmd);
 			goto queuing_error;
 		}
 
@@ -3421,7 +3421,7 @@ qla82xx_start_scsi(srb_t *sp)
 			GFP_ATOMIC, &ctx->fcp_cmnd_dma);
 		if (!ctx->fcp_cmnd) {
 			ql_log(ql_log_fatal, vha, 0x3011,
-			    "Failed to allocate fcp_cmnd for cmd=%p.\n", cmd);
+			    "Failed to allocate fcp_cmnd for cmd=%px.\n", cmd);
 			goto queuing_error;
 		}
 
@@ -3437,7 +3437,7 @@ qla82xx_start_scsi(srb_t *sp)
 				 */
 				ql_log(ql_log_warn, vha, 0x3012,
 				    "scsi cmd len %d not multiple of 4 "
-				    "for cmd=%p.\n", cmd->cmd_len, cmd);
+				    "for cmd=%px.\n", cmd->cmd_len, cmd);
 				goto queuing_error_fcp_cmnd;
 			}
 			ctx->fcp_cmnd_len = 12 + cmd->cmd_len + 4;
drivers/scsi/qla2xxx/qla_isr.c +12 -12
index e8928fd83049..8d4d174419bb 100644
@@ -2188,7 +2188,7 @@ qla24xx_els_ct_entry(scsi_qla_host_t *v, struct req_que *req,
 		type = "Driver ELS logo";
 		if (iocb_type != ELS_IOCB_TYPE) {
 			ql_dbg(ql_dbg_user, vha, 0x5047,
-			    "Completing %s: (%p) type=%d.\n",
+			    "Completing %s: (%px) type=%d.\n",
 			    type, sp, sp->type);
 			sp->done(sp, 0);
 			return;
@@ -2205,7 +2205,7 @@ qla24xx_els_ct_entry(scsi_qla_host_t *v, struct req_que *req,
 		return;
 	default:
 		ql_dbg(ql_dbg_user, vha, 0x503e,
-		    "Unrecognized SRB: (%p) type=%d.\n", sp, sp->type);
+		    "Unrecognized SRB: (%px) type=%d.\n", sp, sp->type);
 		return;
 	}
 
@@ -2808,7 +2808,7 @@ qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t par_sense_len,
 
 	if (sense_len) {
 		ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x301c,
-		    "Check condition Sense data, nexus%ld:%d:%llu cmd=%p.\n",
+		    "Check condition Sense data, nexus%ld:%d:%llu cmd=%px.\n",
 		    sp->vha->host_no, cp->device->id, cp->device->lun,
 		    cp);
 		ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302b,
@@ -2851,7 +2851,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
 	e_ref_tag = get_unaligned_le32(ep + 4);
 
 	ql_dbg(ql_dbg_io, vha, 0x3023,
-	    "iocb(s) %p Returned STATUS.\n", sts24);
+	    "iocb(s) %px Returned STATUS.\n", sts24);
 
 	ql_dbg(ql_dbg_io, vha, 0x3024,
 	    "DIF ERROR in cmd 0x%x lba 0x%llx act ref"
@@ -3136,7 +3136,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
 	if (req == NULL ||
 	    que >= find_first_zero_bit(ha->req_qid_map, ha->max_req_queues)) {
 		ql_dbg(ql_dbg_io, vha, 0x3059,
-		    "Invalid status handle (0x%x): Bad req pointer. req=%p, "
+		    "Invalid status handle (0x%x): Bad req pointer. req=%px, "
 		    "que=%u.\n", sts->handle, req, que);
 		return;
 	}
@@ -3169,7 +3169,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
 	if (sp->cmd_type != TYPE_SRB) {
 		req->outstanding_cmds[handle] = NULL;
 		ql_dbg(ql_dbg_io, vha, 0x3015,
-		    "Unknown sp->cmd_type %x %p).\n",
+		    "Unknown sp->cmd_type %x %px).\n",
 		    sp->cmd_type, sp);
 		return;
 	}
@@ -3206,7 +3206,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
 	cp = GET_CMD_SP(sp);
 	if (cp == NULL) {
 		ql_dbg(ql_dbg_io, vha, 0x3018,
-		    "Command already returned (0x%x/%p).\n",
+		    "Command already returned (0x%x/%px).\n",
 		    sts->handle, sp);
 
 		return;
@@ -3453,7 +3453,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
 
 	case CS_DMA:
 		ql_log(ql_log_info, fcport->vha, 0x3022,
-		    "CS_DMA error: 0x%x-0x%x (0x%x) nexus=%ld:%d:%llu portid=%06x oxid=0x%x cdb=%10phN len=0x%x rsp_info=0x%x resid=0x%x fw_resid=0x%x sp=%p cp=%p.\n",
+		    "CS_DMA error: 0x%x-0x%x (0x%x) nexus=%ld:%d:%llu portid=%06x oxid=0x%x cdb=%10phN len=0x%x rsp_info=0x%x resid=0x%x fw_resid=0x%x sp=%px cp=%px.\n",
 		    comp_status, scsi_status, res, vha->host_no,
 		    cp->device->id, cp->device->lun, fcport->d_id.b24,
 		    ox_id, cp->cmnd, scsi_bufflen(cp), rsp_info_len,
@@ -3471,7 +3471,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
 out:
 	if (logit)
 		ql_log(ql_log_warn, fcport->vha, 0x3022,
-		       "FCP command status: 0x%x-0x%x (0x%x) nexus=%ld:%d:%llu portid=%02x%02x%02x oxid=0x%x cdb=%10phN len=0x%x rsp_info=0x%x resid=0x%x fw_resid=0x%x sp=%p cp=%p.\n",
+		       "FCP command status: 0x%x-0x%x (0x%x) nexus=%ld:%d:%llu portid=%02x%02x%02x oxid=0x%x cdb=%10phN len=0x%x rsp_info=0x%x resid=0x%x fw_resid=0x%x sp=%px cp=%px.\n",
 		       comp_status, scsi_status, res, vha->host_no,
 		       cp->device->id, cp->device->lun, fcport->d_id.b.domain,
 		       fcport->d_id.b.area, fcport->d_id.b.al_pa, ox_id,
@@ -3509,7 +3509,7 @@ qla2x00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
 	cp = GET_CMD_SP(sp);
 	if (cp == NULL) {
 		ql_log(ql_log_warn, vha, 0x3025,
-		    "cmd is NULL: already returned to OS (sp=%p).\n", sp);
+		    "cmd is NULL: already returned to OS (sp=%px).\n", sp);
 
 		rsp->status_srb = NULL;
 		return;
@@ -4405,10 +4405,10 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
 		     ql2xmqsupport))
 			ha->mqenable = 1;
 	ql_dbg(ql_dbg_multiq, vha, 0xc005,
-	    "mqiobase=%p, max_rsp_queues=%d, max_req_queues=%d.\n",
+	    "mqiobase=%px, max_rsp_queues=%d, max_req_queues=%d.\n",
 	    ha->mqiobase, ha->max_rsp_queues, ha->max_req_queues);
 	ql_dbg(ql_dbg_init, vha, 0x0055,
-	    "mqiobase=%p, max_rsp_queues=%d, max_req_queues=%d.\n",
+	    "mqiobase=%px, max_rsp_queues=%d, max_req_queues=%d.\n",
 	    ha->mqiobase, ha->max_rsp_queues, ha->max_req_queues);
 
 msix_out:
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
index 4dd008e06617..63ca4c29c791 100644
@@ -240,7 +240,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
 	}
 
 	ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1117,
-	    "I/O Address = %p.\n", optr);
+	    "I/O Address = %px.\n", optr);
 
 	/* Issue set host interrupt command to send cmd out. */
 	ha->flags.mbox_int = 0;
drivers/scsi/qla2xxx/qla_mid.c +8 -8
index 078d596dbd49..98333f5b0807 100644
@@ -284,7 +284,7 @@ qla2x00_alert_all_vps(struct rsp_que *rsp, uint16_t *mb)
 			case MBA_POINT_TO_POINT:
 			case MBA_CHG_IN_CONNECTION:
 				ql_dbg(ql_dbg_async, vha, 0x5024,
-				    "Async_event for VP[%d], mb=0x%x vha=%p.\n",
+				    "Async_event for VP[%d], mb=0x%x vha=%px.\n",
 				    i, *mb, vha);
 				qla2x00_async_event(vha, rsp, mb);
 				break;
@@ -292,7 +292,7 @@ qla2x00_alert_all_vps(struct rsp_que *rsp, uint16_t *mb)
 			case MBA_RSCN_UPDATE:
 				if ((mb[3] & 0xff) == vha->vp_idx) {
 					ql_dbg(ql_dbg_async, vha, 0x5024,
-					    "Async_event for VP[%d], mb=0x%x vha=%p\n",
+					    "Async_event for VP[%d], mb=0x%x vha=%px\n",
 					    i, *mb, vha);
 					qla2x00_async_event(vha, rsp, mb);
 				}
@@ -549,7 +549,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)
 	host->transportt = qla2xxx_transport_vport_template;
 
 	ql_dbg(ql_dbg_vport, vha, 0xa007,
-	    "Detect vport hba %ld at address = %p.\n",
+	    "Detect vport hba %ld at address = %px.\n",
 	    vha->host_no, vha);
 
 	vha->flags.init_done = 1;
@@ -777,12 +777,12 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options,
 	req->out_ptr = (uint16_t *)(req->ring + req->length);
 	mutex_unlock(&ha->mq_lock);
 	ql_dbg(ql_dbg_multiq, base_vha, 0xc004,
-	    "ring_ptr=%p ring_index=%d, "
+	    "ring_ptr=%px ring_index=%d, "
 	    "cnt=%d id=%d max_q_depth=%d.\n",
 	    req->ring_ptr, req->ring_index,
 	    req->cnt, req->id, req->max_q_depth);
 	ql_dbg(ql_dbg_init, base_vha, 0x00de,
-	    "ring_ptr=%p ring_index=%d, "
+	    "ring_ptr=%px ring_index=%d, "
 	    "cnt=%d id=%d max_q_depth=%d.\n",
 	    req->ring_ptr, req->ring_index, req->cnt,
 	    req->id, req->max_q_depth);
@@ -866,7 +866,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options,
 	rsp->vp_idx = vp_idx;
 	rsp->hw = ha;
 	ql_dbg(ql_dbg_init, base_vha, 0x00e4,
-	    "rsp queue_id=%d rid=%d vp_idx=%d hw=%p.\n",
+	    "rsp queue_id=%d rid=%d vp_idx=%d hw=%px.\n",
 	    que_id, rsp->rid, rsp->vp_idx, rsp->hw);
 	/* Use alternate PCI bus number */
 	if (MSB(rsp->rid))
@@ -889,11 +889,11 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options,
 	rsp->in_ptr = (uint16_t *)(rsp->ring + rsp->length);
 	mutex_unlock(&ha->mq_lock);
 	ql_dbg(ql_dbg_multiq, base_vha, 0xc00b,
-	    "options=%x id=%d rsp_q_in=%p rsp_q_out=%p\n",
+	    "options=%x id=%d rsp_q_in=%px rsp_q_out=%px\n",
 	    rsp->options, rsp->id, rsp->rsp_q_in,
 	    rsp->rsp_q_out);
 	ql_dbg(ql_dbg_init, base_vha, 0x00e5,
-	    "options=%x id=%d rsp_q_in=%p rsp_q_out=%p\n",
+	    "options=%x id=%d rsp_q_in=%px rsp_q_out=%px\n",
 	    rsp->options, rsp->id, rsp->rsp_q_in,
 	    rsp->rsp_q_out);
 
drivers/scsi/qla2xxx/qla_nvme.c +9 -9
index fdac3f7fa080..6f3c0a506509 100644
@@ -98,7 +98,7 @@ static int qla_nvme_alloc_queue(struct nvme_fc_local_port *lport,
 	ha = vha->hw;
 
 	ql_log(ql_log_info, vha, 0x2104,
-	    "%s: handle %p, idx =%d, qsize %d\n",
+	    "%s: handle %px, idx =%d, qsize %d\n",
 	    __func__, handle, qidx, qsize);
 
 	if (qidx > qla_nvme_fc_transport.max_hw_queues) {
@@ -111,7 +111,7 @@ static int qla_nvme_alloc_queue(struct nvme_fc_local_port *lport,
 	if (ha->queue_pair_map[qidx]) {
 		*handle = ha->queue_pair_map[qidx];
 		ql_log(ql_log_info, vha, 0x2121,
-		    "Returning existing qpair of %p for idx=%x\n",
+		    "Returning existing qpair of %px for idx=%x\n",
 		    *handle, qidx);
 		return 0;
 	}
@@ -224,7 +224,7 @@ static void qla_nvme_abort_work(struct work_struct *work)
 	int rval;
 
 	ql_dbg(ql_dbg_io, fcport->vha, 0xffff,
-	       "%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n",
+	       "%s called for sp=%px, hndl=%x on fcport=%px deleted=%d\n",
 	       __func__, sp, sp->handle, fcport, fcport->deleted);
 
 	if (!ha->flags.fw_started || fcport->deleted)
@@ -232,7 +232,7 @@ static void qla_nvme_abort_work(struct work_struct *work)
 
 	if (ha->flags.host_shutting_down) {
 		ql_log(ql_log_info, sp->fcport->vha, 0xffff,
-		    "%s Calling done on sp: %p, type: 0x%x\n",
+		    "%s Calling done on sp: %px, type: 0x%x\n",
 		    __func__, sp, sp->type);
 		sp->done(sp, 0);
 		goto out;
@@ -241,7 +241,7 @@ static void qla_nvme_abort_work(struct work_struct *work)
 	rval = ha->isp_ops->abort_command(sp);
 
 	ql_dbg(ql_dbg_io, fcport->vha, 0x212b,
-	    "%s: %s command for sp=%p, handle=%x on fcport=%p rval=%x\n",
+	    "%s: %s command for sp=%px, handle=%x on fcport=%px rval=%x\n",
 	    __func__, (rval != QLA_SUCCESS) ? "Failed to abort" : "Aborted",
 	    sp, sp->handle, fcport, rval);
 
@@ -633,7 +633,7 @@ static void qla_nvme_localport_delete(struct nvme_fc_local_port *lport)
 	struct scsi_qla_host *vha = lport->private;
 
 	ql_log(ql_log_info, vha, 0x210f,
-	    "localport delete of %p completed.\n", vha->nvme_local_port);
+	    "localport delete of %px completed.\n", vha->nvme_local_port);
 	vha->nvme_local_port = NULL;
 	complete(&vha->nvme_del_done);
 }
@@ -648,7 +648,7 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)
 	fcport->nvme_flag &= ~NVME_FLAG_REGISTERED;
 	fcport->nvme_flag &= ~NVME_FLAG_DELETING;
 	ql_log(ql_log_info, fcport->vha, 0x2110,
-	    "remoteport_delete of %p %8phN completed.\n",
+	    "remoteport_delete of %px %8phN completed.\n",
 	    fcport, fcport->port_name);
 	complete(&fcport->nvme_del_done);
 }
@@ -680,7 +680,7 @@ void qla_nvme_unregister_remote_port(struct fc_port *fcport)
 		return;
 
 	ql_log(ql_log_warn, fcport->vha, 0x2112,
-	    "%s: unregister remoteport on %p %8phN\n",
+	    "%s: unregister remoteport on %px %8phN\n",
 	    __func__, fcport, fcport->port_name);
 
 	if (test_bit(PFLG_DRIVER_REMOVING, &fcport->vha->pci_flags))
@@ -705,7 +705,7 @@ void qla_nvme_delete(struct scsi_qla_host *vha)
 	if (vha->nvme_local_port) {
 		init_completion(&vha->nvme_del_done);
 		ql_log(ql_log_info, vha, 0x2116,
-			"unregister localport=%p\n",
+			"unregister localport=%px\n",
 			vha->nvme_local_port);
 		nv_ret = nvme_fc_unregister_localport(vha->nvme_local_port);
 		if (nv_ret)
drivers/scsi/qla2xxx/qla_os.c +41 -41

299 lines not on this page · raw message

drivers/scsi/qla2xxx/qla_sup.c +2 -2
index a0aeba69513d..4361b5e0b4fb 100644
@@ -1338,7 +1338,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *vha, __le32 *dwptr, uint32_t faddr,
 			}
 
 			ql_log(ql_log_warn, vha, 0x7097,
-			    "Failed burst-write at %x (%p/%#llx)....\n",
+			    "Failed burst-write at %x (%px/%#llx)....\n",
 			    flash_data_addr(ha, faddr), optrom,
 			    (u64)optrom_dma);
 
@@ -2927,7 +2927,7 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
 		    flash_data_addr(ha, faddr), dburst);
 		if (rval != QLA_SUCCESS) {
 			ql_log(ql_log_warn, vha, 0x7097,
-			    "Failed burst write at %x (%p/%#llx)...\n",
+			    "Failed burst write at %x (%px/%#llx)...\n",
 			    flash_data_addr(ha, faddr), optrom,
 			    (u64)optrom_dma);
 			break;
drivers/scsi/qla2xxx/qla_target.c +85 -83

649 lines not on this page · raw message

drivers/scsi/qla2xxx/qla_tmpl.c +4 -4
index 26c13a953b97..aa520ccefc3b 100644
@@ -1017,7 +1017,7 @@ qla27xx_mpi_fwdump(scsi_qla_host_t *vha, int hardware_locked)
 			buf += fwdt->dump_size;
 			walk_template_only = true;
 			ql_log(ql_log_warn, vha, 0x02f4,
-			       "-> MPI firmware already dumped -- dump saving to temporary buffer %p.\n",
+			       "-> MPI firmware already dumped -- dump saving to temporary buffer %px.\n",
 			       buf);
 		}
 
@@ -1043,7 +1043,7 @@ qla27xx_mpi_fwdump(scsi_qla_host_t *vha, int hardware_locked)
 		vha->hw->mpi_fw_dumped = 1;
 
 		ql_log(ql_log_warn, vha, 0x02f8,
-		       "-> MPI firmware dump saved to buffer (%lu/%p)\n",
+		       "-> MPI firmware dump saved to buffer (%lu/%px)\n",
 		       vha->host_no, vha->hw->mpi_fw_dump);
 		qla2x00_post_uevent_work(vha, QLA_UEVENT_CODE_FW_DUMP);
 	}
@@ -1062,7 +1062,7 @@ qla27xx_fwdump(scsi_qla_host_t *vha)
 		ql_log(ql_log_warn, vha, 0xd01e, "-> fwdump no buffer\n");
 	} else if (vha->hw->fw_dumped) {
 		ql_log(ql_log_warn, vha, 0xd01f,
-		    "-> Firmware already dumped (%p) -- ignoring request\n",
+		    "-> Firmware already dumped (%px) -- ignoring request\n",
 		    vha->hw->fw_dump);
 	} else {
 		struct fwdt *fwdt = vha->hw->fwdt;
@@ -1088,7 +1088,7 @@ qla27xx_fwdump(scsi_qla_host_t *vha)
 		vha->hw->fw_dumped = true;
 
 		ql_log(ql_log_warn, vha, 0xd015,
-		    "-> Firmware dump saved to buffer (%lu/%p) <%lx>\n",
+		    "-> Firmware dump saved to buffer (%lu/%px) <%lx>\n",
 		    vha->host_no, vha->hw->fw_dump, vha->hw->fw_dump_cap_flags);
 		qla2x00_post_uevent_work(vha, QLA_UEVENT_CODE_FW_DUMP);
 	}
drivers/scsi/qla2xxx/tcm_qla2xxx.c +9 -9
index 03de1bcf1461..3dc9438a1f21 100644
@@ -392,7 +392,7 @@ static int tcm_qla2xxx_write_pending(struct se_cmd *se_cmd)
 		 * can get ahead of this cmd. tcm_qla2xxx_aborted_task
 		 * already kick start the free.
 		 */
-		pr_debug("write_pending aborted cmd[%p] refcount %d "
+		pr_debug("write_pending aborted cmd[%px] refcount %d "
 			"transport_state %x, t_state %x, se_cmd_flags %x\n",
 			cmd, kref_read(&cmd->se_cmd.cmd_kref),
 			cmd->se_cmd.transport_state,
@@ -659,7 +659,7 @@ static int tcm_qla2xxx_queue_data_in(struct se_cmd *se_cmd)
 		 * can get ahead of this cmd. tcm_qla2xxx_aborted_task
 		 * already kick start the free.
 		 */
-		pr_debug("queue_data_in aborted cmd[%p] refcount %d "
+		pr_debug("queue_data_in aborted cmd[%px] refcount %d "
 			"transport_state %x, t_state %x, se_cmd_flags %x\n",
 			cmd, kref_read(&cmd->se_cmd.cmd_kref),
 			cmd->se_cmd.transport_state,
@@ -701,7 +701,7 @@ static int tcm_qla2xxx_queue_status(struct se_cmd *se_cmd)
 		 * already kick start the free.
 		 */
 		pr_debug(
-		    "queue_data_in aborted cmd[%p] refcount %d transport_state %x, t_state %x, se_cmd_flags %x\n",
+		    "queue_data_in aborted cmd[%px] refcount %d transport_state %x, t_state %x, se_cmd_flags %x\n",
 		    cmd, kref_read(&cmd->se_cmd.cmd_kref),
 		    cmd->se_cmd.transport_state, cmd->se_cmd.t_state,
 		    cmd->se_cmd.se_cmd_flags);
@@ -740,7 +740,7 @@ static void tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd)
 	struct qla_tgt_mgmt_cmd *mcmd = container_of(se_cmd,
 				struct qla_tgt_mgmt_cmd, se_cmd);
 
-	pr_debug("queue_tm_rsp: mcmd: %p func: 0x%02x response: 0x%02x\n",
+	pr_debug("queue_tm_rsp: mcmd: %px func: 0x%02x response: 0x%02x\n",
 			mcmd, se_tmr->function, se_tmr->response);
 	/*
 	 * Do translation between TCM TM response codes and
@@ -815,7 +815,7 @@ static void tcm_qla2xxx_clear_nacl_from_fcport_map(struct fc_port *sess)
 			       node, GFP_ATOMIC);
 	}
 
-	pr_debug("Removed from fcport_map: %p for WWNN: 0x%016LX, port_id: 0x%06x\n",
+	pr_debug("Removed from fcport_map: %px for WWNN: 0x%016LX, port_id: 0x%06x\n",
 	    se_nacl, nacl->nport_wwnn, nacl->nport_id);
 	/*
 	 * Now clear the se_nacl and session pointers from our HW lport lookup
@@ -1202,7 +1202,7 @@ static struct fc_port *tcm_qla2xxx_find_sess_by_s_id(scsi_qla_host_t *vha,
 		pr_debug("Unable to locate s_id: 0x%06x\n", key);
 		return NULL;
 	}
-	pr_debug("find_sess_by_s_id: located se_nacl: %p, initiatorname: %s\n",
+	pr_debug("find_sess_by_s_id: located se_nacl: %px, initiatorname: %s\n",
 	    se_nacl, se_nacl->initiatorname);
 
 	nacl = container_of(se_nacl, struct tcm_qla2xxx_nacl, se_node_acl);
@@ -1276,7 +1276,7 @@ static void tcm_qla2xxx_set_sess_by_s_id(
 	fc_port->se_sess = se_sess;
 	nacl->fc_port = fc_port;
 
-	pr_debug("Setup nacl->fc_port %p by s_id for se_nacl: %p, initiatorname: %s\n",
+	pr_debug("Setup nacl->fc_port %px by s_id for se_nacl: %px, initiatorname: %s\n",
 	    nacl->fc_port, new_se_nacl, new_se_nacl->initiatorname);
 }
 
@@ -1379,7 +1379,7 @@ static void tcm_qla2xxx_set_sess_by_loop_id(
 	if (nacl->fc_port != fc_port)
 		nacl->fc_port = fc_port;
 
-	pr_debug("Setup nacl->fc_port %p by loop_id for se_nacl: %p, initiatorname: %s\n",
+	pr_debug("Setup nacl->fc_port %px by loop_id for se_nacl: %px, initiatorname: %s\n",
 	    nacl->fc_port, new_se_nacl, new_se_nacl->initiatorname);
 }
 
@@ -1516,7 +1516,7 @@ static void tcm_qla2xxx_update_sess(struct fc_port *sess, port_id_t s_id,
 
 
 	if (sess->loop_id != loop_id || sess->d_id.b24 != s_id.b24)
-		pr_info("Updating session %p from port %8phC loop_id %d -> %d s_id %x:%x:%x -> %x:%x:%x\n",
+		pr_info("Updating session %px from port %8phC loop_id %d -> %d s_id %x:%x:%x -> %x:%x:%x\n",
 		    sess, sess->port_name,
 		    sess->loop_id, loop_id, sess->d_id.b.domain,
 		    sess->d_id.b.area, sess->d_id.b.al_pa, s_id.b.domain,
Signature · 1 line
2.19.0.rc0
author maintainer
#3 lore raw

PATCH v2 3/14 qla2xxx: adjust request/response queue size for 28xx

In reply to Nilesh Javali

From: Quinn Tran <[email protected]>

adjust request/respond queue size for 28xx to match 27xx adapter.

---
 drivers/scsi/qla2xxx/qla_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +2 -2
index 53e9eea031bd..921bd4d127f4 100644
@@ -3065,8 +3065,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		ha->portnum = PCI_FUNC(ha->pdev->devfn);
 		ha->max_fibre_devices = MAX_FIBRE_DEVICES_2400;
 		ha->mbx_count = MAILBOX_REGISTER_COUNT;
-		req_length = REQUEST_ENTRY_CNT_24XX;
-		rsp_length = RESPONSE_ENTRY_CNT_2300;
+		req_length = REQUEST_ENTRY_CNT_83XX;
+		rsp_length = RESPONSE_ENTRY_CNT_83XX;
 		ha->tgt.atio_q_length = ATIO_ENTRY_CNT_24XX;
 		ha->max_loop_id = SNS_LAST_LOOP_ID_2300;
 		ha->init_cb_size = sizeof(struct mid_init_cb_81xx);
Signature · 1 line
2.19.0.rc0
author maintainer
#4 lore raw

PATCH v2 4/14 qla2xxx: Changes to support FCP2 Target

In reply to Nilesh Javali

From: Saurav Kashyap <[email protected]>

Add changes to support FCP2 Target.

---
 drivers/scsi/qla2xxx/qla_dbg.c  |  3 +--
 drivers/scsi/qla2xxx/qla_init.c |  6 ++++++
 drivers/scsi/qla2xxx/qla_os.c   | 10 ++++++++++
 3 files changed, 17 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_dbg.c +1 -2
index f2d05592c1e2..25549a8a2d72 100644
@@ -12,8 +12,7 @@
  * ----------------------------------------------------------------------
  * | Module Init and Probe        |       0x0199       |                |
  * | Mailbox commands             |       0x1206       | 0x11a5-0x11ff	|
- * | Device Discovery             |       0x2134       | 0x210e-0x2116  |
- * |				  | 		       | 0x211a         |
+ * | Device Discovery             |       0x2134       | 0x210e-0x2115  |
  * |                              |                    | 0x211c-0x2128  |
  * |                              |                    | 0x212c-0x2134  |
  * | Queue Command and IO tracing |       0x3074       | 0x300b         |
drivers/scsi/qla2xxx/qla_init.c +6 -0
index 24683ac1a620..8fa0cc3fcca0 100644
@@ -1787,6 +1787,12 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea)
 
 	fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1);
 	if (fcport) {
+		if (fcport->flags & FCF_FCP2_DEVICE) {
+			ql_dbg(ql_dbg_disc, vha, 0x2115,
+			       "Delaying session delete for FCP2 portid=%06x %8phC ",
+			       fcport->d_id.b24, fcport->port_name);
+			return;
+		}
 		fcport->scan_needed = 1;
 		fcport->rscn_gen++;
 	}
drivers/scsi/qla2xxx/qla_os.c +10 -0
index 921bd4d127f4..3b8230c35f26 100644
@@ -3981,6 +3981,16 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
 	    "Mark all dev lost\n");
 
 	list_for_each_entry(fcport, &vha->vp_fcports, list) {
+		if (fcport->loop_id != FC_NO_LOOP_ID &&
+		    (fcport->flags & FCF_FCP2_DEVICE) &&
+		    fcport->port_type == FCT_TARGET &&
+		    !qla2x00_reset_active(vha)) {
+			ql_dbg(ql_dbg_disc, vha, 0x211a,
+			       "Delaying session delete for FCP2 flags 0x%x port_type = 0x%x port_id=%06x %phC",
+			       fcport->flags, fcport->port_type,
+			       fcport->d_id.b24, fcport->port_name);
+			continue;
+		}
 		fcport->scan_state = 0;
 		qlt_schedule_sess_for_deletion(fcport);
 	}
Signature · 1 line
2.19.0.rc0
author maintainer
#5 lore raw

PATCH v2 5/14 qla2xxx: Show OS name and version in FDMI-1

In reply to Nilesh Javali

From: Arun Easi <[email protected]>

To be consistent with other OS drivers, register OS name and version in FDMI-1 fabric registration.

---
 drivers/scsi/qla2xxx/qla_def.h | 2 +-
 drivers/scsi/qla2xxx/qla_gs.c  | 4 ++--
 drivers/scsi/qla2xxx/qla_os.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +1 -1
index af0e8be0eb9b..c081bf1c7578 100644
@@ -2790,7 +2790,7 @@ static const char * const port_dstate_str[] = {
 /*
  * FDMI HBA attribute types.
  */
-#define FDMI1_HBA_ATTR_COUNT			9
+#define FDMI1_HBA_ATTR_COUNT			10
 #define FDMI2_HBA_ATTR_COUNT			17
 
 #define FDMI_HBA_NODE_NAME			0x1
drivers/scsi/qla2xxx/qla_gs.c +2 -2
index b0b15fac5f3b..c37478f1b538 100644
@@ -1730,8 +1730,6 @@ qla2x00_hba_attributes(scsi_qla_host_t *vha, void *entries,
 	size += alen;
 	ql_dbg(ql_dbg_disc, vha, 0x20a8,
 	    "FIRMWARE VERSION = %s.\n", eiter->a.fw_version);
-	if (callopt == CALLOPT_FDMI1)
-		goto done;
 	/* OS Name and Version */
 	eiter = entries + size;
 	eiter->type = cpu_to_be16(FDMI_HBA_OS_NAME_AND_VERSION);
@@ -1754,6 +1752,8 @@ qla2x00_hba_attributes(scsi_qla_host_t *vha, void *entries,
 	size += alen;
 	ql_dbg(ql_dbg_disc, vha, 0x20a9,
 	    "OS VERSION = %s.\n", eiter->a.os_version);
+	if (callopt == CALLOPT_FDMI1)
+		goto done;
 	/* MAX CT Payload Length */
 	eiter = entries + size;
 	eiter->type = cpu_to_be16(FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH);
drivers/scsi/qla2xxx/qla_os.c +1 -1
index 3b8230c35f26..995ab58d3288 100644
@@ -7990,7 +7990,7 @@ qla2x00_module_init(void)
 	BUILD_BUG_ON(sizeof(struct cmd_type_7_fx00) != 64);
 	BUILD_BUG_ON(sizeof(struct cmd_type_crc_2) != 64);
 	BUILD_BUG_ON(sizeof(struct ct_entry_24xx) != 64);
-	BUILD_BUG_ON(sizeof(struct ct_fdmi1_hba_attributes) != 2344);
+	BUILD_BUG_ON(sizeof(struct ct_fdmi1_hba_attributes) != 2604);
 	BUILD_BUG_ON(sizeof(struct ct_fdmi2_hba_attributes) != 4424);
 	BUILD_BUG_ON(sizeof(struct ct_fdmi2_port_attributes) != 4164);
 	BUILD_BUG_ON(sizeof(struct ct_fdmi_hba_attr) != 260);
Signature · 1 line
2.19.0.rc0
author maintainer
#6 lore raw

PATCH v2 6/14 qla2xxx: add debug print of 64G link speed

In reply to Nilesh Javali

From: Quinn Tran <[email protected]>

Add debug print of 64G link speed.

---
 drivers/scsi/qla2xxx/qla_isr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_isr.c +1 -1
index 8d4d174419bb..93ab686c7a30 100644
@@ -648,7 +648,7 @@ const char *
 qla2x00_get_link_speed_str(struct qla_hw_data *ha, uint16_t speed)
 {
 	static const char *const link_speeds[] = {
-		"1", "2", "?", "4", "8", "16", "32", "10"
+		"1", "2", "?", "4", "8", "16", "32", "64", "10"
 	};
 #define	QLA_LAST_SPEED (ARRAY_SIZE(link_speeds) - 1)
 
Signature · 1 line
2.19.0.rc0
author maintainer
#7 lore raw

PATCH v2 7/14 qla2xxx: fix port type info

In reply to Nilesh Javali

From: Quinn Tran <[email protected]>

Over time, fcport->port_type became flag field. The flags within this field were not defined properly. This caused external tools to read wrong info.

---
 drivers/scsi/qla2xxx/qla_def.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +3 -5
index c081bf1c7578..60702d066ed9 100644
@@ -2428,11 +2428,9 @@ struct mbx_24xx_entry {
  */
 typedef enum {
 	FCT_UNKNOWN,
-	FCT_RSCN,
-	FCT_SWITCH,
-	FCT_BROADCAST,
-	FCT_INITIATOR,
-	FCT_TARGET,
+	FCT_BROADCAST = 0x01,
+	FCT_INITIATOR = 0x02,
+	FCT_TARGET    = 0x04,
 	FCT_NVME_INITIATOR = 0x10,
 	FCT_NVME_TARGET = 0x20,
 	FCT_NVME_DISCOVERY = 0x40,
Signature · 1 line
2.19.0.rc0
author maintainer
#8 lore raw

PATCH v2 8/14 qla2xxx: fix unsafe removal from link list

In reply to Nilesh Javali

From: Quinn Tran <[email protected]>

On NPIV delete, the VPort is taken off a link list in an unsafe manner. The check for VPort refcount should be done behind lock before taking off the element.

[ 2733.016907] general protection fault: 0000 [#1] SMP NOPTI
[ 2733.016908] qla2xxx [0000:22:00.1]-7088:27: VP[4] deleted.
[ 2733.016912] CPU: 22 PID: 23481 Comm: qla2xxx_15_dpc Kdump: loaded Tainted:
G           OE KX    5.3.18-47-default #1 SLE15-SP3
[ 2733.016914] Hardware name: Dell Inc. PowerEdge R7525/0PYVT1, BIOS 2.1.4 02/17/2021
[ 2733.016929] RIP: 0010:qla2x00_abort_isp+0x90/0x850 [qla2xxx]
[ 2733.016933] RSP: 0018:ffffb9cfc91efe98 EFLAGS: 00010087
[ 2733.016935] RAX: 0000000000000292 RBX: dead000000000100 RCX: 0000000000000000
[ 2733.016936] RDX: 0000000000000001 RSI: ffff944bfeb99558 RDI: ffff944bfc4b4488
[ 2733.016937] RBP: ffff944bfc4b2868 R08: 00000000000187a2 R09: 0000000000000001
[ 2733.016937] R10: ffffb9cfc91efcc8 R11: 0000000000000001 R12: ffff944bfc4b4000
[ 2733.016938] R13: ffff944bfc4b4870 R14: ffff944bfc4b4488 R15: ffff944bda895c80
[ 2733.016939] FS:  0000000000000000(0000) GS:ffff944bfeb80000(0000) knlGS:0000000000000000
[ 2733.016940] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2733.016940] CR2: 00007fc173e74458 CR3: 0000001ff57de000 CR4: 0000000000350ee0
[ 2733.016941] Call Trace:
[ 2733.016951]   qla2xxx_pci_error_detected+0x190/0x190 [qla2xxx]
[ 2733.016957]   qla2x00_do_dpc+0x560/0xa10 [qla2xxx]
[ 2733.016962]   kthread+0x10d/0x130
[ 2733.016963]   kthread_park+0xa0/0xa0
[ 2733.016966]   ret_from_fork+0x22/0x40
---
 drivers/scsi/qla2xxx/qla_init.c | 33 +++++++++++++++++---------
 drivers/scsi/qla2xxx/qla_mid.c  | 42 ++++++++++++++++++++-------------
 drivers/scsi/qla2xxx/qla_os.c   |  6 ++---
 3 files changed, 50 insertions(+), 31 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +22 -11
index 8fa0cc3fcca0..2810274a262b 100644
@@ -6573,13 +6573,13 @@ void
 qla2x00_update_fcports(scsi_qla_host_t *base_vha)
 {
 	fc_port_t *fcport;
-	struct scsi_qla_host *vha;
+	struct scsi_qla_host *vha, *tvp;
 	struct qla_hw_data *ha = base_vha->hw;
 	unsigned long flags;
 
 	spin_lock_irqsave(&ha->vport_slock, flags);
 	/* Go with deferred removal of rport references. */
-	list_for_each_entry(vha, &base_vha->hw->vp_list, list) {
+	list_for_each_entry_safe(vha, tvp, &base_vha->hw->vp_list, list) {
 		atomic_inc(&vha->vref_count);
 		list_for_each_entry(fcport, &vha->vp_fcports, list) {
 			if (fcport->drport &&
@@ -6924,7 +6924,8 @@ void
 qla2x00_quiesce_io(scsi_qla_host_t *vha)
 {
 	struct qla_hw_data *ha = vha->hw;
-	struct scsi_qla_host *vp;
+	struct scsi_qla_host *vp, *tvp;
+	unsigned long flags;
 
 	ql_dbg(ql_dbg_dpc, vha, 0x401d,
 	    "Quiescing I/O - ha=%px.\n", ha);
@@ -6933,8 +6934,18 @@ qla2x00_quiesce_io(scsi_qla_host_t *vha)
 	if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
 		atomic_set(&vha->loop_state, LOOP_DOWN);
 		qla2x00_mark_all_devices_lost(vha);
-		list_for_each_entry(vp, &ha->vp_list, list)
+
+		spin_lock_irqsave(&ha->vport_slock, flags);
+		list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
+			atomic_inc(&vp->vref_count);
+			spin_unlock_irqrestore(&ha->vport_slock, flags);
+
 			qla2x00_mark_all_devices_lost(vp);
+
+			spin_lock_irqsave(&ha->vport_slock, flags);
+			atomic_dec(&vp->vref_count);
+		}
+		spin_unlock_irqrestore(&ha->vport_slock, flags);
 	} else {
 		if (!atomic_read(&vha->loop_down_timer))
 			atomic_set(&vha->loop_down_timer,
@@ -6949,7 +6960,7 @@ void
 qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
 {
 	struct qla_hw_data *ha = vha->hw;
-	struct scsi_qla_host *vp;
+	struct scsi_qla_host *vp, *tvp;
 	unsigned long flags;
 	fc_port_t *fcport;
 	u16 i;
@@ -7017,7 +7028,7 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
 		qla2x00_mark_all_devices_lost(vha);
 
 		spin_lock_irqsave(&ha->vport_slock, flags);
-		list_for_each_entry(vp, &ha->vp_list, list) {
+		list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
 			atomic_inc(&vp->vref_count);
 			spin_unlock_irqrestore(&ha->vport_slock, flags);
 
@@ -7039,7 +7050,7 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
 		fcport->scan_state = 0;
 	}
 	spin_lock_irqsave(&ha->vport_slock, flags);
-	list_for_each_entry(vp, &ha->vp_list, list) {
+	list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
 		atomic_inc(&vp->vref_count);
 		spin_unlock_irqrestore(&ha->vport_slock, flags);
 
@@ -7083,7 +7094,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
 	int rval;
 	uint8_t        status = 0;
 	struct qla_hw_data *ha = vha->hw;
-	struct scsi_qla_host *vp;
+	struct scsi_qla_host *vp, *tvp;
 	struct req_que *req = ha->req_q_map[0];
 	unsigned long flags;
 
@@ -7239,7 +7250,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
 		ql_dbg(ql_dbg_taskm, vha, 0x8022, "%s succeeded.\n", __func__);
 		qla2x00_configure_hba(vha);
 		spin_lock_irqsave(&ha->vport_slock, flags);
-		list_for_each_entry(vp, &ha->vp_list, list) {
+		list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
 			if (vp->vp_idx) {
 				atomic_inc(&vp->vref_count);
 				spin_unlock_irqrestore(&ha->vport_slock, flags);
@@ -8924,7 +8935,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
 {
 	int status, rval;
 	struct qla_hw_data *ha = vha->hw;
-	struct scsi_qla_host *vp;
+	struct scsi_qla_host *vp, *tvp;
 	unsigned long flags;
 
 	status = qla2x00_init_rings(vha);
@@ -8996,7 +9007,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
 		    "qla82xx_restart_isp succeeded.\n");
 
 		spin_lock_irqsave(&ha->vport_slock, flags);
-		list_for_each_entry(vp, &ha->vp_list, list) {
+		list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
 			if (vp->vp_idx) {
 				atomic_inc(&vp->vref_count);
 				spin_unlock_irqrestore(&ha->vport_slock, flags);
drivers/scsi/qla2xxx/qla_mid.c +25 -17

80 lines not on this page · raw message

drivers/scsi/qla2xxx/qla_os.c +3 -3
index 995ab58d3288..b3e1d1c587ba 100644
@@ -7533,7 +7533,7 @@ static void qla_pci_error_cleanup(scsi_qla_host_t *vha)
 	struct qla_hw_data *ha = vha->hw;
 	scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
 	struct qla_qpair *qpair = NULL;
-	struct scsi_qla_host *vp;
+	struct scsi_qla_host *vp, *tvp;
 	fc_port_t *fcport;
 	int i;
 	unsigned long flags;
@@ -7564,7 +7564,7 @@ static void qla_pci_error_cleanup(scsi_qla_host_t *vha)
 	qla2x00_mark_all_devices_lost(vha);
 
 	spin_lock_irqsave(&ha->vport_slock, flags);
-	list_for_each_entry(vp, &ha->vp_list, list) {
+	list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
 		atomic_inc(&vp->vref_count);
 		spin_unlock_irqrestore(&ha->vport_slock, flags);
 		qla2x00_mark_all_devices_lost(vp);
@@ -7578,7 +7578,7 @@ static void qla_pci_error_cleanup(scsi_qla_host_t *vha)
 		fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
 
 	spin_lock_irqsave(&ha->vport_slock, flags);
-	list_for_each_entry(vp, &ha->vp_list, list) {
+	list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) {
 		atomic_inc(&vp->vref_count);
 		spin_unlock_irqrestore(&ha->vport_slock, flags);
 		list_for_each_entry(fcport, &vp->vp_fcports, list)
Signature · 1 line
2.19.0.rc0
author maintainer
#9 lore raw

PATCH v2 9/14 qla2xxx: fix npiv create erroneous error

In reply to Nilesh Javali

From: Quinn Tran <[email protected]>

When user create multiple NPIVs, the switch capabilities field is checked before a vport is allowed to create. This field is being toggled if a switch scan is in progress. This creates erroneous reject of vport create.

---
 drivers/scsi/qla2xxx/qla_init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_init.c +3 -1
index 2810274a262b..df532c5531a9 100644
@@ -4623,11 +4623,11 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
 	/* initialize */
 	ha->min_external_loopid = SNS_FIRST_LOOP_ID;
 	ha->operating_mode = LOOP;
-	ha->switch_cap = 0;
 
 	switch (topo) {
 	case 0:
 		ql_dbg(ql_dbg_disc, vha, 0x200b, "HBA in NL topology.\n");
+		ha->switch_cap = 0;
 		ha->current_topology = ISP_CFG_NL;
 		strcpy(connect_type, "(Loop)");
 		break;
@@ -4641,6 +4641,7 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
 
 	case 2:
 		ql_dbg(ql_dbg_disc, vha, 0x200d, "HBA in N P2P topology.\n");
+		ha->switch_cap = 0;
 		ha->operating_mode = P2P;
 		ha->current_topology = ISP_CFG_N;
 		strcpy(connect_type, "(N_Port-to-N_Port)");
@@ -4657,6 +4658,7 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
 	default:
 		ql_dbg(ql_dbg_disc, vha, 0x200f,
 		    "HBA in unknown topology %x, using NL.\n", topo);
+		ha->switch_cap = 0;
 		ha->current_topology = ISP_CFG_NL;
 		strcpy(connect_type, "(Loop)");
 		break;
Signature · 1 line
2.19.0.rc0
author maintainer
#10 lore raw

PATCH v2 10/14 qla2xxx: suppress unnecessary log messages during login

In reply to Nilesh Javali

From: Arun Easi <[email protected]>

Suppress logging of retryable errors. These could still be seen if extended logging is enabled.

---
 drivers/scsi/qla2xxx/qla_init.c |  2 +-
 drivers/scsi/qla2xxx/qla_isr.c  | 23 +++++++++++++++++------
 2 files changed, 18 insertions(+), 7 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +1 -1
index df532c5531a9..4f68b4ebcbc4 100644
@@ -360,7 +360,7 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport,
 	if (NVME_TARGET(vha->hw, fcport))
 		lio->u.logio.flags |= SRB_LOGIN_SKIP_PRLI;
 
-	ql_log(ql_log_warn, vha, 0x2072,
+	ql_dbg(ql_dbg_disc, vha, 0x2072,
 	       "Async-login - %8phC hdl=%x, loopid=%x portid=%06x retries=%d.\n",
 	       fcport->port_name, sp->handle, fcport->loop_id,
 	       fcport->d_id.b24, fcport->login_retry);
drivers/scsi/qla2xxx/qla_isr.c +17 -6
index 93ab686c7a30..b0b5af21781a 100644
@@ -2326,6 +2326,7 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
 	struct srb_iocb *lio;
 	uint16_t *data;
 	uint32_t iop[2];
+	int logit = 1;
 
 	sp = qla2x00_get_sp_from_handle(vha, func, req, logio);
 	if (!sp)
@@ -2403,9 +2404,11 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
 	case LSC_SCODE_PORTID_USED:
 		data[0] = MBS_PORT_ID_USED;
 		data[1] = LSW(iop[1]);
+		logit = 0;
 		break;
 	case LSC_SCODE_NPORT_USED:
 		data[0] = MBS_LOOP_ID_USED;
+		logit = 0;
 		break;
 	case LSC_SCODE_CMD_FAILED:
 		if (iop[1] == 0x0606) {
@@ -2438,12 +2441,20 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
 		break;
 	}
 
-	ql_log(ql_log_warn, sp->vha, 0x5037,
-	       "Async-%s failed: handle=%x pid=%06x wwpn=%8phC comp_status=%x iop0=%x iop1=%x\n",
-	       type, sp->handle, fcport->d_id.b24, fcport->port_name,
-	       le16_to_cpu(logio->comp_status),
-	       le32_to_cpu(logio->io_parameter[0]),
-	       le32_to_cpu(logio->io_parameter[1]));
+	if (logit)
+		ql_log(ql_log_warn, sp->vha, 0x5037, "Async-%s failed: "
+		       "handle=%x pid=%06x wwpn=%8phC comp_status=%x iop0=%x iop1=%x\n",
+		       type, sp->handle, fcport->d_id.b24, fcport->port_name,
+		       le16_to_cpu(logio->comp_status),
+		       le32_to_cpu(logio->io_parameter[0]),
+		       le32_to_cpu(logio->io_parameter[1]));
+	else
+		ql_dbg(ql_dbg_disc, sp->vha, 0x5037, "Async-%s failed: "
+		       "handle=%x pid=%06x wwpn=%8phC comp_status=%x iop0=%x iop1=%x\n",
+		       type, sp->handle, fcport->d_id.b24, fcport->port_name,
+		       le16_to_cpu(logio->comp_status),
+		       le32_to_cpu(logio->io_parameter[0]),
+		       le32_to_cpu(logio->io_parameter[1]));
 
 logio_done:
 	sp->done(sp, 0);
Signature · 1 line
2.19.0.rc0
author maintainer
#11 lore raw

PATCH v2 11/14 qla2xxx: Changes to support kdump kernel

In reply to Nilesh Javali

From: Saurav Kashyap <[email protected]>

Don't allocate fw dump for kexec kernel. Allocate single Q for kexec kernel.

---
 drivers/scsi/qla2xxx/qla_os.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/scsi/qla2xxx/qla_os.c +6 -0
index b3e1d1c587ba..01264eebd7be 100644
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/blk-mq-pci.h>
 #include <linux/refcount.h>
+#include <linux/crash_dump.h>
 
 #include <scsi/scsi_tcq.h>
 #include <scsi/scsicam.h>
@@ -2839,6 +2840,11 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 			return ret;
 	}
 
+	if (is_kdump_kernel()) {
+		ql2xmqsupport = 0;
+		ql2xallocfwdump = 0;
+	}
+
 	/* This may fail but that's ok */
 	pci_enable_pcie_error_reporting(pdev);
 
Signature · 1 line
2.19.0.rc0
author maintainer
#12 lore raw

PATCH v2 12/14 qla2xxx: Changes to support kdump kernel for NVMe BFS

In reply to Nilesh Javali

From: Saurav Kashyap <[email protected]>

The MSI-X and MSI calls fails in kdump kernel, because of this qla2xxx_create_qpair fails leading to .create_queue callback failure. The fix is to return existing qpair instead of allocating new one and allocate single hw queue.

[   19.975838] qla2xxx [0000:d8:00.1]-00c7:11: MSI-X: Failed to enable support,
giving   up -- 16/-28.
[   19.984885] qla2xxx [0000:d8:00.1]-0037:11: Falling back-to MSI mode --
ret=-28.
[   19.992278] qla2xxx [0000:d8:00.1]-0039:11: Falling back-to INTa mode --

ret=-28.
..
..
..

[   21.141518] qla2xxx [0000:d8:00.0]-2104:2: qla_nvme_alloc_queue: handle
00000000e7ee499d, idx =1, qsize 32
[   21.151166] qla2xxx [0000:d8:00.0]-0181:2: FW/Driver is not multi-queue capable.
[   21.158558] qla2xxx [0000:d8:00.0]-2122:2: Failed to allocate qpair
[   21.164824] nvme nvme0: NVME-FC{0}: reset: Reconnect attempt failed (-22)
[   21.171612] nvme nvme0: NVME-FC{0}: Reconnect attempt in 2 seconds
---
 drivers/scsi/qla2xxx/qla_def.h  |  1 -
 drivers/scsi/qla2xxx/qla_isr.c  |  2 ++
 drivers/scsi/qla2xxx/qla_nvme.c | 40 +++++++++++++++------------------
 3 files changed, 20 insertions(+), 23 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +0 -1
index 60702d066ed9..55175e8a0749 100644
@@ -4022,7 +4022,6 @@ struct qla_hw_data {
 				/* Enabled in Driver */
 		uint32_t	scm_enabled:1;
 		uint32_t	edif_enabled:1;
-		uint32_t	max_req_queue_warned:1;
 		uint32_t	plogi_template_valid:1;
 		uint32_t	port_isolated:1;
 	} flags;
drivers/scsi/qla2xxx/qla_isr.c +2 -0
index b0b5af21781a..ba4a5bf5600a 100644
@@ -4508,6 +4508,8 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)
 		ql_dbg(ql_dbg_init, vha, 0x0125,
 		    "INTa mode: Enabled.\n");
 		ha->flags.mr_intr_valid = 1;
+		/* Set max_qpair to 0, as MSI-X and MSI in not enabled */
+		ha->max_qpairs = 0;
 	}
 
 clear_risc_ints:
drivers/scsi/qla2xxx/qla_nvme.c +18 -22
index 6f3c0a506509..94e350ef3028 100644
@@ -108,19 +108,24 @@ static int qla_nvme_alloc_queue(struct nvme_fc_local_port *lport,
 		return -EINVAL;
 	}
 
-	if (ha->queue_pair_map[qidx]) {
-		*handle = ha->queue_pair_map[qidx];
-		ql_log(ql_log_info, vha, 0x2121,
-		    "Returning existing qpair of %px for idx=%x\n",
-		    *handle, qidx);
-		return 0;
-	}
+	/* Use base qpair if max_qpairs is 0 */
+	if (!ha->max_qpairs) {
+		qpair = ha->base_qpair;
+	} else {
+		if (ha->queue_pair_map[qidx]) {
+			*handle = ha->queue_pair_map[qidx];
+			ql_log(ql_log_info, vha, 0x2121,
+			       "Returning existing qpair of %px for idx=%x\n",
+			       *handle, qidx);
+			return 0;
+		}
 
-	qpair = qla2xxx_create_qpair(vha, 5, vha->vp_idx, true);
-	if (qpair == NULL) {
-		ql_log(ql_log_warn, vha, 0x2122,
-		    "Failed to allocate qpair\n");
-		return -EINVAL;
+		qpair = qla2xxx_create_qpair(vha, 5, vha->vp_idx, true);
+		if (!qpair) {
+			ql_log(ql_log_warn, vha, 0x2122,
+			       "Failed to allocate qpair\n");
+			return -EINVAL;
+		}
 	}
 	*handle = qpair;
 
@@ -731,18 +736,9 @@ int qla_nvme_register_hba(struct scsi_qla_host *vha)
 
 	WARN_ON(vha->nvme_local_port);
 
-	if (ha->max_req_queues < 3) {
-		if (!ha->flags.max_req_queue_warned)
-			ql_log(ql_log_info, vha, 0x2120,
-			       "%s: Disabling FC-NVME due to lack of free queue pairs (%d).\n",
-			       __func__, ha->max_req_queues);
-		ha->flags.max_req_queue_warned = 1;
-		return ret;
-	}
-
 	qla_nvme_fc_transport.max_hw_queues =
 	    min((uint8_t)(qla_nvme_fc_transport.max_hw_queues),
-		(uint8_t)(ha->max_req_queues - 2));
+		(uint8_t)(ha->max_qpairs ? ha->max_qpairs : 1));
 
 	pinfo.node_name = wwn_to_u64(vha->node_name);
 	pinfo.port_name = wwn_to_u64(vha->port_name);
Signature · 1 line
2.19.0.rc0
author maintainer
#13 lore raw

PATCH v2 13/14 qla2xxx: Sync queue idx with queue_pair_map idx

In reply to Nilesh Javali

From: Saurav Kashyap <[email protected]>

The first invocation of function find_first_zero_bit will return 0 and queue_id gets set to 0.
An index of queue_pair_map also get sets to 0.

	qpair_id = find_first_zero_bit(ha->qpair_qid_map, ha->max_qpairs);

        set_bit(qpair_id, ha->qpair_qid_map);
        ha->queue_pair_map[qpair_id] = qpair;

In the alloc_queue callback driver checks the map, if queue is already allocated.

	ha->queue_pair_map[qidx]

This works fine as long as max_qpairs is greater than nvme_max_hw_queues(8). Since the size of the queue_pair_map is equal to max_qpair. In case, nr_cpus is less than 8, max_qpairs values goes less than 8, this creates wrong value returns as qpair.

[ 1572.353669] qla2xxx [0000:24:00.3]-2121:6: Returning existing qpair of 4e00000000000000 for idx=2
[ 1572.354458] general protection fault: 0000 [#1] SMP PTI
[ 1572.354461] CPU: 1 PID: 44 Comm: kworker/1:1H Kdump: loaded Tainted: G          IOE    --------- -  - 4.18.0-304.el8.x86_64 #1
[ 1572.354462] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 03/01/2013
[ 1572.354467] Workqueue: kblockd blk_mq_run_work_fn
[ 1572.354485] RIP: 0010:qla_nvme_post_cmd+0x92/0x760 [qla2xxx]
[ 1572.354486] Code: 84 24 5c 01 00 00 00 00 b8 0a 74 1e 66 83 79 48 00 0f 85 a8 03 00 00 48 8b 44 24 08 48 89 ee 4c 89 e7 8b 50 24 e8 5e 8e 00 00 <f0> 41 ff 47 04 0f ae f0 41 f6 47 24 04 74 19 f0 41 ff 4f 04 b8 f0
[ 1572.354487] RSP: 0018:ffff9c81c645fc90 EFLAGS: 00010246
[ 1572.354489] RAX: 0000000000000001 RBX: ffff8ea3e5070138 RCX: 0000000000000001
[ 1572.354490] RDX: 0000000000000001 RSI: 0000000000000001 RDI: ffff8ea4c866b800
[ 1572.354491] RBP: ffff8ea4c866b800 R08: 0000000000005010 R09: ffff8ea4c866b800
[ 1572.354492] R10: 0000000000000001 R11: 000000069d1ca3ff R12: ffff8ea4bc460000
[ 1572.354493] R13: ffff8ea3e50702b0 R14: ffff8ea4c4c16a58 R15: 4e00000000000000
[ 1572.354494] FS:  0000000000000000(0000) GS:ffff8ea4dfd00000(0000) knlGS:0000000000000000
[ 1572.354495] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1572.354496] CR2: 000055884504fa58 CR3: 00000005a1410001 CR4: 00000000000606e0
[ 1572.354497] Call Trace:
[ 1572.354503]  ? check_preempt_curr+0x62/0x90
[ 1572.354506]  ? dma_direct_map_sg+0x72/0x1f0
[ 1572.354509]  ? nvme_fc_start_fcp_op.part.32+0x175/0x460 [nvme_fc]
[ 1572.354511]  ? blk_mq_dispatch_rq_list+0x11c/0x730
[ 1572.354515]  ? __switch_to_asm+0x35/0x70
[ 1572.354516]  ? __switch_to_asm+0x41/0x70
[ 1572.354518]  ? __switch_to_asm+0x35/0x70
[ 1572.354519]  ? __switch_to_asm+0x41/0x70
[ 1572.354521]  ? __switch_to_asm+0x35/0x70
[ 1572.354522]  ? __switch_to_asm+0x41/0x70
[ 1572.354523]  ? __switch_to_asm+0x35/0x70
[ 1572.354525]  ? entry_SYSCALL_64_after_hwframe+0xb9/0xca
[ 1572.354527]  ? __switch_to_asm+0x41/0x70
[ 1572.354529]  ? __blk_mq_sched_dispatch_requests+0xc6/0x170
[ 1572.354531]  ? blk_mq_sched_dispatch_requests+0x30/0x60
[ 1572.354532]  ? __blk_mq_run_hw_queue+0x51/0xd0
[ 1572.354535]  ? process_one_work+0x1a7/0x360
[ 1572.354537]  ? create_worker+0x1a0/0x1a0
[ 1572.354538]  ? worker_thread+0x30/0x390
[ 1572.354540]  ? create_worker+0x1a0/0x1a0
[ 1572.354541]  ? kthread+0x116/0x130
[ 1572.354543]  ? kthread_flush_work_fn+0x10/0x10
[ 1572.354545]  ? ret_from_fork+0x35/0x40

Fix is to use index 0 for admin and first IO queue.

Fixes e84067d743010 (“scsi: qla2xxx: Add FC-NVMe F/W initialization and transport registration”)
---
 drivers/scsi/qla2xxx/qla_nvme.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_nvme.c +3 -2
index 94e350ef3028..04b766b8a471 100644
@@ -91,8 +91,9 @@ static int qla_nvme_alloc_queue(struct nvme_fc_local_port *lport,
 	struct qla_hw_data *ha;
 	struct qla_qpair *qpair;
 
-	if (!qidx)
-		qidx++;
+	/* Map admin queue and 1st IO queue to index 0 */
+	if (qidx)
+		qidx--;
 
 	vha = (struct scsi_qla_host *)lport->private;
 	ha = vha->hw;
Signature · 1 line
2.19.0.rc0
author maintainer
#14 lore raw

PATCH v2 14/14 qla2xxx: Update version to 10.02.06.100-k

In reply to Nilesh Javali
---
 drivers/scsi/qla2xxx/qla_version.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/qla2xxx/qla_version.h +3 -3
index 2e05dd74b5cb..8b0ace50b52f 100644
@@ -6,9 +6,9 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "10.02.00.107-k"
+#define QLA2XXX_VERSION      "10.02.06.100-k"
 
 #define QLA_DRIVER_MAJOR_VER	10
 #define QLA_DRIVER_MINOR_VER	2
-#define QLA_DRIVER_PATCH_VER	0
-#define QLA_DRIVER_BETA_VER	107
+#define QLA_DRIVER_PATCH_VER	6
+#define QLA_DRIVER_BETA_VER	100
Signature · 1 line
2.19.0.rc0
#15 lore raw
In reply to Nilesh Javali
Quoted 5 lines · Nilesh Javali

Martin,

Please apply the qla2xxx driver bug fixes to the scsi tree at your earliest convenience.

Quoted 7 lines

v2:
- Add Reviewed-by tag
- fix split of log message across lines (04/14)
- fix commit message (06/16)
- add Cc stable and Fixes tags

[...]

Applied to 5.15/scsi-queue, thanks!

[01/14] qla2xxx: Add host attribute to trigger MPI hang

        https://git.kernel.org/mkp/scsi/c/4c15442d9c06
[03/14] qla2xxx: adjust request/response queue size for 28xx
        https://git.kernel.org/mkp/scsi/c/ade660d4d506
[04/14] qla2xxx: Changes to support FCP2 Target
        https://git.kernel.org/mkp/scsi/c/44c57f205876
[05/14] qla2xxx: Show OS name and version in FDMI-1
        https://git.kernel.org/mkp/scsi/c/137316ba79a6
[06/14] qla2xxx: add debug print of 64G link speed
        https://git.kernel.org/mkp/scsi/c/85818882c3d9
[07/14] qla2xxx: fix port type info
        https://git.kernel.org/mkp/scsi/c/01c97f2dd8fb
[08/14] qla2xxx: fix unsafe removal from link list
        https://git.kernel.org/mkp/scsi/c/0c9a5f3e42f7
[09/14] qla2xxx: fix npiv create erroneous error
        https://git.kernel.org/mkp/scsi/c/a57214443f0f
[10/14] qla2xxx: suppress unnecessary log messages during login
        https://git.kernel.org/mkp/scsi/c/a5741427322b
[11/14] qla2xxx: Changes to support kdump kernel
        https://git.kernel.org/mkp/scsi/c/62e0dec59c1e
[12/14] qla2xxx: Changes to support kdump kernel for NVMe BFS
        https://git.kernel.org/mkp/scsi/c/4a0a542fe5e4
[13/14] qla2xxx: Sync queue idx with queue_pair_map idx
        https://git.kernel.org/mkp/scsi/c/c8fadf019964
[14/14] qla2xxx: Update version to 10.02.06.100-k
        https://git.kernel.org/mkp/scsi/c/bd19573e05f6
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering