From patchwork Tue Aug 10 04:37:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 495552 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FBF2C432BE for ; Tue, 10 Aug 2021 04:38:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5701261075 for ; Tue, 10 Aug 2021 04:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236047AbhHJEia (ORCPT ); Tue, 10 Aug 2021 00:38:30 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:52986 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236408AbhHJEi2 (ORCPT ); Tue, 10 Aug 2021 00:38:28 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4aNdb008544 for ; Mon, 9 Aug 2021 21:38:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=3blUEQefnlD7kWO9hFX3J6hycE6y7HRHpz2Jo7yQY2A=; b=b4qyAcDc01+QVbQ/rcDqHcCU4tq5NL5D8Fpn4T5XmpKBZiW0dP7KAnDjWTMTMVnMdrJI n4p/S5WSbDSSdP3pN5dZznoTjFl35rDt7omMNXciCWALtOY6mfF+RNkah/p4IHAjWVHE J8/ErMOauUbQfShK5DnFa7HK1tflCm4nwoFWqsM5TnsBFjA0Fm+jGVI38UarBpmd0gyS erBbVv2tkNCH6ZRPl93o5S8pBTn2VYv2VP88pMStB20BDpm7XJz0YGTZ4V/mQzuUYq9b YB8u9TRDhxNZqQ1h5Y+gTe0MBqJ1y8TafKqN133mue/K5dYkm6JzqV1IG/SFkMYCGj2g tg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf3n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:38:06 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:38:04 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:38:04 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id BEC043F709B; Mon, 9 Aug 2021 21:38:04 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4c4vB001184; Mon, 9 Aug 2021 21:38:04 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4c4DF001183; Mon, 9 Aug 2021 21:38:04 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 01/14] qla2xxx: Add host attribute to trigger MPI hang Date: Mon, 9 Aug 2021 21:37:07 -0700 Message-ID: <20210810043720.1137-2-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: tuVc4Nv3yLvmyP4GJ1fZ815ZqChrMpsn X-Proofpoint-GUID: tuVc4Nv3yLvmyP4GJ1fZ815ZqChrMpsn X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arun Easi Add a mechanism to trigger MPI pause for debugging purpose. Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_attr.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 22191e9a04a0..4a0a5b4e688d 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -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 */ From patchwork Tue Aug 10 04:37:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 495551 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4763DC4338F for ; Tue, 10 Aug 2021 04:38:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F33960E76 for ; Tue, 10 Aug 2021 04:38:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237102AbhHJEiw (ORCPT ); Tue, 10 Aug 2021 00:38:52 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:32732 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236460AbhHJEij (ORCPT ); Tue, 10 Aug 2021 00:38:39 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4aQaT008600 for ; Mon, 9 Aug 2021 21:38:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=y8c1W2s/0lMXUebvB5LE5SXUv304WMWorGR0NldvGGY=; b=PxTpMtBZaYsV5CVUu8+I/hRg7xBVyEsnt+FFGdv7bjfaaCziAXmxUZmIkl/kiu82ISgf k7XgkEBB33zY7pKSJp+BUVjVt5kJSLYS+OAzAUqN4K0n7xec8dv/NvpDlAM2OjETGcws 62NaA8QGQd6Ou4AKhUxaCIsUa2mwfMDYVbh16g8TFyaPFR3steFcIajEquOE1OM7/ST/ udPoiqLOrweeR7cbvwJwdeOTLsPlh6cXdORP2Cnn8/wC6sTzxpIjlL33G44c6UYAEMeT 7O7Cs67PyNs1/zN9M31meFmQNVVPGWsmDlnPAhMvuOAL+R5TEKN/bQSMSLj/METtW/oo gg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf47-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:38:16 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:38:15 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:38:14 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id DCAE73F70A1; Mon, 9 Aug 2021 21:38:14 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4cESo001188; Mon, 9 Aug 2021 21:38:14 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4cEIY001187; Mon, 9 Aug 2021 21:38:14 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 02/14] qla2xxx: Change %p to %px in the log messages Date: Mon, 9 Aug 2021 21:37:08 -0700 Message-ID: <20210810043720.1137-3-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: QMIvJpqewNJrblTQUraSrbY2WIOSzXuD X-Proofpoint-GUID: QMIvJpqewNJrblTQUraSrbY2WIOSzXuD X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap Improve debuggability of the log messages. Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- 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(-) diff --git a/drivers/scsi/qla2xxx/qla_edif.c b/drivers/scsi/qla2xxx/qla_edif.c index ccbe0e1bfcbc..567c3013fb1a 100644 --- a/drivers/scsi/qla2xxx/qla_edif.c +++ b/drivers/scsi/qla2xxx/qla_edif.c @@ -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); diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index b16b7d16be12..b0b15fac5f3b 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -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); diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index ad0d3f536a31..24683ac1a620 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -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", ®->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. diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 625d6b237fb2..b97346bd3c2b 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -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; diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index e8928fd83049..8d4d174419bb 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -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: diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 4dd008e06617..63ca4c29c791 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -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; diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 078d596dbd49..98333f5b0807 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -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); diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index fdac3f7fa080..6f3c0a506509 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -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) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 868037c7d608..53e9eea031bd 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -866,11 +866,11 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) if (ha->flags.pci_channel_io_perm_failure) { ql_dbg(ql_dbg_aer, vha, 0x9010, "PCI Channel IO permanent failure, exiting " - "cmd=%p.\n", cmd); + "cmd=%px.\n", cmd); cmd->result = DID_NO_CONNECT << 16; } else { ql_dbg(ql_dbg_aer, vha, 0x9011, - "EEH_Busy, Requeuing the cmd=%p.\n", cmd); + "EEH_Busy, Requeuing the cmd=%px.\n", cmd); cmd->result = DID_REQUEUE << 16; } goto qc24_fail_command; @@ -880,7 +880,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) if (rval) { cmd->result = rval; ql_dbg(ql_dbg_io + ql_dbg_verbose, vha, 0x3003, - "fc_remote_port_chkready failed for cmd=%p, rval=0x%x.\n", + "fc_remote_port_chkready failed for cmd=%px, rval=0x%x.\n", cmd, rval); goto qc24_fail_command; } @@ -888,7 +888,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) if (!vha->flags.difdix_supported && scsi_get_prot_op(cmd) != SCSI_PROT_NORMAL) { ql_dbg(ql_dbg_io, vha, 0x3004, - "DIF Cap not reg, fail DIF capable cmd's:%p.\n", + "DIF Cap not reg, fail DIF capable cmd's:%px.\n", cmd); cmd->result = DID_NO_CONNECT << 16; goto qc24_fail_command; @@ -936,7 +936,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) rval = ha->isp_ops->start_scsi(sp); if (rval != QLA_SUCCESS) { ql_dbg(ql_dbg_io + ql_dbg_verbose, vha, 0x3013, - "Start scsi failed rval=%d for cmd=%p.\n", rval, cmd); + "Start scsi failed rval=%d for cmd=%px.\n", rval, cmd); goto qc24_host_busy_free_sp; } @@ -971,7 +971,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, if (rval) { cmd->result = rval; ql_dbg(ql_dbg_io + ql_dbg_verbose, vha, 0x3076, - "fc_remote_port_chkready failed for cmd=%p, rval=0x%x.\n", + "fc_remote_port_chkready failed for cmd=%px, rval=0x%x.\n", cmd, rval); goto qc24_fail_command; } @@ -1024,7 +1024,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd, rval = ha->isp_ops->start_scsi_mq(sp); if (rval != QLA_SUCCESS) { ql_dbg(ql_dbg_io + ql_dbg_verbose, vha, 0x3078, - "Start scsi failed rval=%d for cmd=%p.\n", rval, cmd); + "Start scsi failed rval=%d for cmd=%px.\n", rval, cmd); goto qc24_host_busy_free_sp; } @@ -1129,7 +1129,7 @@ static inline int test_fcport_count(scsi_qla_host_t *vha) spin_lock_irqsave(&ha->tgt.sess_lock, flags); ql_dbg(ql_dbg_init, vha, 0x00ec, - "tgt %p, fcport_count=%d\n", + "tgt %px, fcport_count=%d\n", vha, vha->fcport_count); res = (vha->fcport_count == 0); if (res) { @@ -1286,7 +1286,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) lun = cmd->device->lun; ql_dbg(ql_dbg_taskm, vha, 0x8002, - "Aborting from RISC nexus=%ld:%d:%llu sp=%p cmd=%p handle=%x\n", + "Aborting from RISC nexus=%ld:%d:%llu sp=%px cmd=%px handle=%x\n", vha->host_no, id, lun, sp, cmd, sp->handle); /* @@ -1297,7 +1297,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) rval = ha->isp_ops->abort_command(sp); ql_dbg(ql_dbg_taskm, vha, 0x8003, - "Abort command mbx cmd=%p, rval=%x.\n", cmd, rval); + "Abort command mbx cmd=%px, rval=%x.\n", cmd, rval); /* Wait for the command completion. */ ratov_j = ha->r_a_tov/10 * 4 * 1000; @@ -1407,39 +1407,39 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type, return SUCCESS; ql_log(ql_log_info, vha, 0x8009, - "%s RESET ISSUED nexus=%ld:%d:%llu cmd=%p.\n", name, vha->host_no, + "%s RESET ISSUED nexus=%ld:%d:%llu cmd=%px.\n", name, vha->host_no, cmd->device->id, cmd->device->lun, cmd); err = 0; if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { ql_log(ql_log_warn, vha, 0x800a, - "Wait for hba online failed for cmd=%p.\n", cmd); + "Wait for hba online failed for cmd=%px.\n", cmd); goto eh_reset_failed; } err = 2; if (do_reset(fcport, cmd->device->lun, 1) != QLA_SUCCESS) { ql_log(ql_log_warn, vha, 0x800c, - "do_reset failed for cmd=%p.\n", cmd); + "do_reset failed for cmd=%px.\n", cmd); goto eh_reset_failed; } err = 3; if (qla2x00_eh_wait_for_pending_commands(vha, cmd->device->id, cmd->device->lun, type) != QLA_SUCCESS) { ql_log(ql_log_warn, vha, 0x800d, - "wait for pending cmds failed for cmd=%p.\n", cmd); + "wait for pending cmds failed for cmd=%px.\n", cmd); goto eh_reset_failed; } ql_log(ql_log_info, vha, 0x800e, - "%s RESET SUCCEEDED nexus:%ld:%d:%llu cmd=%p.\n", name, + "%s RESET SUCCEEDED nexus:%ld:%d:%llu cmd=%px.\n", name, vha->host_no, cmd->device->id, cmd->device->lun, cmd); return SUCCESS; eh_reset_failed: ql_log(ql_log_info, vha, 0x800f, - "%s RESET FAILED: %s nexus=%ld:%d:%llu cmd=%p.\n", name, + "%s RESET FAILED: %s nexus=%ld:%d:%llu cmd=%px.\n", name, reset_errors[err], vha->host_no, cmd->device->id, cmd->device->lun, cmd); vha->reset_cmd_err_cnt++; @@ -2038,7 +2038,7 @@ qla2x00_iospace_config(struct qla_hw_data *ha) pci_resource_len(ha->pdev, 3)); if (ha->mqiobase) { ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0018, - "MQIO Base=%p.\n", ha->mqiobase); + "MQIO Base=%px.\n", ha->mqiobase); /* Read MSIX vector size of the board */ pci_read_config_word(ha->pdev, QLA_PCI_MSIX_CONTROL, &msix); ha->msix_count = msix + 1; @@ -2849,7 +2849,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto disable_device; } ql_dbg_pci(ql_dbg_init, pdev, 0x000a, - "Memory allocated for ha=%p.\n", ha); + "Memory allocated for ha=%px.\n", ha); ha->pdev = pdev; INIT_LIST_HEAD(&ha->tgt.q_full_list); spin_lock_init(&ha->tgt.q_full_lock); @@ -3089,7 +3089,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->init_cb_size, ha->gid_list_info_size, ha->optrom_size, ha->nvram_npiv_size, ha->max_fibre_devices); ql_dbg_pci(ql_dbg_init, pdev, 0x001f, - "isp_ops=%p, flash_conf_off=%d, " + "isp_ops=%px, flash_conf_off=%d, " "flash_data_off=%d, nvram_conf_off=%d, nvram_data_off=%d.\n", ha->isp_ops, ha->flash_conf_off, ha->flash_data_off, ha->nvram_conf_off, ha->nvram_data_off); @@ -3100,7 +3100,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto iospace_config_failed; ql_log_pci(ql_log_info, pdev, 0x001d, - "Found an ISP%04X irq %d iobase 0x%p.\n", + "Found an ISP%04X irq %d iobase 0x%px.\n", pdev->device, pdev->irq, ha->iobase); mutex_init(&ha->vport_lock); mutex_init(&ha->mq_lock); @@ -3188,7 +3188,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ql_dbg(ql_dbg_init, base_vha, 0x0033, "max_id=%d this_id=%d " "cmd_per_len=%d unique_id=%d max_cmd_len=%d max_channel=%d " - "max_lun=%llu transportt=%p, vendor_id=%llu.\n", host->max_id, + "max_lun=%llu transportt=%px, vendor_id=%llu.\n", host->max_id, host->this_id, host->cmd_per_lun, host->unique_id, host->max_cmd_len, host->max_channel, host->max_lun, host->transportt, sht->vendor_id); @@ -3270,18 +3270,18 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) } ql_dbg(ql_dbg_multiq, base_vha, 0xc009, - "rsp_q_map=%p req_q_map=%p rsp->req=%p req->rsp=%p.\n", + "rsp_q_map=%px req_q_map=%px rsp->req=%px req->rsp=%px.\n", ha->rsp_q_map, ha->req_q_map, rsp->req, req->rsp); ql_dbg(ql_dbg_multiq, base_vha, 0xc00a, - "req->req_q_in=%p req->req_q_out=%p " - "rsp->rsp_q_in=%p rsp->rsp_q_out=%p.\n", + "req->req_q_in=%px req->req_q_out=%px " + "rsp->rsp_q_in=%px rsp->rsp_q_out=%px.\n", req->req_q_in, req->req_q_out, rsp->rsp_q_in, rsp->rsp_q_out); ql_dbg(ql_dbg_init, base_vha, 0x003e, - "rsp_q_map=%p req_q_map=%p rsp->req=%p req->rsp=%p.\n", + "rsp_q_map=%px req_q_map=%px rsp->req=%px req->rsp=%px.\n", ha->rsp_q_map, ha->req_q_map, rsp->req, req->rsp); ql_dbg(ql_dbg_init, base_vha, 0x003f, - "req->req_q_in=%p req->req_q_out=%p rsp->rsp_q_in=%p rsp->rsp_q_out=%p.\n", + "req->req_q_in=%px req->req_q_out=%px rsp->rsp_q_in=%px rsp->rsp_q_out=%px.\n", req->req_q_in, req->req_q_out, rsp->rsp_q_in, rsp->rsp_q_out); ha->wq = alloc_workqueue("qla2xxx_wq", WQ_MEM_RECLAIM, 0); @@ -3322,7 +3322,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) host->can_queue = req->num_outstanding_cmds - 10; ql_dbg(ql_dbg_init, base_vha, 0x0032, - "can_queue=%d, req=%p, mgmt_svr_loop_id=%d, sg_tablesize=%d.\n", + "can_queue=%d, req=%px, mgmt_svr_loop_id=%d, sg_tablesize=%d.\n", host->can_queue, base_vha->req, base_vha->mgmt_svr_loop_id, host->sg_tablesize); @@ -3393,7 +3393,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) "Started qla2x00_timer with " "interval=%d.\n", WATCH_INTERVAL); ql_dbg(ql_dbg_init, base_vha, 0x00f0, - "Detected hba at address=%p.\n", + "Detected hba at address=%px.\n", ha); if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) { @@ -3926,7 +3926,7 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport) if (fcport->rport) { ql_dbg(ql_dbg_disc, fcport->vha, 0x2109, - "%s %8phN. rport %p roles %x\n", + "%s %8phN. rport %px roles %x\n", __func__, fcport->port_name, fcport->rport, fcport->rport->roles); fc_remote_port_delete(fcport->rport); @@ -4049,7 +4049,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, if (!ha->ctx_mempool) goto fail_free_srb_mempool; ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0021, - "ctx_cachep=%p ctx_mempool=%p.\n", + "ctx_cachep=%px ctx_mempool=%px.\n", ctx_cachep, ha->ctx_mempool); } @@ -4066,7 +4066,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, goto fail_free_nvram; ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0022, - "init_cb=%p gid_list=%p, srb_mempool=%p s_dma_pool=%p.\n", + "init_cb=%px gid_list=%px, srb_mempool=%px s_dma_pool=%px.\n", ha->init_cb, ha->gid_list, ha->srb_mempool, ha->s_dma_pool); if (IS_P3P_TYPE(ha) || ql2xenabledif || (IS_QLA28XX(ha) && ql2xsecenable)) { @@ -4162,7 +4162,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, } ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0025, - "dl_dma_pool=%p fcp_cmnd_dma_pool=%p dif_bundl_pool=%p.\n", + "dl_dma_pool=%px fcp_cmnd_dma_pool=%px dif_bundl_pool=%px.\n", ha->dl_dma_pool, ha->fcp_cmnd_dma_pool, ha->dif_bundl_pool); } @@ -4175,7 +4175,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, if (!ha->sns_cmd) goto fail_dma_pool; ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0026, - "sns_cmd: %p.\n", ha->sns_cmd); + "sns_cmd: %px.\n", ha->sns_cmd); } else { /* Get consistent memory allocated for MS IOCB */ ha->ms_iocb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, @@ -4188,7 +4188,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, if (!ha->ct_sns) goto fail_free_ms_iocb; ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0027, - "ms_iocb=%p ct_sns=%p.\n", + "ms_iocb=%px ct_sns=%px.\n", ha->ms_iocb, ha->ct_sns); } @@ -4228,8 +4228,8 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, (*req)->rsp = *rsp; (*rsp)->req = *req; ql_dbg_pci(ql_dbg_init, ha->pdev, 0x002c, - "req=%p req->length=%d req->ring=%p rsp=%p " - "rsp->length=%d rsp->ring=%p.\n", + "req=%px req->length=%d req->ring=%px rsp=%px " + "rsp->length=%d rsp->ring=%px.\n", *req, (*req)->length, (*req)->ring, *rsp, (*rsp)->length, (*rsp)->ring); /* Allocate memory for NVRAM data for vports */ @@ -4253,7 +4253,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, if (!ha->ex_init_cb) goto fail_ex_init_cb; ql_dbg_pci(ql_dbg_init, ha->pdev, 0x002e, - "ex_init_cb=%p.\n", ha->ex_init_cb); + "ex_init_cb=%px.\n", ha->ex_init_cb); } /* Get consistent memory allocated for Special Features-CB. */ @@ -4263,7 +4263,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, if (!ha->sf_init_cb) goto fail_sf_init_cb; ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0199, - "sf_init_cb=%p.\n", ha->sf_init_cb); + "sf_init_cb=%px.\n", ha->sf_init_cb); } INIT_LIST_HEAD(&ha->gbl_dsd_list); @@ -4275,7 +4275,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, if (!ha->async_pd) goto fail_async_pd; ql_dbg_pci(ql_dbg_init, ha->pdev, 0x002f, - "async_pd=%p.\n", ha->async_pd); + "async_pd=%px.\n", ha->async_pd); } INIT_LIST_HEAD(&ha->vp_list); @@ -4289,7 +4289,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, else { qla2x00_set_reserved_loop_ids(ha); ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0123, - "loop_id_map=%p.\n", ha->loop_id_map); + "loop_id_map=%px.\n", ha->loop_id_map); } ha->sfp_data = dma_alloc_coherent(&ha->pdev->dev, @@ -4954,7 +4954,7 @@ struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *sht, sprintf(vha->host_str, "%s_%lu", QLA2XXX_DRIVER_NAME, vha->host_no); ql_dbg(ql_dbg_init, vha, 0x0041, - "Allocated the host=%p hw=%p vha=%p dev_name=%s", + "Allocated the host=%px hw=%px vha=%px dev_name=%s", vha->host, vha->hw, vha, dev_name(&(ha->pdev->dev))); diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index a0aeba69513d..4361b5e0b4fb 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -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; diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index c3a589659658..c27cc79e151c 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -202,6 +202,8 @@ struct scsi_qla_host *qla_find_host_by_d_id(struct scsi_qla_host *vha, ql_dbg(ql_dbg_tgt_mgt + ql_dbg_verbose, vha, 0xf005, "Unable to find host %06x\n", key); + ql_dbg(ql_dbg_tgt_mgt, vha, 0xf005, + "find host %06x host %px\n", key, host); return host; } @@ -291,7 +293,7 @@ static void qlt_try_to_dequeue_unknown_atios(struct scsi_qla_host *vha, list_for_each_entry_safe(u, t, &vha->unknown_atio_list, cmd_list) { if (u->aborted) { ql_dbg(ql_dbg_async, vha, 0x502e, - "Freeing unknown %s %p, because of Abort\n", + "Freeing unknown %s %px, because of Abort\n", "ATIO_TYPE7", u); qlt_send_term_exchange(vha->hw->base_qpair, NULL, &u->atio, ha_locked, 0); @@ -301,17 +303,17 @@ static void qlt_try_to_dequeue_unknown_atios(struct scsi_qla_host *vha, host = qla_find_host_by_d_id(vha, u->atio.u.isp24.fcp_hdr.d_id); if (host != NULL) { ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x502f, - "Requeuing unknown ATIO_TYPE7 %p\n", u); + "Requeuing unknown ATIO_TYPE7 %px\n", u); qlt_24xx_atio_pkt(host, &u->atio, ha_locked); } else if (tgt->tgt_stop) { ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x503a, - "Freeing unknown %s %p, because tgt is being stopped\n", + "Freeing unknown %s %px, because tgt is being stopped\n", "ATIO_TYPE7", u); qlt_send_term_exchange(vha->hw->base_qpair, NULL, &u->atio, ha_locked, 0); } else { ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x503d, - "Reschedule u %p, vha %p, host %p\n", u, vha, host); + "Reschedule u %px, vha %px, host %px\n", u, vha, host); if (!queued) { queued = 1; schedule_delayed_work(&vha->unknown_atio_work, @@ -695,7 +697,7 @@ void qla24xx_do_nack_work(struct scsi_qla_host *vha, struct qla_work_evt *e) mutex_unlock(&vha->vha_tgt.tgt_mutex); if (t) { ql_log(ql_log_info, vha, 0xd034, - "%s create sess success %p", __func__, t); + "%s create sess success %px", __func__, t); /* create sess has an extra kref */ vha->hw->tgt.tgt_ops->put_sess(e->u.nack.fcport); } @@ -775,7 +777,7 @@ void qlt_fc_port_added(struct scsi_qla_host *vha, fc_port_t *fcport) sess->local ? "local " : "", sess->port_name, sess->loop_id); ql_dbg(ql_dbg_tgt_mgt, vha, 0xf007, - "Reappeared sess %p\n", sess); + "Reappeared sess %px\n", sess); ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, fcport->loop_id, @@ -890,8 +892,8 @@ qlt_plogi_ack_link(struct scsi_qla_host *vha, struct qlt_plogi_ack_t *pla, pla->ref_count++; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf097, - "Linking sess %p [%d] wwn %8phC with PLOGI ACK to wwn %8phC" - " s_id %02x:%02x:%02x, ref=%d pla %p link %d\n", + "Linking sess %px [%d] wwn %8phC with PLOGI ACK to wwn %8phC" + " s_id %02x:%02x:%02x, ref=%d pla %px link %d\n", sess, link, sess->port_name, iocb->u.isp24.port_name, iocb->u.isp24.port_id[2], iocb->u.isp24.port_id[1], iocb->u.isp24.port_id[0], @@ -977,7 +979,7 @@ void qlt_free_session_done(struct work_struct *work) sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN]; ql_dbg(ql_dbg_disc, vha, 0xf084, - "%s: se_sess %p / sess %p from port %8phC loop_id %#04x" + "%s: se_sess %px / sess %px from port %8phC loop_id %#04x" " s_id %02x:%02x:%02x logout %d keep %d els_logo %d\n", __func__, sess->se_sess, sess, sess->port_name, sess->loop_id, sess->d_id.b.domain, sess->d_id.b.area, sess->d_id.b.al_pa, @@ -1021,7 +1023,7 @@ void qlt_free_session_done(struct work_struct *work) NULL); if (rc != QLA_SUCCESS) ql_log(ql_log_warn, vha, 0xf085, - "Schedule logo failed sess %p rc %d\n", + "Schedule logo failed sess %px rc %d\n", sess, rc); else logout_started = true; @@ -1031,7 +1033,7 @@ void qlt_free_session_done(struct work_struct *work) NULL); if (rc != QLA_SUCCESS) ql_log(ql_log_warn, vha, 0xf085, - "Schedule PRLO failed sess %p rc %d\n", + "Schedule PRLO failed sess %px rc %d\n", sess, rc); else logout_started = true; @@ -1058,7 +1060,7 @@ void qlt_free_session_done(struct work_struct *work) while (!READ_ONCE(sess->logout_completed)) { if (!traced) { ql_dbg(ql_dbg_disc, vha, 0xf086, - "%s: waiting for sess %p logout\n", + "%s: waiting for sess %px logout\n", __func__, sess); traced = true; } @@ -1074,7 +1076,7 @@ void qlt_free_session_done(struct work_struct *work) } ql_dbg(ql_dbg_disc, vha, 0xf087, - "%s: sess %p logout completed\n", __func__, sess); + "%s: sess %px logout completed\n", __func__, sess); } if (sess->logo_ack_needed) { @@ -1122,7 +1124,7 @@ void qlt_free_session_done(struct work_struct *work) if (con) { iocb = &con->iocb; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf099, - "se_sess %p / sess %p port %8phC is gone," + "se_sess %px / sess %px port %8phC is gone," " %s (ref=%d), releasing PLOGI for %8phC (ref=%d)\n", sess->se_sess, sess, sess->port_name, own ? "releasing own PLOGI" : "no own PLOGI pending", @@ -1132,7 +1134,7 @@ void qlt_free_session_done(struct work_struct *work) sess->plogi_link[QLT_PLOGI_LINK_CONFLICT] = NULL; } else { ql_dbg(ql_dbg_tgt_mgt, vha, 0xf09a, - "se_sess %p / sess %p port %8phC is gone, %s (ref=%d)\n", + "se_sess %px / sess %px port %8phC is gone, %s (ref=%d)\n", sess->se_sess, sess, sess->port_name, own ? "releasing own PLOGI" : "no own PLOGI pending", @@ -1153,7 +1155,7 @@ void qlt_free_session_done(struct work_struct *work) qla2x00_dfs_remove_rport(vha, sess); ql_dbg(ql_dbg_disc, vha, 0xf001, - "Unregistration of sess %p %8phC finished fcp_cnt %d\n", + "Unregistration of sess %px %8phC finished fcp_cnt %d\n", sess, sess->port_name, vha->fcport_count); if (tgt && (tgt->sess_count == 0)) @@ -1186,7 +1188,7 @@ void qlt_unreg_sess(struct fc_port *sess) unsigned long flags; ql_dbg(ql_dbg_disc, sess->vha, 0x210a, - "%s sess %p for deletion %8phC\n", + "%s sess %px for deletion %8phC\n", __func__, sess, sess->port_name); spin_lock_irqsave(&sess->vha->work_lock, flags); @@ -1237,14 +1239,14 @@ static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd) } ql_dbg(ql_dbg_tgt, vha, 0xe000, - "Using sess for qla_tgt_reset: %p\n", sess); + "Using sess for qla_tgt_reset: %px\n", sess); if (!sess) { res = -ESRCH; return res; } ql_dbg(ql_dbg_tgt, vha, 0xe047, - "scsi(%ld): resetting (session %p from port %8phC mcmd %x, " + "scsi(%ld): resetting (session %px from port %8phC mcmd %x, " "loop_id %d)\n", vha->host_no, sess, sess->port_name, mcmd, loop_id); @@ -1313,7 +1315,7 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess) qla24xx_chk_fcp_state(sess); ql_dbg(ql_log_warn, sess->vha, 0xe001, - "Scheduling sess %p for deletion %8phC fc4_type %x\n", + "Scheduling sess %px for deletion %8phC fc4_type %x\n", sess, sess->port_name, sess->fc4_type); WARN_ON(!queue_work(sess->vha->hw->wq, &sess->del_work)); @@ -1445,7 +1447,7 @@ static struct fc_port *qlt_create_sess( } ql_dbg(ql_dbg_tgt_mgt, vha, 0xf006, - "Adding sess %p se_sess %p to tgt %p sess_count %d\n", + "Adding sess %px se_sess %px to tgt %px sess_count %d\n", sess, sess->se_sess, vha->vha_tgt.qla_tgt, vha->vha_tgt.qla_tgt->sess_count); @@ -1489,14 +1491,14 @@ qlt_fc_port_deleted(struct scsi_qla_host *vha, fc_port_t *fcport, int max_gen) if (max_gen - sess->generation < 0) { spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags); ql_dbg(ql_dbg_tgt_mgt, vha, 0xf092, - "Ignoring stale deletion request for se_sess %p / sess %p" + "Ignoring stale deletion request for se_sess %px / sess %px" " for port %8phC, req_gen %d, sess_gen %d\n", sess->se_sess, sess, sess->port_name, max_gen, sess->generation); return; } - ql_dbg(ql_dbg_tgt_mgt, vha, 0xf008, "qla_tgt_fc_port_deleted %p", sess); + ql_dbg(ql_dbg_tgt_mgt, vha, 0xf008, "qla_tgt_fc_port_deleted %px", sess); sess->local = 1; spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags); @@ -1514,7 +1516,7 @@ static inline int test_tgt_sess_count(struct qla_tgt *tgt) */ spin_lock_irqsave(&ha->tgt.sess_lock, flags); ql_dbg(ql_dbg_tgt, tgt->vha, 0xe002, - "tgt %p, sess_count=%d\n", + "tgt %px, sess_count=%d\n", tgt, tgt->sess_count); res = (tgt->sess_count == 0); spin_unlock_irqrestore(&ha->tgt.sess_lock, flags); @@ -1540,7 +1542,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt) return -EPERM; } - ql_dbg(ql_dbg_tgt_mgt, vha, 0xe003, "Stopping target for host %ld(%p)\n", + ql_dbg(ql_dbg_tgt_mgt, vha, 0xe003, "Stopping target for host %ld(%px)\n", vha->host_no, vha); /* * Mutex needed to sync with qla_tgt_fc_port_[added,deleted]. @@ -1553,7 +1555,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt) mutex_unlock(&qla_tgt_mutex); ql_dbg(ql_dbg_tgt_mgt, vha, 0xf009, - "Waiting for sess works (tgt %p)", tgt); + "Waiting for sess works (tgt %px)", tgt); spin_lock_irqsave(&tgt->sess_work_lock, flags); while (!list_empty(&tgt->sess_works_list)) { spin_unlock_irqrestore(&tgt->sess_work_lock, flags); @@ -1563,7 +1565,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt) spin_unlock_irqrestore(&tgt->sess_work_lock, flags); ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00a, - "Waiting for tgt %p: sess_count=%d\n", tgt, tgt->sess_count); + "Waiting for tgt %px: sess_count=%d\n", tgt, tgt->sess_count); wait_event_timeout(tgt->waitQ, test_tgt_sess_count(tgt), 10*HZ); @@ -1605,7 +1607,7 @@ void qlt_stop_phase2(struct qla_tgt *tgt) mutex_unlock(&vha->vha_tgt.tgt_mutex); mutex_unlock(&tgt->ha->optrom_mutex); - ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00c, "Stop of tgt %p finished\n", + ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00c, "Stop of tgt %px finished\n", tgt); switch (vha->qlini_mode) { @@ -1665,7 +1667,7 @@ static void qlt_release(struct qla_tgt *tgt) vha->vha_tgt.qla_tgt = NULL; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00d, - "Release of tgt %p finished\n", tgt); + "Release of tgt %px finished\n", tgt); kfree(tgt); } @@ -1686,8 +1688,8 @@ static int qlt_sched_sess_work(struct qla_tgt *tgt, int type, } ql_dbg(ql_dbg_tgt_mgt, tgt->vha, 0xf00e, - "Scheduling work (type %d, prm %p)" - " to find session for param %p (size %d, tgt %p)\n", + "Scheduling work (type %d, prm %px)" + " to find session for param %px (size %d, tgt %px)\n", type, prm, param, param_size, tgt); prm->type = type; @@ -1718,7 +1720,7 @@ static void qlt_send_notify_ack(struct qla_qpair *qpair, if (!ha->flags.fw_started) return; - ql_dbg(ql_dbg_tgt, vha, 0xe004, "Sending NOTIFY_ACK (ha=%p)\n", ha); + ql_dbg(ql_dbg_tgt, vha, 0xe004, "Sending NOTIFY_ACK (ha=%px)\n", ha); pkt = (request_t *)__qla2x00_alloc_iocbs(qpair, NULL); if (!pkt) { @@ -1783,7 +1785,7 @@ static int qlt_build_abts_resp_iocb(struct qla_tgt_mgmt_cmd *mcmd) struct qla_qpair *qpair = mcmd->qpair; ql_dbg(ql_dbg_tgt, vha, 0xe006, - "Sending task mgmt ABTS response (ha=%p, status=%x)\n", + "Sending task mgmt ABTS response (ha=%px, status=%x)\n", ha, mcmd->fc_tm_rsp); rc = qlt_check_reserve_free_req(qpair, 1); @@ -1869,7 +1871,7 @@ static void qlt_24xx_send_abts_resp(struct qla_qpair *qpair, uint8_t *p; ql_dbg(ql_dbg_tgt, vha, 0xe006, - "Sending task mgmt ABTS response (ha=%p, atio=%p, status=%x\n", + "Sending task mgmt ABTS response (ha=%px, atio=%px, status=%x\n", ha, abts, status); resp = (struct abts_resp_to_24xx *)qla2x00_alloc_iocbs_ready(qpair, @@ -2260,7 +2262,7 @@ static void qlt_24xx_send_task_mgmt_ctio(struct qla_qpair *qpair, uint16_t temp; ql_dbg(ql_dbg_tgt, ha, 0xe008, - "Sending task mgmt CTIO7 (ha=%p, atio=%p, resp_code=%x\n", + "Sending task mgmt CTIO7 (ha=%px, atio=%px, resp_code=%x\n", ha, atio, resp_code); @@ -2317,7 +2319,7 @@ void qlt_send_resp_ctio(struct qla_qpair *qpair, struct qla_tgt_cmd *cmd, struct scsi_qla_host *vha = cmd->vha; ql_dbg(ql_dbg_tgt_dif, vha, 0x3066, - "Sending response CTIO7 (vha=%p, atio=%p, scsi_status=%02x, " + "Sending response CTIO7 (vha=%px, atio=%px, scsi_status=%02x, " "sense_key=%02x, asc=%02x, ascq=%02x", vha, atio, scsi_status, sense_key, asc, ascq); @@ -2382,7 +2384,7 @@ void qlt_xmit_tm_rsp(struct qla_tgt_mgmt_cmd *mcmd) bool free_mcmd = true; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf013, - "TM response mcmd (%p) status %#x state %#x", + "TM response mcmd (%px) status %#x state %#x", mcmd, mcmd->fc_tm_rsp, mcmd->flags); spin_lock_irqsave(qpair->qp_lock_ptr, flags); @@ -2755,28 +2757,28 @@ static void qlt_print_dif_err(struct qla_tgt_prm *prm) case 1: ql_dbg(ql_dbg_tgt_dif, vha, 0xe00b, "BE detected Guard TAG ERR: lba[0x%llx|%lld] len[0x%x] " - "se_cmd=%p tag[%x]", + "se_cmd=%px tag[%x]", cmd->lba, cmd->lba, cmd->num_blks, &cmd->se_cmd, cmd->atio.u.isp24.exchange_addr); break; case 2: ql_dbg(ql_dbg_tgt_dif, vha, 0xe00c, "BE detected APP TAG ERR: lba[0x%llx|%lld] len[0x%x] " - "se_cmd=%p tag[%x]", + "se_cmd=%px tag[%x]", cmd->lba, cmd->lba, cmd->num_blks, &cmd->se_cmd, cmd->atio.u.isp24.exchange_addr); break; case 3: ql_dbg(ql_dbg_tgt_dif, vha, 0xe00f, "BE detected REF TAG ERR: lba[0x%llx|%lld] len[0x%x] " - "se_cmd=%p tag[%x]", + "se_cmd=%px tag[%x]", cmd->lba, cmd->lba, cmd->num_blks, &cmd->se_cmd, cmd->atio.u.isp24.exchange_addr); break; default: ql_dbg(ql_dbg_tgt_dif, vha, 0xe010, "BE detected Dif ERR: lba[%llx|%lld] len[%x] " - "se_cmd=%p tag[%x]", + "se_cmd=%px tag[%x]", cmd->lba, cmd->lba, cmd->num_blks, &cmd->se_cmd, cmd->atio.u.isp24.exchange_addr); break; @@ -3082,7 +3084,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm) memset(pkt, 0, sizeof(*pkt)); ql_dbg_qp(ql_dbg_tgt, cmd->qpair, 0xe071, - "qla_target(%d):%s: se_cmd[%p] CRC2 prot_op[0x%x] cmd prot sg:cnt[%p:%x] lba[%llu]\n", + "qla_target(%d):%s: se_cmd[%px] CRC2 prot_op[0x%x] cmd prot sg:cnt[%px:%x] lba[%llu]\n", cmd->vp_idx, __func__, se_cmd, se_cmd->prot_op, prm->prot_sg, prm->prot_seg_cnt, se_cmd->t_task_lba); @@ -3284,7 +3286,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type, } ql_dbg_qp(ql_dbg_tgt, qpair, 0xe018, - "is_send_status=%d, cmd->bufflen=%d, cmd->sg_cnt=%d, cmd->dma_data_direction=%d se_cmd[%p] qp %d\n", + "is_send_status=%d, cmd->bufflen=%d, cmd->sg_cnt=%d, cmd->dma_data_direction=%d se_cmd[%px] qp %d\n", (xmit_type & QLA_TGT_XMIT_STATUS) ? 1 : 0, cmd->bufflen, cmd->sg_cnt, cmd->dma_data_direction, &cmd->se_cmd, qpair->id); @@ -3369,7 +3371,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type, qpair->req); ql_dbg_qp(ql_dbg_tgt, qpair, 0x305e, - "Building additional status packet 0x%p.\n", + "Building additional status packet 0x%px.\n", ctio); /* @@ -3536,7 +3538,7 @@ qlt_handle_dif_error(struct qla_qpair *qpair, struct qla_tgt_cmd *cmd, /* check appl tag */ if (cmd->e_app_tag != cmd->a_app_tag) { ql_dbg(ql_dbg_tgt_dif, vha, 0xe00d, - "App Tag ERR: cdb[%x] lba[%llx %llx] blks[%x] [Actual|Expected] Ref[%x|%x], App[%x|%x], Guard [%x|%x] cmd=%p ox_id[%04x]", + "App Tag ERR: cdb[%x] lba[%llx %llx] blks[%x] [Actual|Expected] Ref[%x|%x], App[%x|%x], Guard [%x|%x] cmd=%px ox_id[%04x]", cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, cmd->a_ref_tag, cmd->e_ref_tag, cmd->a_app_tag, cmd->e_app_tag, cmd->a_guard, cmd->e_guard, cmd, @@ -3552,7 +3554,7 @@ qlt_handle_dif_error(struct qla_qpair *qpair, struct qla_tgt_cmd *cmd, /* check ref tag */ if (cmd->e_ref_tag != cmd->a_ref_tag) { ql_dbg(ql_dbg_tgt_dif, vha, 0xe00e, - "Ref Tag ERR: cdb[%x] lba[%llx %llx] blks[%x] [Actual|Expected] Ref[%x|%x], App[%x|%x], Guard[%x|%x] cmd=%p ox_id[%04x] ", + "Ref Tag ERR: cdb[%x] lba[%llx %llx] blks[%x] [Actual|Expected] Ref[%x|%x], App[%x|%x], Guard[%x|%x] cmd=%px ox_id[%04x] ", cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, cmd->a_ref_tag, cmd->e_ref_tag, cmd->a_app_tag, cmd->e_app_tag, cmd->a_guard, cmd->e_guard, cmd, @@ -3569,7 +3571,7 @@ qlt_handle_dif_error(struct qla_qpair *qpair, struct qla_tgt_cmd *cmd, /* check guard */ if (cmd->e_guard != cmd->a_guard) { ql_dbg(ql_dbg_tgt_dif, vha, 0xe012, - "Guard ERR: cdb[%x] lba[%llx %llx] blks[%x] [Actual|Expected] Ref[%x|%x], App[%x|%x], Guard [%x|%x] cmd=%p ox_id[%04x]", + "Guard ERR: cdb[%x] lba[%llx %llx] blks[%x] [Actual|Expected] Ref[%x|%x], App[%x|%x], Guard [%x|%x] cmd=%px ox_id[%04x]", cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, cmd->a_ref_tag, cmd->e_ref_tag, cmd->a_app_tag, cmd->e_app_tag, cmd->a_guard, cmd->e_guard, cmd, @@ -3618,7 +3620,7 @@ static int __qlt_send_term_imm_notif(struct scsi_qla_host *vha, int ret = 0; ql_dbg(ql_dbg_tgt_tmr, vha, 0xe01c, - "Sending TERM ELS CTIO (ha=%p)\n", ha); + "Sending TERM ELS CTIO (ha=%px)\n", ha); pkt = (request_t *)qla2x00_alloc_iocbs(vha, NULL); if (pkt == NULL) { @@ -3683,7 +3685,7 @@ static int __qlt_send_term_exchange(struct qla_qpair *qpair, int ret = 0; uint16_t temp; - ql_dbg(ql_dbg_tgt, vha, 0xe009, "Sending TERM EXCH CTIO (ha=%p)\n", ha); + ql_dbg(ql_dbg_tgt, vha, 0xe009, "Sending TERM EXCH CTIO (ha=%px)\n", ha); if (cmd) vha = cmd->vha; @@ -3699,7 +3701,7 @@ static int __qlt_send_term_exchange(struct qla_qpair *qpair, if (cmd != NULL) { if (cmd->state < QLA_TGT_STATE_PROCESSED) { ql_dbg(ql_dbg_tgt, vha, 0xe051, - "qla_target(%d): Terminating cmd %p with " + "qla_target(%d): Terminating cmd %px with " "incorrect state %d\n", vha->vp_idx, cmd, cmd->state); } else @@ -3825,8 +3827,8 @@ int qlt_abort_cmd(struct qla_tgt_cmd *cmd) unsigned long flags; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf014, - "qla_target(%d): terminating exchange for aborted cmd=%p " - "(se_cmd=%p, tag=%llu)", vha->vp_idx, cmd, &cmd->se_cmd, + "qla_target(%d): terminating exchange for aborted cmd=%px " + "(se_cmd=%px, tag=%llu)", vha->vp_idx, cmd, &cmd->se_cmd, se_cmd->tag); spin_lock_irqsave(&cmd->cmd_lock, flags); @@ -3838,7 +3840,7 @@ int qlt_abort_cmd(struct qla_tgt_cmd *cmd) * 2) TCM TMR - drain_state_list */ ql_dbg(ql_dbg_tgt_mgt, vha, 0xf016, - "multiple abort. %p transport_state %x, t_state %x, " + "multiple abort. %px transport_state %x, t_state %x, " "se_cmd_flags %x\n", cmd, cmd->se_cmd.transport_state, cmd->se_cmd.t_state, cmd->se_cmd.se_cmd_flags); return -EIO; @@ -3857,7 +3859,7 @@ void qlt_free_cmd(struct qla_tgt_cmd *cmd) struct fc_port *sess = cmd->sess; ql_dbg(ql_dbg_tgt, cmd->vha, 0xe074, - "%s: se_cmd[%p] ox_id %04x\n", + "%s: se_cmd[%px] ox_id %04x\n", __func__, &cmd->se_cmd, be16_to_cpu(cmd->atio.u.isp24.fcp_hdr.ox_id)); @@ -3895,7 +3897,7 @@ static int qlt_term_ctio_exchange(struct qla_qpair *qpair, void *ctio, if (cmd->se_cmd.prot_op) ql_dbg(ql_dbg_tgt_dif, vha, 0xe013, "Term DIF cmd: lba[0x%llx|%lld] len[0x%x] " - "se_cmd=%p tag[%x] op %#x/%s", + "se_cmd=%px tag[%x] op %#x/%s", cmd->lba, cmd->lba, cmd->num_blks, &cmd->se_cmd, cmd->atio.u.isp24.exchange_addr, @@ -4024,7 +4026,7 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, /* They are OK */ ql_dbg(ql_dbg_tgt_mgt, vha, 0xf058, "qla_target(%d): CTIO with " - "status %#x received, state %x, se_cmd %p, " + "status %#x received, state %x, se_cmd %px, " "(LIP_RESET=e, ABORTED=2, TARGET_RESET=17, " "TIMEOUT=b, INVALID_RX_ID=8)\n", vha->vp_idx, status, cmd->state, se_cmd); @@ -4038,7 +4040,7 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059, "qla_target(%d): CTIO with %s status %x " - "received (state %x, se_cmd %p)\n", vha->vp_idx, + "received (state %x, se_cmd %px)\n", vha->vp_idx, logged_out ? "PORT LOGGED OUT" : "PORT UNAVAILABLE", status, cmd->state, se_cmd); @@ -4061,7 +4063,7 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, (struct ctio_crc_from_fw *)ctio; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf073, "qla_target(%d): CTIO with DIF_ERROR status %x " - "received (state %x, ulp_cmd %p) actual_dif[0x%llx] " + "received (state %x, ulp_cmd %px) actual_dif[0x%llx] " "expect_dif[0x%llx]\n", vha->vp_idx, status, cmd->state, se_cmd, *((u64 *)&crc->actual_dif[0]), @@ -4076,13 +4078,13 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, case CTIO_FAST_INVALID_REQ: case CTIO_FAST_SPI_ERR: ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05b, - "qla_target(%d): CTIO with EDIF error status 0x%x received (state %x, se_cmd %p\n", + "qla_target(%d): CTIO with EDIF error status 0x%x received (state %x, se_cmd %px\n", vha->vp_idx, status, cmd->state, se_cmd); break; default: ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05b, - "qla_target(%d): CTIO with error status 0x%x received (state %x, se_cmd %p\n", + "qla_target(%d): CTIO with error status 0x%x received (state %x, se_cmd %px\n", vha->vp_idx, status, cmd->state, se_cmd); break; } @@ -4115,7 +4117,7 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, } else if (cmd->aborted) { cmd->trc_flags |= TRC_CTIO_ABORTED; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01e, - "Aborted command %p (tag %lld) finished\n", cmd, se_cmd->tag); + "Aborted command %px (tag %lld) finished\n", cmd, se_cmd->tag); } else { cmd->trc_flags |= TRC_CTIO_STRANGE; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05c, @@ -4219,7 +4221,7 @@ static void __qlt_do_work(struct qla_tgt_cmd *cmd) return; out_term: - ql_dbg(ql_dbg_io, vha, 0x3060, "Terminating work cmd %p", cmd); + ql_dbg(ql_dbg_io, vha, 0x3060, "Terminating work cmd %px", cmd); /* * cmd has not sent to target yet, so pass NULL as the second * argument to qlt_send_term_exchange() and free the memory here. @@ -4399,7 +4401,7 @@ static int qlt_handle_cmd_for_atio(struct scsi_qla_host *vha, if (unlikely(tgt->tgt_stop)) { ql_dbg(ql_dbg_io, vha, 0x3061, - "New command while device %p is shutting down\n", tgt); + "New command while device %px is shutting down\n", tgt); return -ENODEV; } @@ -4415,7 +4417,7 @@ static int qlt_handle_cmd_for_atio(struct scsi_qla_host *vha, * session deletion, but it's still in sess_del_work wq */ if (sess->deleted) { ql_dbg(ql_dbg_tgt_mgt, vha, 0xf002, - "New command while old session %p is being deleted\n", + "New command while old session %px is being deleted\n", sess); return -EFAULT; } @@ -4622,7 +4624,7 @@ void qlt_logo_completion_handler(fc_port_t *fcport, int rc) { if (rc != MBS_COMMAND_COMPLETE) { ql_dbg(ql_dbg_tgt_mgt, fcport->vha, 0xf093, - "%s: se_sess %p / sess %p from" + "%s: se_sess %px / sess %px from" " port %8phC loop_id %#04x s_id %02x:%02x:%02x" " LOGO failed: %#x\n", __func__, @@ -4666,7 +4668,7 @@ qlt_find_sess_invalidate_other(scsi_qla_host_t *vha, uint64_t wwn, if (port_id.b24 == other_sess->d_id.b24) { if (loop_id != other_sess->loop_id) { ql_dbg(ql_dbg_disc, vha, 0x1000c, - "Invalidating sess %p loop_id %d wwn %llx.\n", + "Invalidating sess %px loop_id %d wwn %llx.\n", other_sess, other_sess->loop_id, other_wwn); /* @@ -4682,7 +4684,7 @@ qlt_find_sess_invalidate_other(scsi_qla_host_t *vha, uint64_t wwn, * kill the session, but don't free the loop_id */ ql_dbg(ql_dbg_disc, vha, 0xf01b, - "Invalidating sess %p loop_id %d wwn %llx.\n", + "Invalidating sess %px loop_id %d wwn %llx.\n", other_sess, other_sess->loop_id, other_wwn); other_sess->keep_nport_handle = 1; @@ -4697,7 +4699,7 @@ qlt_find_sess_invalidate_other(scsi_qla_host_t *vha, uint64_t wwn, if ((loop_id == other_sess->loop_id) && (loop_id != FC_NO_LOOP_ID)) { ql_dbg(ql_dbg_disc, vha, 0x1000d, - "Invalidating sess %p loop_id %d wwn %llx.\n", + "Invalidating sess %px loop_id %d wwn %llx.\n", other_sess, other_sess->loop_id, other_wwn); /* Same loop_id but different s_id @@ -5029,7 +5031,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha, break; default: ql_dbg(ql_dbg_tgt_mgt, vha, 0xf09b, - "PRLI with conflicting sess %p port %8phC\n", + "PRLI with conflicting sess %px port %8phC\n", conflict_sess, conflict_sess->port_name); conflict_sess->fw_login_state = DSC_LS_PORT_UNAVAIL; @@ -5090,7 +5092,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha, * while last one finishes. */ ql_log(ql_log_warn, sess->vha, 0xf095, - "sess %p PRLI received, before plogi ack.\n", + "sess %px PRLI received, before plogi ack.\n", sess); qlt_send_term_imm_notif(vha, iocb, 1); res = 0; @@ -5102,7 +5104,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha, * since we have deleted the old session during PLOGI */ ql_dbg(ql_dbg_tgt_mgt, vha, 0xf096, - "PRLI (loop_id %#04x) for existing sess %p (loop_id %#04x)\n", + "PRLI (loop_id %#04x) for existing sess %px (loop_id %#04x)\n", sess->loop_id, sess, iocb->u.isp24.nport_handle); sess->local = 0; @@ -5173,7 +5175,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha, res = qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS_SESS); ql_dbg(ql_dbg_disc, vha, 0x20fc, - "%s: logo %llx res %d sess %p ", + "%s: logo %llx res %d sess %px ", __func__, wwn, res, sess); if (res == 0) { /* @@ -5206,7 +5208,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha, iocb->u.isp24.port_name, 1); if (sess) { ql_dbg(ql_dbg_disc, vha, 0x20fd, - "sess %p lid %d|%d DS %d LS %d\n", + "sess %px lid %d|%d DS %d LS %d\n", sess, sess->loop_id, loop_id, sess->disc_state, sess->fw_login_state); } @@ -5454,7 +5456,7 @@ qlt_alloc_qfull_cmd(struct scsi_qla_host *vha, if (unlikely(tgt->tgt_stop)) { ql_dbg(ql_dbg_io, vha, 0x300a, - "New command while device %p is shutting down\n", tgt); + "New command while device %px is shutting down\n", tgt); return; } @@ -5569,7 +5571,7 @@ qlt_free_qfull_cmds(struct qla_qpair *qpair) be16_to_cpu(cmd->atio.u.isp24.fcp_hdr.ox_id)); else ql_dbg(ql_dbg_io, vha, 0x3008, - "%s: Unexpected cmd in QFull list %p\n", __func__, + "%s: Unexpected cmd in QFull list %px\n", __func__, cmd); list_move_tail(&cmd->cmd_list, &free_list); @@ -5641,7 +5643,7 @@ static void qlt_24xx_atio_pkt(struct scsi_qla_host *vha, if (unlikely(tgt == NULL)) { ql_dbg(ql_dbg_tgt, vha, 0x3064, - "ATIO pkt, but no tgt (ha %p)", ha); + "ATIO pkt, but no tgt (ha %px)", ha); return; } /* @@ -5847,7 +5849,7 @@ static void qlt_response_pkt(struct scsi_qla_host *vha, if (unlikely(tgt == NULL)) { ql_dbg(ql_dbg_tgt, vha, 0xe05d, - "qla_target(%d): Response pkt %x received, but no tgt (ha %p)\n", + "qla_target(%d): Response pkt %x received, but no tgt (ha %px)\n", vha->vp_idx, pkt->entry_type, vha->hw); return; } @@ -6381,7 +6383,7 @@ static void qlt_sess_work_fn(struct work_struct *work) struct scsi_qla_host *vha = tgt->vha; unsigned long flags; - ql_dbg(ql_dbg_tgt_mgt, vha, 0xf000, "Sess work (tgt %p)", tgt); + ql_dbg(ql_dbg_tgt_mgt, vha, 0xf000, "Sess work (tgt %px)", tgt); spin_lock_irqsave(&tgt->sess_work_lock, flags); while (!list_empty(&tgt->sess_works_list)) { @@ -6433,7 +6435,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha) } ql_dbg(ql_dbg_tgt, base_vha, 0xe03b, - "Registering target for host %ld(%p).\n", base_vha->host_no, ha); + "Registering target for host %ld(%px).\n", base_vha->host_no, ha); BUG_ON(base_vha->vha_tgt.qla_tgt != NULL); @@ -6528,7 +6530,7 @@ int qlt_remove_target(struct qla_hw_data *ha, struct scsi_qla_host *vha) /* free left over qfull cmds */ qlt_init_term_exchange(vha); - ql_dbg(ql_dbg_tgt, vha, 0xe03c, "Unregistering target for host %ld(%p)", + ql_dbg(ql_dbg_tgt, vha, 0xe03c, "Unregistering target for host %ld(%px)", vha->host_no, ha); qlt_release(vha->vha_tgt.qla_tgt); @@ -7324,7 +7326,7 @@ qlt_update_vp_map(struct scsi_qla_host *vha, int cmd) slot = btree_lookup32(&vha->hw->host_map, key); if (!slot) { ql_dbg(ql_dbg_tgt_mgt, vha, 0xf018, - "Save vha in host_map %p %06x\n", vha, key); + "Save vha in host_map %px %06x\n", vha, key); rc = btree_insert32(&vha->hw->host_map, key, vha, GFP_ATOMIC); if (rc) @@ -7334,7 +7336,7 @@ qlt_update_vp_map(struct scsi_qla_host *vha, int cmd) return; } ql_dbg(ql_dbg_tgt_mgt, vha, 0xf019, - "replace existing vha in host_map %p %06x\n", vha, key); + "replace existing vha in host_map %px %06x\n", vha, key); btree_update32(&vha->hw->host_map, key, vha); break; case RESET_VP_IDX: @@ -7344,7 +7346,7 @@ qlt_update_vp_map(struct scsi_qla_host *vha, int cmd) break; case RESET_AL_PA: ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01a, - "clear vha in host_map %p %06x\n", vha, key); + "clear vha in host_map %px %06x\n", vha, key); slot = btree_lookup32(&vha->hw->host_map, key); if (slot) btree_remove32(&vha->hw->host_map, key); diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c index 26c13a953b97..aa520ccefc3b 100644 --- a/drivers/scsi/qla2xxx/qla_tmpl.c +++ b/drivers/scsi/qla2xxx/qla_tmpl.c @@ -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); } diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 03de1bcf1461..3dc9438a1f21 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -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, From patchwork Tue Aug 10 04:37:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 494686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 571C7C4320A for ; Tue, 10 Aug 2021 04:38:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D0BE60E76 for ; Tue, 10 Aug 2021 04:38:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235432AbhHJEiz (ORCPT ); Tue, 10 Aug 2021 00:38:55 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:10020 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236408AbhHJEis (ORCPT ); Tue, 10 Aug 2021 00:38:48 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4aOZI008580 for ; Mon, 9 Aug 2021 21:38:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=d5AlEyT4jLKqNDLPRCifGZvP9kIW9Qj1PsOQhaPQtJw=; b=WauL2b7WIZl/grzVwvtHZu3SP24lRJkOvLqLbn0Vvhx9Sj5f4ypJs7LXQ/mPo1+sdw2e Hm3pHcQSuScCj1qfpCejqRClEyXFEeN9aw0H/U8ycEj/c2YqdZUUIKDLqYPHXX7GS1QO +gYcWR8j/Pnhnzzp+lR2jwSBnFS1K0WZc3HJSKBG4rw28PTS5AxjBso8Km8IPDsqYOD1 SxinjdlpHSipzxYltY/l+Ysdz2onrXNRV3J3m6jiuf7XbImCXWT/wft8hHUlmmJAahr2 TySpd8MjVbQQARKFODN4cEpD3w8Ip2H8LdkJoN52I8Pgp3XptU9Iap276/ofOUvz3NHF ig== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf4p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:38:26 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:38:25 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:38:24 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 01AB93F7044; Mon, 9 Aug 2021 21:38:24 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4cOk7001192; Mon, 9 Aug 2021 21:38:24 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4cOmi001191; Mon, 9 Aug 2021 21:38:24 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 03/14] qla2xxx: adjust request/response queue size for 28xx Date: Mon, 9 Aug 2021 21:37:09 -0700 Message-ID: <20210810043720.1137-4-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: tMpfrW4IX-t3rUZaGin9Lj9z_Inp4u3p X-Proofpoint-GUID: tMpfrW4IX-t3rUZaGin9Lj9z_Inp4u3p X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran adjust request/respond queue size for 28xx to match 27xx adapter. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 53e9eea031bd..921bd4d127f4 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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); From patchwork Tue Aug 10 04:37:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 494685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F24C6C4338F for ; Tue, 10 Aug 2021 04:38:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D652660E76 for ; Tue, 10 Aug 2021 04:38:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237130AbhHJEjK (ORCPT ); Tue, 10 Aug 2021 00:39:10 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:65166 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237133AbhHJEi6 (ORCPT ); Tue, 10 Aug 2021 00:38:58 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4amVg008701 for ; Mon, 9 Aug 2021 21:38:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=sGTeTC3lZMs0pUmakzTvU/HmfwKRLOhOBZBvPHLDCHU=; b=Xeax1vY6jP6lg3HH2R3JTuxaijbZn8/T++Sd/zA9kGoLWHkOgDAOi8VlNLfu/FXoc+ag XKR6ChIp9Ta5+BC/SjpNr9aQf2zMDjIf2zvjUmUJXLie4oskfVvTqkaDZmkBUzQdLoLq yYu8mFi/TlMD2ySe8Y7eoO2MYd9g6svySeJ9Kn4pJ3CZJVlUXC35DjHGiLdpLemdbt6p CGDVdzfVB/mBWOCXa7E3jGbTqODYQqqQipMf98xaCh3IKEX3bWjg/0WWnOD38ba1nezn /gu55Gq/3uneQuZ9ZP41JrxDJE7Bu14chEL0Hsf/v2jAatkoaKzUVUuJaGjcD4BtRlSP GQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf56-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:38:36 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:38:35 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:38:35 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 21BC83F709B; Mon, 9 Aug 2021 21:38:35 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4cYV1001196; Mon, 9 Aug 2021 21:38:34 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4cYj0001195; Mon, 9 Aug 2021 21:38:34 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 04/14] qla2xxx: Changes to support FCP2 Target Date: Mon, 9 Aug 2021 21:37:10 -0700 Message-ID: <20210810043720.1137-5-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: oDusv3HcR6yTzzxNvCFWYOu07GnArBde X-Proofpoint-GUID: oDusv3HcR6yTzzxNvCFWYOu07GnArBde X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap Add changes to support FCP2 Target. Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- 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(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index f2d05592c1e2..25549a8a2d72 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -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 | diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 24683ac1a620..8fa0cc3fcca0 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -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++; } diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 921bd4d127f4..3b8230c35f26 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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); } From patchwork Tue Aug 10 04:37:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 495550 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5E55C432BE for ; Tue, 10 Aug 2021 04:38:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B837E60E76 for ; Tue, 10 Aug 2021 04:38:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237133AbhHJEjS (ORCPT ); Tue, 10 Aug 2021 00:39:18 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:42570 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237160AbhHJEjI (ORCPT ); Tue, 10 Aug 2021 00:39:08 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4aPp6008585 for ; Mon, 9 Aug 2021 21:38:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=wCNwj0rDU0n0UXjIQMWEx2NJm5Rg45xNdV8pBMNz5Vo=; b=L0WXogr+MoAjKhxtrUOu+57cSeMZKnA8fAQlW/ArU1WcwaOdzK/116M/RHjdX1ZCGCal cDm+E4DyCQKbGLVS4iwZeq60j5eIeEb3xsOOZWA1R09H3GMbKxl4WMu4sQObsZgUEdAB mmD+KNmgcUtrco6GYAiCx/KkXxadgd9GHZ9Nqso0HfAHf/F9KcSuz9xGQ8LpibxxalQg 3iG7NOB2qn494/SA+/zSMbfq1KDSZOgS6b2iiJGgPVjD/WHl13WC/GQQ5mSeTMBS5q1r 7kAxC6sZwY2i94InA7xglG+najbjYiAREtmZFI6vbtd6TDQSPDjXCb9zmchFXJHEy8gP og== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf6a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:38:46 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:38:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:38:45 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 3304B3F7044; Mon, 9 Aug 2021 21:38:45 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4cjtj001200; Mon, 9 Aug 2021 21:38:45 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4cjo8001199; Mon, 9 Aug 2021 21:38:45 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 05/14] qla2xxx: Show OS name and version in FDMI-1 Date: Mon, 9 Aug 2021 21:37:11 -0700 Message-ID: <20210810043720.1137-6-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 79wzYMM0sRocuDEptXfklEORdAO_hpg1 X-Proofpoint-GUID: 79wzYMM0sRocuDEptXfklEORdAO_hpg1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arun Easi To be consistent with other OS drivers, register OS name and version in FDMI-1 fabric registration. Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- 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(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index af0e8be0eb9b..c081bf1c7578 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -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 diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index b0b15fac5f3b..c37478f1b538 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -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); diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3b8230c35f26..995ab58d3288 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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); From patchwork Tue Aug 10 04:37:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 494684 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93EFBC4338F for ; Tue, 10 Aug 2021 04:38:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7474060EBD for ; Tue, 10 Aug 2021 04:38:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237102AbhHJEjT (ORCPT ); Tue, 10 Aug 2021 00:39:19 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:20674 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237136AbhHJEjS (ORCPT ); Tue, 10 Aug 2021 00:39:18 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4aNdk008544 for ; Mon, 9 Aug 2021 21:38:56 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=YicV8azM9ZzvTp2ME28ePIh1F8jAspRZAns2Il3Q9xA=; b=VBWnZLaIlQQ/auhnQtm/lytX4jGjfJ/m4zBlQxD0SczOI8Jo8hzaxSXqb0AvZnKZK16J 1M5swcLGdy6POzj2p33cXyV8GmtBLgGFBFf4MKpXU9LPL3bmASttd7WZ2EwWcUi8SmH+ GrMa0OVSIysj7rBbTcdSMuzfQEWQE1eKjr8YyyPIdRrkVxuO4N+QlAtxQhimh7O6vBKa yO+oXdr/gp2GGPuXHEsoFQyi8r3Eda498RQJ1BOu2vQa3pYkwhyj7gJbKwaF13TR4uhv zn5dYWA4hJqGEghaVhYrdNwCOfG52//HS2rI8Vqaut45jBizq4+FWx/HlBRfaUfoPSxW Og== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf6p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:38:56 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:38:55 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:38:55 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 52B4A3F7044; Mon, 9 Aug 2021 21:38:55 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4ct7j001213; Mon, 9 Aug 2021 21:38:55 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4ctKX001203; Mon, 9 Aug 2021 21:38:55 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 06/14] qla2xxx: add debug print of 64G link speed Date: Mon, 9 Aug 2021 21:37:12 -0700 Message-ID: <20210810043720.1137-7-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: c-8AZ73MPjiMSoypA9Y7IlNe0Nnyqc01 X-Proofpoint-GUID: c-8AZ73MPjiMSoypA9Y7IlNe0Nnyqc01 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran Add debug print of 64G link speed. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 8d4d174419bb..93ab686c7a30 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -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) From patchwork Tue Aug 10 04:37:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 495549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA375C4338F for ; Tue, 10 Aug 2021 04:39:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1C7F60EBD for ; Tue, 10 Aug 2021 04:39:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234710AbhHJEj3 (ORCPT ); Tue, 10 Aug 2021 00:39:29 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:6734 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235432AbhHJEj2 (ORCPT ); Tue, 10 Aug 2021 00:39:28 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4ag95008656 for ; Mon, 9 Aug 2021 21:39:07 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=J75xVfpwR+KxD6gzW7a5xB94C7nOJToLZfph9JqYkBg=; b=DMlzoy2DPfOEh12rzfOnDrzL4hdddLk7MPYLnmYrfroLdi6lw2vLc0wdN5RfbDyEIYKZ BhNkPoUsKCKY0jkyZT0mdd0gsbsRadPbp48b+SR3MWQqTs6jHr2AxWXZiMHBpOfkywqA fKhSZtCDew4bhZyF2K9SVCxFoLKDt+MiPr7nSltNMP+959e/MN8H2idEaLc6EK2FNxlQ LTodzFvvJKNncZZEac17mRHOVDvYLwpJVrWXkWu96l1rwC6kmNCpLblNWkE663xLFmYn hBypFAAdWTq2il6P0wRdIUMO7we0OTVc/o0738yW7TLVPP0JDbcOCfLYzHRgomWBUh9D ZQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf7c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:39:06 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:39:05 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:39:05 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 6BB0F3F7044; Mon, 9 Aug 2021 21:39:05 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4d5ZY001217; Mon, 9 Aug 2021 21:39:05 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4d5lm001216; Mon, 9 Aug 2021 21:39:05 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 07/14] qla2xxx: fix port type info Date: Mon, 9 Aug 2021 21:37:13 -0700 Message-ID: <20210810043720.1137-8-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 2L2v86_4ctn6RpGTBFfWfcZoUYPvkKUR X-Proofpoint-GUID: 2L2v86_4ctn6RpGTBFfWfcZoUYPvkKUR X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran 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. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index c081bf1c7578..60702d066ed9 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -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, From patchwork Tue Aug 10 04:37:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 494683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05BCFC4338F for ; Tue, 10 Aug 2021 04:39:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D28EE610A3 for ; Tue, 10 Aug 2021 04:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237180AbhHJEjj (ORCPT ); Tue, 10 Aug 2021 00:39:39 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:43508 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235069AbhHJEji (ORCPT ); Tue, 10 Aug 2021 00:39:38 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4axM9008747 for ; Mon, 9 Aug 2021 21:39:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=tdmBNUdtjMotP/kEPmVoNQDp+agZzW8CTWck6yo5ACs=; b=WiiJeqQIIL9cE5zpTxN8K8X0VmDoWCfZdusc+OyTxiZ1RFBY/BGI843CO6TwmDJdmXDZ Wmzs1RpElm06CXejOhpGt7FNlMXiIoHp5nc8pAPo7jQ6yHcKFWfhRe8Z0YUZCmLwCzVU LKA5Rr04r5jsxpyVSQ41RmjVqPdnGTLGbt2aNQ8mGi09w8G4Bkyw8b3hd1209tPz8iz7 ReV8ddztA9l6LELsbhhhLlmC3mE2sCH9VzVGjBLa7JmZEWqwclqq0ptmYC/8GIzqsvDM p0GKld4wfv7BQ0l3n35m9Rgjk0DD2hYW2cyODkvcmR7mj7jQocIQdiK6hluSGkm05kyy kw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf87-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:39:17 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:39:15 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:39:15 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 886273F7044; Mon, 9 Aug 2021 21:39:15 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4dFcw001221; Mon, 9 Aug 2021 21:39:15 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4dFn9001220; Mon, 9 Aug 2021 21:39:15 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 08/14] qla2xxx: fix unsafe removal from link list Date: Mon, 9 Aug 2021 21:37:14 -0700 Message-ID: <20210810043720.1137-9-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: TqlT8YvK3sx4cv6032hTKzC3c1ZVD2hd X-Proofpoint-GUID: TqlT8YvK3sx4cv6032hTKzC3c1ZVD2hd X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran 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 Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- 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(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 8fa0cc3fcca0..2810274a262b 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -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); diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 98333f5b0807..3fa70750ce25 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -65,7 +65,7 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t *vha) uint16_t vp_id; struct qla_hw_data *ha = vha->hw; unsigned long flags = 0; - u8 i; + u32 i, bailout; mutex_lock(&ha->vport_lock); /* @@ -75,21 +75,29 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t *vha) * ensures no active vp_list traversal while the vport is removed * from the queue) */ - for (i = 0; i < 10; i++) { - if (wait_event_timeout(vha->vref_waitq, - !atomic_read(&vha->vref_count), HZ) > 0) + bailout = 0; + for (i = 0; i < 500; i++) { + spin_lock_irqsave(&ha->vport_slock, flags); + if (atomic_read(&vha->vref_count) == 0) { + list_del(&vha->list); + qlt_update_vp_map(vha, RESET_VP_IDX); + bailout = 1; + } + spin_unlock_irqrestore(&ha->vport_slock, flags); + + if (bailout) break; + else + msleep(20); } - - spin_lock_irqsave(&ha->vport_slock, flags); - if (atomic_read(&vha->vref_count)) { - ql_dbg(ql_dbg_vport, vha, 0xfffa, - "vha->vref_count=%u timeout\n", vha->vref_count.counter); - vha->vref_count = (atomic_t)ATOMIC_INIT(0); + if (!bailout) { + ql_log(ql_log_info, vha, 0xfffa, + "vha->vref_count=%u timeout\n", vha->vref_count.counter); + spin_lock_irqsave(&ha->vport_slock, flags); + list_del(&vha->list); + qlt_update_vp_map(vha, RESET_VP_IDX); + spin_unlock_irqrestore(&ha->vport_slock, flags); } - list_del(&vha->list); - qlt_update_vp_map(vha, RESET_VP_IDX); - spin_unlock_irqrestore(&ha->vport_slock, flags); vp_id = vha->vp_idx; ha->num_vhosts--; @@ -262,13 +270,13 @@ qla24xx_configure_vp(scsi_qla_host_t *vha) void qla2x00_alert_all_vps(struct rsp_que *rsp, uint16_t *mb) { - scsi_qla_host_t *vha; + scsi_qla_host_t *vha, *tvp; struct qla_hw_data *ha = rsp->hw; int i = 0; unsigned long flags; spin_lock_irqsave(&ha->vport_slock, flags); - list_for_each_entry(vha, &ha->vp_list, list) { + list_for_each_entry_safe(vha, tvp, &ha->vp_list, list) { if (vha->vp_idx) { if (test_bit(VPORT_DELETE, &vha->dpc_flags)) continue; @@ -421,7 +429,7 @@ void qla2x00_do_dpc_all_vps(scsi_qla_host_t *vha) { struct qla_hw_data *ha = vha->hw; - scsi_qla_host_t *vp; + scsi_qla_host_t *vp, *tvp; unsigned long flags = 0; if (vha->vp_idx) @@ -435,7 +443,7 @@ qla2x00_do_dpc_all_vps(scsi_qla_host_t *vha) return; 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); diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 995ab58d3288..b3e1d1c587ba 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -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) From patchwork Tue Aug 10 04:37:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 494682 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD8B2C4338F for ; Tue, 10 Aug 2021 04:39:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0F8060E76 for ; Tue, 10 Aug 2021 04:39:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234710AbhHJEkE (ORCPT ); Tue, 10 Aug 2021 00:40:04 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:32398 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237189AbhHJEjs (ORCPT ); Tue, 10 Aug 2021 00:39:48 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4aQaa008600 for ; Mon, 9 Aug 2021 21:39:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=LadPgt7Schsg67/Dh+B7tKBTmQRN32rEljPNRqbbmT0=; b=Ei7G64FPhUX+silGqQ4jWlUw6/zbd5kfiK8/9Rg+DfqI2R5lhgqfpdQTuyeYqWbhkOC/ f5LEbvcpT8DFOKaz9pJUUc83hsEnaHCEYB7x0M0DOtEzAHrf8NJON1grnoeJ7rgNfMoX 0cL84W2tnl2nOxC6wSFnTTy6GwbLo2WetJ+Wu3EYDK/Dy5EIxkGk86eL5JSCG9j1L6mf lKiDIKAKT8Z9YlzMYLDl0prsOCi8ooOr/lzV3tSXNdgwBslrPd8LHsNmt89VDJaGdUx8 hBC4LqabDPX3IUsHXmUFoKZBWJUz6S9iVdCsh6l+VYMUTzSjjiW4t3lJiyCC+F9597Pq gA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf8r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:39:27 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:39:25 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:39:25 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id A5D9A3F7044; Mon, 9 Aug 2021 21:39:25 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4dPUo001225; Mon, 9 Aug 2021 21:39:25 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4dP3c001224; Mon, 9 Aug 2021 21:39:25 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 09/14] qla2xxx: fix npiv create erroneous error Date: Mon, 9 Aug 2021 21:37:15 -0700 Message-ID: <20210810043720.1137-10-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: sKs6ZaXPMUnPthmK2bunc07wQdOhkXN_ X-Proofpoint-GUID: sKs6ZaXPMUnPthmK2bunc07wQdOhkXN_ X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran 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. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 2810274a262b..df532c5531a9 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -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; From patchwork Tue Aug 10 04:37:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 495548 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C526C4338F for ; Tue, 10 Aug 2021 04:39:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 57B1A60EBD for ; Tue, 10 Aug 2021 04:39:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235069AbhHJEkD (ORCPT ); Tue, 10 Aug 2021 00:40:03 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:10058 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237180AbhHJEj6 (ORCPT ); Tue, 10 Aug 2021 00:39:58 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4amVp008701 for ; Mon, 9 Aug 2021 21:39:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=vITjiZ/KaAHTgmTLxeQO3DmbzvQMKLNgJPPNLB0CP6k=; b=AOeX7IGgPSe45sFYqzwaHEFUPjPQIi15k7/0JiG8qqR38vy465eeumoqEcuZywAhAbbf aQ3iXMqdB1ymouRd3XK26/18Vu+BhxGaEtmN8fDDL3Bz8emSKaqkZRtYtt9CxFa+evIQ Duq3O8gU4/+9cqZ/4jo3Hl+Oqp+Y7UCt3wjYBA+w8tjF3uti4hngpBnTRyYq8Gk5MmY3 V0uilSSNMh5FNxJWoNVF95rUBMkmQym8Vm96D+CjlR82BHf/JegZddCNGCphrAgA7dYL 8sZmtvyKUqazcmrKdoXVtPAxfDunJarMy4tkZBN0FzZOrhuPdAMApDXdS7X5eA1GIEKr TQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf97-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:39:37 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:39:35 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:39:35 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id C923D3F7044; Mon, 9 Aug 2021 21:39:35 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4dZkX001229; Mon, 9 Aug 2021 21:39:35 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4dZ8D001228; Mon, 9 Aug 2021 21:39:35 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 10/14] qla2xxx: suppress unnecessary log messages during login Date: Mon, 9 Aug 2021 21:37:16 -0700 Message-ID: <20210810043720.1137-11-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: S8MHmxRKES1YPs4g0fDZM5fYwvJo-Hpx X-Proofpoint-GUID: S8MHmxRKES1YPs4g0fDZM5fYwvJo-Hpx X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arun Easi Suppress logging of retryable errors. These could still be seen if extended logging is enabled. Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_isr.c | 23 +++++++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index df532c5531a9..4f68b4ebcbc4 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -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); diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 93ab686c7a30..b0b5af21781a 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -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); From patchwork Tue Aug 10 04:37:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 495547 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53ABEC4338F for ; Tue, 10 Aug 2021 04:39:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A40860E76 for ; Tue, 10 Aug 2021 04:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237133AbhHJEkL (ORCPT ); Tue, 10 Aug 2021 00:40:11 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:47196 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237046AbhHJEkJ (ORCPT ); Tue, 10 Aug 2021 00:40:09 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4amVq008701 for ; Mon, 9 Aug 2021 21:39:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=Wv2De/TXaVV6araWrO17RsA7jhQx0ibxEzeQkCkZJpM=; b=PNCEblBTTHhFZbHp3qE9oe8ZRgwYTcMkj1oIHMvzqsQ1IiK/n4+1UGI2Eg6l7kIWCU3U o3wq5MhIVmIhzQjHZsZO7jsJZtstQyIY6zZyVMFwkn+6V5LT45i7VWmNpMg+a2UbsKHH pUuvelsykNvjEXPcnSifPRhNkVs4ungeHOwwifcxlraWRDwyTTb4VNtwmc0yXRjBtDMG cBJlSZ6mjp6U1UNl/NK/v8Z//tCP5UAJbKWaWGao4IQHF+d4Hsp1dBKHKxpKGQId7QIZ wdwwElcETtGP+OtFnVvsfSDTnorfxbLPNII/wffNWSxTDNMXrlIYMAcj5zgClroc5X5H tw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gf9n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:39:47 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:39:46 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:39:45 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id E1E1A3F7044; Mon, 9 Aug 2021 21:39:45 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4djXw001233; Mon, 9 Aug 2021 21:39:45 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4djwF001232; Mon, 9 Aug 2021 21:39:45 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 11/14] qla2xxx: Changes to support kdump kernel Date: Mon, 9 Aug 2021 21:37:17 -0700 Message-ID: <20210810043720.1137-12-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: t2_itNhYsdMMhi1bUaIrXObzy8K7vT2p X-Proofpoint-GUID: t2_itNhYsdMMhi1bUaIrXObzy8K7vT2p X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap Don't allocate fw dump for kexec kernel. Allocate single Q for kexec kernel. Cc: stable@vger.kernel.org Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_os.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index b3e1d1c587ba..01264eebd7be 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -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); From patchwork Tue Aug 10 04:37:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 494681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DA48C4338F for ; Tue, 10 Aug 2021 04:39:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DDE4060EBD for ; Tue, 10 Aug 2021 04:39:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237046AbhHJEkT (ORCPT ); Tue, 10 Aug 2021 00:40:19 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:35054 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235069AbhHJEkS (ORCPT ); Tue, 10 Aug 2021 00:40:18 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4aNdr008544 for ; Mon, 9 Aug 2021 21:39:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=8UaXBPAaDlDxpaD93dCKc1BnktCr9oTQGXZaFV+nCmM=; b=Fhe7esB5L6FckpGeaFz9hhMQq7TjwPKUjmIokN+gyft5BVtWbk109ePv+3iVxy1Wftkk OWEq1nuvxPNHqwcL+WmK2X2eEPIsIUSvLd6dKvEzciufNKfFLDIwxuv88zl4NEfgW1sg dVLrwjXgJijbknfm4Q0wkvnbftS5lKpd9UHsvMVN7MG9uCoI5xxLnoZTeI9X1Vi/gCT9 OHoOQr8NQ4Kuxaz172cU2ZWhHrinDbHLj8YP/J3lwR8ZcIUjXBH0h6y1yRU9JzaBEuJI lwaMAZNUXsBVGMvJdSh5FnqsW5MXumEI2HFduHUx4IuYTS1nTdcUbgvXoqMb0spWzySm tg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gfa4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:39:57 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:39:55 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:39:56 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id F1CE43F7044; Mon, 9 Aug 2021 21:39:55 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4dtqs001246; Mon, 9 Aug 2021 21:39:55 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4dtCr001236; Mon, 9 Aug 2021 21:39:55 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 12/14] qla2xxx: Changes to support kdump kernel for NVMe BFS Date: Mon, 9 Aug 2021 21:37:18 -0700 Message-ID: <20210810043720.1137-13-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: MQQK1CRjvsfoC7Vfcq-HvqKbzd-zC9qH X-Proofpoint-GUID: MQQK1CRjvsfoC7Vfcq-HvqKbzd-zC9qH X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap 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 Cc: stable@vger.kernel.org Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- 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(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 60702d066ed9..55175e8a0749 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -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; diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index b0b5af21781a..ba4a5bf5600a 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -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: diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 6f3c0a506509..94e350ef3028 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -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); From patchwork Tue Aug 10 04:37:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 495546 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 708A4C4338F for ; Tue, 10 Aug 2021 04:40:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5892B60E76 for ; Tue, 10 Aug 2021 04:40:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237102AbhHJEkb (ORCPT ); Tue, 10 Aug 2021 00:40:31 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:14900 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234710AbhHJEka (ORCPT ); Tue, 10 Aug 2021 00:40:30 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4aQag008600 for ; Mon, 9 Aug 2021 21:40:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pfpt0220; bh=4auV6LHa1HoIFbl4hgC0GwLsTt37L2WxZvNxjYFPBJ0=; b=Q8y+0uOuBZpQ9fs8jqI8oZqkgex4FpioWXqkq855YM4oDSMjqWKKp8GoePiAAkc+6qAp wX3SGKv32vqS1KjXDnH9uzknIrUb+iiyf6ysntED1Y4IMzG45VL+6QHoDgVlQ663xUkj rSyvN+FpN+2TCknGsMyhg0PKmI9oU35qqKMOPa6q/xCdaLBmhRuXC1r9o5gZxJlUmfcA 6Zggrof6kv/jGA9VFInlWcG7lnUwE3NYVBG6lf3+hmpBc6bK+fPbBI/g08YmzkukKfYN m5+x1ll9sjw1fSu33ALA7wWjGWXj+If5I49GjvIZbgfjyB6Q1A5oQhnve8DVgle6vtL+ pw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gfb7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:40:08 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:40:07 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:40:07 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 1C6925C6902; Mon, 9 Aug 2021 21:40:06 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4e5Ws001308; Mon, 9 Aug 2021 21:40:05 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4e5ZK001249; Mon, 9 Aug 2021 21:40:05 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 13/14] qla2xxx: Sync queue idx with queue_pair_map idx Date: Mon, 9 Aug 2021 21:37:19 -0700 Message-ID: <20210810043720.1137-14-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: OP1w2qIZ30b7Qs8W19YuM6ih_y6iFSmb X-Proofpoint-GUID: OP1w2qIZ30b7Qs8W19YuM6ih_y6iFSmb X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap 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 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”) Cc: stable@vger.kernel.org Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_nvme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 94e350ef3028..04b766b8a471 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -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; From patchwork Tue Aug 10 04:37:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 494680 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAE5CC432BE for ; Tue, 10 Aug 2021 04:40:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0F2C60E76 for ; Tue, 10 Aug 2021 04:40:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237102AbhHJEkt (ORCPT ); Tue, 10 Aug 2021 00:40:49 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:50522 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234710AbhHJEks (ORCPT ); Tue, 10 Aug 2021 00:40:48 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17A4eRhl015635 for ; Mon, 9 Aug 2021 21:40:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=KzGSU6qkYvCs+kzdI5FJud3M2GhOYqRGAHJdOVL62AM=; b=AYJPW7P9KXcyPb8wubhcM1tS6Oqkdxx7gm2Yr1rwU9w5i/lnxeCKn4dq57y93AEyWC41 sEDwq17eb9Xfjawdu9lAFgxRLs24x54T3ICaoRQpJer+JAH3O0rr+mrsjmdvazUNSJ+3 O1MnP8S3CfU+u0Bk7+lpOkxr7qgco/0dFz4UV78j6RdBzkeW2Yf7l6tjP9OG2QQTxjpd 7GND5FcY4hJdn5LHPow2Qk7mfnguKkKMQQnoy+lRE0iycwCaIwXkTwVh65yE6j7gS+0F I+V++UO5WXYQXntUxZTkjd75jBdd5d3CPXgjp2pDh0qSpNlf8d9tUFHfM9SanIQAbOSo dA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3abfu2gfc8-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Aug 2021 21:40:27 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 9 Aug 2021 21:40:19 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 9 Aug 2021 21:40:19 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 3DF7E5C68F7; Mon, 9 Aug 2021 21:40:16 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 17A4eGhn001312; Mon, 9 Aug 2021 21:40:16 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 17A4eGnK001311; Mon, 9 Aug 2021 21:40:16 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH v2 14/14] qla2xxx: Update version to 10.02.06.100-k Date: Mon, 9 Aug 2021 21:37:20 -0700 Message-ID: <20210810043720.1137-15-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20210810043720.1137-1-njavali@marvell.com> References: <20210810043720.1137-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: tEmu0UolzY6jo2Q0IoOHkJwfyYWgFrVn X-Proofpoint-GUID: tEmu0UolzY6jo2Q0IoOHkJwfyYWgFrVn X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-10_01:2021-08-06,2021-08-10 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 2e05dd74b5cb..8b0ace50b52f 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h @@ -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