From patchwork Wed Aug 5 04:43:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701293 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE62F138A for ; Wed, 5 Aug 2020 04:44:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CECB82177B for ; Wed, 5 Aug 2020 04:44:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="fH9Bevtp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725920AbgHEEo4 (ORCPT ); Wed, 5 Aug 2020 00:44:56 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:43384 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbgHEEo4 (ORCPT ); Wed, 5 Aug 2020 00:44:56 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754Zabr024038 for ; Tue, 4 Aug 2020 21:44:55 -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=pfpt0818; bh=keO6RQE7AHicSzwC/28V3NU5LTL/X5A7fx69ZebubgQ=; b=fH9Bevtpm11H33TNdLKyXHqp8k8KjeLmsyOVE0kICLYJAFGHnJD4L+DOyCh537j20w+H 2bh2y8zcCnQvfW0QPUiKEBc6i8w5FadNJn9uauVtcz9mNBY6MF6KjC4cqqnfhuXjEpcK pbPjVSrUpGvo+tTQWyh6+BIyysetmwrA60OvtP77UiG5Dlyky8L51tPMgy1+yAJBJr6P 5NUlhMyf1lwvb8HGL4G6WQ+VfKJO85wcAUc4TcqLhPHHWHbr7VwPqyniIN/fX1PXbRF+ 0722h109His2xvy8chHlANxa4Gu3WOlyiXqvTe/Oo5TFdit7X/JF/x6KGZtynMISer/f 6A== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8bb-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:44:54 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:44:52 -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.2; Tue, 4 Aug 2020 21:44:51 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:44:51 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 44C873F703F; Tue, 4 Aug 2020 21:44:51 -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 0754ipO2030591; Tue, 4 Aug 2020 21:44:51 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754ipm6030582; Tue, 4 Aug 2020 21:44:51 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 01/10] qla2xxx: flush all sessions on zone disable Date: Tue, 4 Aug 2020 21:43:53 -0700 Message-ID: <20200805044402.30543-2-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran On Zone Disable, certain switch would ignore all commands. This cause timeout for both switch scan command and abort of that command. On detection of this condition, all sessions will be shutdown. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_gs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index 42c3ad27f1cb..c5529da1df59 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3734,6 +3734,18 @@ static void qla2x00_async_gpnft_gnnft_sp_done(srb_t *sp, int res) unsigned long flags; const char *name = sp->name; + if (res == QLA_OS_TIMER_EXPIRED) { + /* switch is ignoring all commands. + * This might be a zone disable behavior. + * This means we hit 64s timeout. + * 22s GPNFT + 44s Abort = 64s + */ + ql_dbg(ql_dbg_disc, vha, 0xffff, + "%s: Switch Zone check please .\n", + name); + qla2x00_mark_all_devices_lost(vha); + } + /* * We are in an Interrupt context, queue up this * sp for GNNFT_DONE work. This will allow all From patchwork Wed Aug 5 04:43:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701295 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C3546C1 for ; Wed, 5 Aug 2020 04:45:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3EBFE22CB3 for ; Wed, 5 Aug 2020 04:45:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="XFsomiAD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726008AbgHEEpU (ORCPT ); Wed, 5 Aug 2020 00:45:20 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:16226 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbgHEEpS (ORCPT ); Wed, 5 Aug 2020 00:45:18 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754ZZxh023966 for ; Tue, 4 Aug 2020 21:45: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=pfpt0818; bh=fdL3+E66b4xHZ+o/bpUoiU20PWcVniyx4u/o5Ulrlck=; b=XFsomiAD8erAW0HEP2gN5KM+pXo7JtgQWGEuPqoYD7NUZyUUNTdPrJzK3+AoOXtjrLGk 86XKFK7tZnxsNfkj5bHBvFDDSoY7SmiWbgnRq9UEyhjSJgtQk3RIrF5kKgC5YG7IzED5 fSTb6sUouaPzwe/SuVz8cTJJl2U5801oVvO9sFjhlfyWicVoiDyIQpGbV095SVx3XQwO la0litijMB4h6upO9pJY7ivp5YqdbIvhVzJc9bcN2dav7yx6d7phOy/fGEVziDVTv6kg xYK/34Hk9k+vSSxa39cK4/DZOX7uyrVAtxRfSZH2yRjDjup+W7RToLQAKiCqWPizyW8w cQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8c5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:45:17 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:45: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.2 via Frontend Transport; Tue, 4 Aug 2020 21:45:15 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 60C693F7041; Tue, 4 Aug 2020 21:45: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 0754jFCh030596; Tue, 4 Aug 2020 21:45:15 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754jFqx030594; Tue, 4 Aug 2020 21:45:15 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 02/10] qla2xxx: flush IO on zone disable Date: Tue, 4 Aug 2020 21:43:54 -0700 Message-ID: <20200805044402.30543-3-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran Perform implicit logout to flush io on zone disable. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_gs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index c5529da1df59..d9ce8d31457a 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3436,7 +3436,6 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) list_for_each_entry(fcport, &vha->vp_fcports, list) { if ((fcport->flags & FCF_FABRIC_DEVICE) != 0) { fcport->scan_state = QLA_FCPORT_SCAN; - fcport->logout_on_delete = 0; } } goto login_logout; From patchwork Wed Aug 5 04:43:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701297 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 146E16C1 for ; Wed, 5 Aug 2020 04:45:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0474A2177B for ; Wed, 5 Aug 2020 04:45:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="nM6Gqa9z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726096AbgHEEpn (ORCPT ); Wed, 5 Aug 2020 00:45:43 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:55586 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbgHEEpn (ORCPT ); Wed, 5 Aug 2020 00:45:43 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754ZZxl023966 for ; Tue, 4 Aug 2020 21:45:42 -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=pfpt0818; bh=QU1riLo7tCDR2VuVGws1O5nRrxFfOCClgqgKHPL8tic=; b=nM6Gqa9z80Y2rdTVyIdDRuh1RudXyM+2kTXfqJ9d6xEfFPG2Oda9PcAXhhjTx7f2B8hD gd+Rf5/A/Xq969N5WA9njXkp48ewtsmyn3wAo23a7P8BD7NIh0YHr6B6CNsvEt9bC/Bv 3O6IlskidMKtcmTf9E0QO08cXt9J+t3QGcr+2a3kemAI5S7vF6wG98vMWOkQNa0AAZrC BZZVsPvZMAC7zN9SxfFGi/1ll2pgi7tWuuiw/e+SBQHcBQKEq6wdF2yHPGz8DUSNfq/H q8ZdDFxOYWjAbdfsXTqgyKfgo3dWgidgA8T02BgQhrCakbcQaIYDIwndbBsrhu8Z4kvh Uw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8d2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:45:42 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:45:41 -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.2; Tue, 4 Aug 2020 21:45:39 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:45:39 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 7FB863F7040; Tue, 4 Aug 2020 21:45:39 -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 0754jdmc030608; Tue, 4 Aug 2020 21:45:39 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754jdDO030599; Tue, 4 Aug 2020 21:45:39 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 03/10] qla2xxx: Indicate correct supported speeds for Mezz card Date: Tue, 4 Aug 2020 21:43:55 -0700 Message-ID: <20200805044402.30543-4-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran Correct the supported speeds for 16G Mezz card. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_gs.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index d9ce8d31457a..8c30d9dbb48c 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -1505,11 +1505,11 @@ qla2x00_prep_ct_fdmi_req(struct ct_sns_pkt *p, uint16_t cmd, static uint qla25xx_fdmi_port_speed_capability(struct qla_hw_data *ha) { + uint speeds = 0; + if (IS_CNA_CAPABLE(ha)) return FDMI_PORT_SPEED_10GB; if (IS_QLA28XX(ha) || IS_QLA27XX(ha)) { - uint speeds = 0; - if (ha->max_supported_speed == 2) { if (ha->min_supported_speed <= 6) speeds |= FDMI_PORT_SPEED_64GB; @@ -1536,9 +1536,16 @@ qla25xx_fdmi_port_speed_capability(struct qla_hw_data *ha) } return speeds; } - if (IS_QLA2031(ha)) - return FDMI_PORT_SPEED_16GB|FDMI_PORT_SPEED_8GB| - FDMI_PORT_SPEED_4GB; + if (IS_QLA2031(ha)) { + if ((ha->pdev->subsystem_vendor == 0x103C) && + (ha->pdev->subsystem_device == 0x8002)) { + speeds = FDMI_PORT_SPEED_16GB; + } else { + speeds = FDMI_PORT_SPEED_16GB|FDMI_PORT_SPEED_8GB| + FDMI_PORT_SPEED_4GB; + } + return speeds; + } if (IS_QLA25XX(ha)) return FDMI_PORT_SPEED_8GB|FDMI_PORT_SPEED_4GB| FDMI_PORT_SPEED_2GB|FDMI_PORT_SPEED_1GB; From patchwork Wed Aug 5 04:43:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701299 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2AD9E6C1 for ; Wed, 5 Aug 2020 04:46:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B6082177B for ; Wed, 5 Aug 2020 04:46:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="NIMfykZT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726186AbgHEEqH (ORCPT ); Wed, 5 Aug 2020 00:46:07 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:14960 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgHEEqH (ORCPT ); Wed, 5 Aug 2020 00:46:07 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754ZYGN023943 for ; Tue, 4 Aug 2020 21:46: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=pfpt0818; bh=nqm9W1BA52mv2euK6YR/84346Lp8A2RIYnlieG/bHQU=; b=NIMfykZT69X7fid6LtWi5Hvx3Hv9alNBI9APWBOa/7PyfnRizEPPRYoje9tghdt3UeqN UneTOKL2aJuQ9XiHBSGtm7SNrTgb2mJ2XbZojWcXq7jD1V/7Gop8mCzW2QwS5qr4nyuK i71DWA6dHPKB9LL3AQLb+ZtrHgCPZGMRbdDnxS+75Kn6PfxjeOf1ilXWAeIOXuw2DLu2 I5ttJSErj7Qo51jEbo2sdcn8Aeq1yBkz/o9xZQ3RlrWXeb1MmxL6R3JIkgD1clmKfCjb oztW2iVobmx5MjDTbjJeUkzXI+XBx42ftPLxnECQkGW/cxAoGQs8ZkxQGxxRyEUGrWOJ DQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8e7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:46:06 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:46:05 -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.2; Tue, 4 Aug 2020 21:46:03 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:46:03 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 9F3F03F703F; Tue, 4 Aug 2020 21:46:03 -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 0754k3ca030612; Tue, 4 Aug 2020 21:46:03 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754k3I4030611; Tue, 4 Aug 2020 21:46:03 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 04/10] qla2xxx: fix login timeout Date: Tue, 4 Aug 2020 21:43:56 -0700 Message-ID: <20200805044402.30543-5-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran Multipath errors were seen during failback due to login timeout. The remote device sent LOGO, the local host teared down the session and did relogin. The RSCN arrived indicates remote device is going through failover after which the relogin is in a 20s timeout phase. At this point the driver is stuck in the relogin process. Add a fix to delete the session as part of abort/flush the login. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_gs.c | 19 ++++++++++++++++--- drivers/scsi/qla2xxx/qla_target.c | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index 8c30d9dbb48c..2d7a47a2873b 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3536,10 +3536,23 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) } if (fcport->scan_state != QLA_FCPORT_FOUND) { + bool do_delete = false; + + if (fcport->scan_needed && + fcport->disc_state == DSC_LOGIN_PEND) { + /* his cable just got disconnected after we + * send him a login. Do delete to prevent + * timeout + */ + fcport->logout_on_delete = 1; + do_delete = true; + } + fcport->scan_needed = 0; - if ((qla_dual_mode_enabled(vha) || - qla_ini_mode_enabled(vha)) && - atomic_read(&fcport->state) == FCS_ONLINE) { + if (((qla_dual_mode_enabled(vha) || + qla_ini_mode_enabled(vha)) && + atomic_read(&fcport->state) == FCS_ONLINE) || + do_delete) { if (fcport->loop_id != FC_NO_LOOP_ID) { if (fcport->flags & FCF_FCP2_DEVICE) fcport->logout_on_delete = 0; diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index fbb80a043b4f..90289162dbd4 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1270,7 +1270,7 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess) qla24xx_chk_fcp_state(sess); - ql_dbg(ql_dbg_tgt, sess->vha, 0xe001, + ql_dbg(ql_dbg_disc, sess->vha, 0xe001, "Scheduling sess %p for deletion %8phC\n", sess, sess->port_name); From patchwork Wed Aug 5 04:43:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701301 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C63CE6C1 for ; Wed, 5 Aug 2020 04:46:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B67F122CB3 for ; Wed, 5 Aug 2020 04:46:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="JX6bt9DB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725950AbgHEEqb (ORCPT ); Wed, 5 Aug 2020 00:46:31 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:54710 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgHEEqb (ORCPT ); Wed, 5 Aug 2020 00:46:31 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754ZYlg023945 for ; Tue, 4 Aug 2020 21:46:29 -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=pfpt0818; bh=CK+pwEY7yXMx5FPOvNySpmEM8kfvgkg448tLdaFjMMY=; b=JX6bt9DBJh0iD1DZaGN6so4KlDQN28eZeRrKj9jXUzroELaApKJIluuyOjbiag6xGEt6 RfbtbW5D0IKysxxRCU/F13Aw2U2g+77v6uEQp4UQZcm7pBmpZXnRZu8DzKudIG7hAWSv 1fWxROUgGOauEyAbiUjypTOtW53clPlVhXar8W9V4WQdBUcudpV2NkQFFICLzAsKKwgA jFi/OTUfh9+goCIr2ONO/YfZtBdF7NzT0cnrlOmF6KOORc3S0CdS30JWNbf1qpRDHWEG t+fZ1EXfqZhRSmzj4U8aC9diBEh1xho7CM+zJB3vCSP13IiUwyu2LZ7C8ZDzybqapxYg TQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8fn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:46:29 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:46:27 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:46:28 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id BCB4F3F703F; Tue, 4 Aug 2020 21:46:27 -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 0754kRcU030616; Tue, 4 Aug 2020 21:46:27 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754kRwC030615; Tue, 4 Aug 2020 21:46:27 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 05/10] qla2xxx: reduce noisy debug message Date: Tue, 4 Aug 2020 21:43:57 -0700 Message-ID: <20200805044402.30543-6-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran Update debug level and message for ELS IOCB done. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 27bcd346af7c..ab5275dbc338 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -2024,8 +2024,8 @@ qla24xx_els_ct_entry(scsi_qla_host_t *vha, struct req_que *req, res = DID_ERROR << 16; } } - ql_dbg(ql_dbg_user, vha, 0x503f, - "ELS IOCB Done -%s error hdl=%x comp_status=0x%x error subcode 1=0x%x error subcode 2=0x%x total_byte=0x%x\n", + ql_dbg(ql_dbg_disc, vha, 0x503f, + "ELS IOCB Done -%s hdl=%x comp_status=0x%x error subcode 1=0x%x error subcode 2=0x%x total_byte=0x%x\n", type, sp->handle, comp_status, fw_status[1], fw_status[2], le32_to_cpu(ese->total_byte_count)); goto els_ct_done; From patchwork Wed Aug 5 04:43:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701303 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47578138A for ; Wed, 5 Aug 2020 04:46:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F76C22CB3 for ; Wed, 5 Aug 2020 04:46:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="PqfUKWQA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726191AbgHEEqz (ORCPT ); Wed, 5 Aug 2020 00:46:55 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:8664 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbgHEEqz (ORCPT ); Wed, 5 Aug 2020 00:46:55 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754ZZxp023966 for ; Tue, 4 Aug 2020 21:46:54 -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=pfpt0818; bh=eJl5oTVIZhf51hQcKv0eC8odGNRBaC8s508+9KjLF74=; b=PqfUKWQAeoJawyPGAgZASolCI6PbpB3nrvvG7z0+Yz8tf0qYnhguXIiEyOo7RVzqTR+g A1ZdpCMm4eWXVT1EoFdGHMCGYGE39wnVSCJGvAT/NZdrR3VjnGe5WLRib4gXZTafnBkq slSY0Ivn9ZofmBzvLsET8W7J+ZIpasOKF8VtP9OCYpgvV0XyQnsaavtASdFPUIZf3kvm dZatJbJTKxAXP/TDTIaFKpzIKQPgrVVrtUdOHQobNMoe4L3aLKSiNj1R9432cevKkXWl eglhATXwUw6BDRNLvcMwZtlRpCxXEO03aNGCMVuc9dVbDqh++i3ozca0E03ilZdbLieI 2w== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8gm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:46:54 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:46:53 -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.2; Tue, 4 Aug 2020 21:46:52 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:46:52 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id DA4A93F703F; Tue, 4 Aug 2020 21:46:51 -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 0754kpkt030628; Tue, 4 Aug 2020 21:46:51 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754kpn5030619; Tue, 4 Aug 2020 21:46:51 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 06/10] qla2xxx: Allow ql2xextended_error_logging special value 1 to be set anytime Date: Tue, 4 Aug 2020 21:43:58 -0700 Message-ID: <20200805044402.30543-7-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arun Easi ql2xextended_error_logging could now be set anytime to 1 to get the default mask value, as opposed to load time only. Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_dbg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h index 91eb6901815c..e1d7de63e8f8 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.h +++ b/drivers/scsi/qla2xxx/qla_dbg.h @@ -380,5 +380,8 @@ extern int qla24xx_soft_reset(struct qla_hw_data *); static inline int ql_mask_match(uint level) { + if (ql2xextended_error_logging == 1) + ql2xextended_error_logging = QL_DBG_DEFAULT1_MASK; + return (level & ql2xextended_error_logging) == level; } From patchwork Wed Aug 5 04:43:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701305 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F1036C1 for ; Wed, 5 Aug 2020 04:47:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 707A522CB3 for ; Wed, 5 Aug 2020 04:47:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="FDTPZcuL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725887AbgHEErU (ORCPT ); Wed, 5 Aug 2020 00:47:20 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:21388 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbgHEErU (ORCPT ); Wed, 5 Aug 2020 00:47:20 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754ZZqI023968 for ; Tue, 4 Aug 2020 21:47:18 -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=pfpt0818; bh=6tH6vLqUhUnBnp73H+Qa/+UpXiH+uaVtJLF1ElYn8js=; b=FDTPZcuLxSJrsNne7ymxK3Bv8niB52W9lXnbL+WYalWwkxzuJrkA3z/1n7BGAUY5gdC8 rmhJgM6LZm+WVvbY3YM9b/P9yR3uiubfs3W70MMQFzMOwU7OTCf/TMY7cBX6JjGk025O GWdzxlvUJWqSX5IZhJHT22AxlBMVziB5qgkmm74jUTl1y6Jpmzz0Ymm2VEYBos/VI940 KXwK2Dc8HTAXgyg9+Erfi1n+dZ43YSB839gLPI5vhUSiQcX3jCgJauCJGxyBumZoiPaf h/SSuO1vUxQysClRHNAGJOgUIaMDRJ0y6e5zRHJ5EKhJGdGdmWd26fcgOA1u4nvXsT8v MA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8hg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:47:18 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:47: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.2; Tue, 4 Aug 2020 21:47:16 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:47:16 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 06D143F7043; Tue, 4 Aug 2020 21:47: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 0754lFAR030632; Tue, 4 Aug 2020 21:47:15 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754lFhI030631; Tue, 4 Aug 2020 21:47:15 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 07/10] qla2xxx: Fix WARN_ON in qla_nvme_register_hba Date: Tue, 4 Aug 2020 21:43:59 -0700 Message-ID: <20200805044402.30543-8-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arun Easi qla_nvme_register_hba puts out a warning when there are not enough queue pairs available for FC-NVME. Just fail the NVME registration rather than a WARNING + Call Trace. Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_nvme.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 8c92af5e4390..1bc090d8a71b 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3880,6 +3880,7 @@ struct qla_hw_data { uint32_t scm_supported_f:1; /* Enabled in Driver */ uint32_t scm_enabled:1; + uint32_t max_req_queue_warned:1; } flags; uint16_t max_exchg; diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index d66d47a0f958..be1d49f5c622 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -686,7 +686,15 @@ int qla_nvme_register_hba(struct scsi_qla_host *vha) tmpl = &qla_nvme_fc_transport; WARN_ON(vha->nvme_local_port); - WARN_ON(ha->max_req_queues < 3); + + 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), From patchwork Wed Aug 5 04:44:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701307 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E946A13B1 for ; Wed, 5 Aug 2020 04:47:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9A932177B for ; Wed, 5 Aug 2020 04:47:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="kfCrLGV6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725950AbgHEEru (ORCPT ); Wed, 5 Aug 2020 00:47:50 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:28930 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbgHEEru (ORCPT ); Wed, 5 Aug 2020 00:47:50 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754ll2A007044 for ; Tue, 4 Aug 2020 21:47:49 -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=pfpt0818; bh=HSrhICL+l6PibeSHcC7kpM/iAyeIK7hXRPn8BAVe3Ws=; b=kfCrLGV65N/C6TO62BwbdM1YjNmIVmsbHdUUlHGzvHEhFY06cZ8xYG39W4H5F53FMDDo cUUrzD7ZiVavDCgBDJ6c7GzOoFXr+jAY2j1yEzK3w5RQml3VkE7qB0pPhmW20n16nC/K lpnHN0MUjZhCKRa+rh7fihPCxC8Wsus77sLVNxNoW5KGgHc/0oGZ3GFOp3FGicrV/k5b fzfYaoeo9nej5rfZygvcSyv0ej/qltPR++EOc0ODvM/fe/weZjrU+7CRZSUA851GGaUS 2wqHTOoayyK5DcsJjYtVC5EoWwwrHwUgh8asuSXPG+Y5yMBhPk4ych5dRu8OYEBU1MDD gg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8j0-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:47:49 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:47:40 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:47:40 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 268EC3F703F; Tue, 4 Aug 2020 21:47:40 -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 0754leWg030644; Tue, 4 Aug 2020 21:47:40 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754ldCH030635; Tue, 4 Aug 2020 21:47:39 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 08/10] qla2xxx: Check if FW supports MQ before enabling Date: Tue, 4 Aug 2020 21:44:00 -0700 Message-ID: <20200805044402.30543-9-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap OS boot during Boot from SAN was stuck at dracut emergency shell after enabling nvme driver parameter. For non MQ support the driver was enabling MQ. Add a check to confirm if FW supports MQ. Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_os.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 9b59f032a569..fda812b9b564 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -2017,6 +2017,11 @@ qla2x00_iospace_config(struct qla_hw_data *ha) /* Determine queue resources */ ha->max_req_queues = ha->max_rsp_queues = 1; ha->msix_count = QLA_BASE_VECTORS; + + /* Check if FW supports MQ or not */ + if (!(ha->fw_attributes & BIT_6)) + goto mqiobase_exit; + if (!ql2xmqsupport || !ql2xnvmeenable || (!IS_QLA25XX(ha) && !IS_QLA81XX(ha))) goto mqiobase_exit; From patchwork Wed Aug 5 04:44:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701309 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1A32138A for ; Wed, 5 Aug 2020 04:48:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A1B162177B for ; Wed, 5 Aug 2020 04:48:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="JoYJlcZR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725981AbgHEEsH (ORCPT ); Wed, 5 Aug 2020 00:48:07 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:23488 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbgHEEsG (ORCPT ); Wed, 5 Aug 2020 00:48:06 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754lmvA007045 for ; Tue, 4 Aug 2020 21:48:05 -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=pfpt0818; bh=1YWcJq7RVq5b10lCa1znTek+sSvOxoP5P3pHcgoT40A=; b=JoYJlcZRIzRXRq59kngtcNyWCaF3SCJBTlWh+4g9N+SysdASRdbynB0vPEJTxjHWZ53V 4U+A9AFnt9RBcsf3Cl2f/HHMAkOg3KXRVV+Q7kCJZvwhwnoHbHzHqZLMjk+mn6EmVTin EIoNZM8rL3z2EVaL/5Rt2UQ/NRyWbMKsrSiJYByjHaqQlI5o6Iv30jgHjlrrfPuCXFqU EubEQhTYc2wcsRO+KQFU+RwIQMhBleWJ7jsDwrJlIPRBw+TPyCQ5LvK0p+NG0z1EcaIa NTlL6HiJZLz4Kh0jcHoA4kwW38RpmOr580WBQiMMtDJNnAEHahdUhO8ISu3gQ8rGTBzu Eg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8kr-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:48:05 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:48:04 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:48:04 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 45A0F3F703F; Tue, 4 Aug 2020 21:48: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 0754m4Ie030648; Tue, 4 Aug 2020 21:48:04 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754m42c030647; Tue, 4 Aug 2020 21:48:04 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 09/10] qla2xxx: fix null pointer access while connections disconnect from subsystem Date: Tue, 4 Aug 2020 21:44:01 -0700 Message-ID: <20200805044402.30543-10-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran NVMEAsync command is being submitted to QLA, while the same nvme controller is in the middle of reset. The reset path has deleted the association and freed aen_op->fcp_req.private. Add a check for this private pointer before issuing the command. ... 6 [ffffb656ca11fce0] page_fault at ffffffff8c00114e [exception RIP: qla_nvme_post_cmd+394] RIP: ffffffffc0d012ba RSP: ffffb656ca11fd98 RFLAGS: 00010206 RAX: ffff8fb039eda228 RBX: ffff8fb039eda200 RCX: 00000000000da161 RDX: ffffffffc0d4d0f0 RSI: ffffffffc0d26c9b RDI: ffff8fb039eda220 RBP: 0000000000000013 R8: ffff8fb47ff6aa80 R9: 0000000000000002 R10: 0000000000000000 R11: ffffb656ca11fdc8 R12: ffff8fb27d04a3b0 R13: ffff8fc46dd98a58 R14: 0000000000000000 R15: ffff8fc4540f0000 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 7 [ffffb656ca11fe08] nvme_fc_start_fcp_op at ffffffffc0241568 [nvme_fc] 8 [ffffb656ca11fe50] nvme_fc_submit_async_event at ffffffffc0241901 [nvme_fc] 9 [ffffb656ca11fe68] nvme_async_event_work at ffffffffc014543d [nvme_core] 10 [ffffb656ca11fe98] process_one_work at ffffffff8b6cd437 11 [ffffb656ca11fed8] worker_thread at ffffffff8b6cdcef 12 [ffffb656ca11ff10] kthread at ffffffff8b6d3402 13 [ffffb656ca11ff50] ret_from_fork at ffffffff8c000255 --- PID: 37824 TASK: ffff8fb033063d80 CPU: 20 COMMAND: "kworker/u97:451" 0 [ffffb656ce1abc28] __schedule at ffffffff8be629e3 1 [ffffb656ce1abcc8] schedule at ffffffff8be62fe8 2 [ffffb656ce1abcd0] schedule_timeout at ffffffff8be671ed 3 [ffffb656ce1abd70] wait_for_completion at ffffffff8be639cf 4 [ffffb656ce1abdd0] flush_work at ffffffff8b6ce2d5 5 [ffffb656ce1abe70] nvme_stop_ctrl at ffffffffc0144900 [nvme_core] 6 [ffffb656ce1abe80] nvme_fc_reset_ctrl_work at ffffffffc0243445 [nvme_fc] 7 [ffffb656ce1abe98] process_one_work at ffffffff8b6cd437 8 [ffffb656ce1abed8] worker_thread at ffffffff8b6cdb50 9 [ffffb656ce1abf10] kthread at ffffffff8b6d3402 10 [ffffb656ce1abf50] ret_from_fork at ffffffff8c000255 Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_nvme.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index be1d49f5c622..f451683db75c 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -535,6 +535,11 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, struct nvme_private *priv = fd->private; struct qla_nvme_rport *qla_rport = rport->private; + if (!priv) { + /* nvme association has been torn down */ + return rval; + } + fcport = qla_rport->fcport; if (!qpair || !fcport || (qpair && !qpair->fw_started) || From patchwork Wed Aug 5 04:44:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 11701311 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE2396C1 for ; Wed, 5 Aug 2020 04:48:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADAA322CBB for ; Wed, 5 Aug 2020 04:48:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="jthK7xWl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726256AbgHEEsb (ORCPT ); Wed, 5 Aug 2020 00:48:31 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:40084 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbgHEEsa (ORCPT ); Wed, 5 Aug 2020 00:48:30 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0754lqAp007252 for ; Tue, 4 Aug 2020 21:48:30 -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=pfpt0818; bh=BX99jQrXhv7ip7IPsuey4HBNZzFoQRcaxUPdXDDEp9s=; b=jthK7xWlAxbjWk1eaYgGVm8vIQLdsIXbmHVRp6jyPeAxkCN7xxpPwKXWiLBPc0FV65nf LwvDX+4PZgI+oSjStwdGZ3+pIWbBY87vn+PDS0LeKzyiZ6hhSwYMggX5JorSFsv2V6b2 QZD1ccPTkrn9c1W7WPDhXZ5FBPRplm28nrarBz3spRipaLzhxChzDlUa1Ctv2plK/1xh m4acBhWKFqi1+F8sUPbXRUpaeuu1J74bNifvVpf2+MSPI5VriqwaTPO88vEyfvMJRoyz L73lm3yZdU0W0+rYR913yx+UY4cwXmEJ9+wFErGNArOriZsMhzWk4vqdPmooOd4t3gj8 uQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 32n8fex8nn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 04 Aug 2020 21:48:30 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 21:48:28 -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.2 via Frontend Transport; Tue, 4 Aug 2020 21:48:28 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 64FE53F703F; Tue, 4 Aug 2020 21:48:28 -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 0754mSmn030652; Tue, 4 Aug 2020 21:48:28 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0754mS9r030651; Tue, 4 Aug 2020 21:48:28 -0700 From: Nilesh Javali To: CC: , Subject: [PATCH 10/10] Revert "scsi: qla2xxx: Fix crash on qla2x00_mailbox_command" Date: Tue, 4 Aug 2020 21:44:02 -0700 Message-ID: <20200805044402.30543-11-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200805044402.30543-1-njavali@marvell.com> References: <20200805044402.30543-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-05_03:2020-08-03,2020-08-05 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org FCoE adapter initialization failed for ISP8021. This reverts commit 3cb182b3fa8b7a61f05c671525494697cba39c6a. Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_mbx.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 73883435ab58..93aafef7f21c 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -334,14 +334,6 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) if (time_after(jiffies, wait_time)) break; - /* - * Check if it's UNLOADING, cause we cannot poll in - * this case, or else a NULL pointer dereference - * is triggered. - */ - if (unlikely(test_bit(UNLOADING, &base_vha->dpc_flags))) - return QLA_FUNCTION_TIMEOUT; - /* Check for pending interrupts. */ qla2x00_poll(ha->rsp_q_map[0]);