From patchwork Wed Apr 8 06:43:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 11479465 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 6E6B61392 for ; Wed, 8 Apr 2020 06:43:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E1472074F for ; Wed, 8 Apr 2020 06:43:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="IvXt6dGa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbgDHGnp (ORCPT ); Wed, 8 Apr 2020 02:43:45 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:44200 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726146AbgDHGno (ORCPT ); Wed, 8 Apr 2020 02:43:44 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0386f71u031042; Tue, 7 Apr 2020 23:43:39 -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=vwKelhqUYMrPdrew/4dT6RRjJjd/icNbgOjZwRCkK58=; b=IvXt6dGaDCzhRVaDQJ+m9x0TPnNuAiVXKKojui15Cy5PwJjmoIgK4I1mz1I4qwss7Guy Dvw8jgO/yOkitHUWZZjbESMT5n37Bt2pArTFNhcNr/esbZJ031waOJjNOO3RRTuLXg0z c9I21iMI0OFk3mc0uhUrVbipPWa71PqqyaVyVWuMunM/HlGgG7mVxAtFJAAnB8bzvcMw RRotP+r8a1K2/Fgrq5m73IVGoVamsL6HLy1JymJ0zDWLc/CrH7tm2b8c1fbui6wm/bs/ 08I5w66DiMvfe1msaF7qZmgba17gjnCwYuAyASqHweU08RQbe6VLtTJLYD2QSboLknWB cg== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3091jwa0qs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Apr 2020 23:43:39 -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, 7 Apr 2020 23:43:37 -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, 7 Apr 2020 23:43:38 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 65BD83F7045; Tue, 7 Apr 2020 23:43:36 -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 0386haJ0019416; Tue, 7 Apr 2020 23:43:36 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0386haJq019415; Tue, 7 Apr 2020 23:43:36 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH 1/6] qedi: Remove additional char from boot target iqnname. Date: Tue, 7 Apr 2020 23:43:27 -0700 Message-ID: <20200408064332.19377-2-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200408064332.19377-1-mrangankar@marvell.com> References: <20200408064332.19377-1-mrangankar@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-07_10:2020-04-07,2020-04-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org While parsing the iSCSI TLV data to MFW request, fw boot target iqnname string was having additional character because of which we are getting below error even after the boot from SAN target were logged-in. "[qedi_get_protocol_tlv_data:1197]:1: Boot target not set" Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index b995b19..2fe1140 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -921,7 +921,7 @@ static void qedi_get_boot_tgt_info(struct nvm_iscsi_block *block, ipv6_en = !!(block->generic.ctrl_flags & NVM_ISCSI_CFG_GEN_IPV6_ENABLED); - snprintf(tgt->iscsi_name, sizeof(tgt->iscsi_name), "%s\n", + snprintf(tgt->iscsi_name, sizeof(tgt->iscsi_name), "%s", block->target[index].target_name.byte); tgt->ipv6_en = ipv6_en; From patchwork Wed Apr 8 06:43:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 11479467 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 BEA5492C for ; Wed, 8 Apr 2020 06:43:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D49E2074F for ; Wed, 8 Apr 2020 06:43:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="GFDNSRgz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbgDHGns (ORCPT ); Wed, 8 Apr 2020 02:43:48 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:57214 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbgDHGns (ORCPT ); Wed, 8 Apr 2020 02:43:48 -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 0386f87D025980; Tue, 7 Apr 2020 23:43: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=dKamY4f+QbonkgYJI4Smw78MQqd3FSDmPp3fPgTwR5A=; b=GFDNSRgzCsOcrjx13hXO3J65yjxRGbIp1CTQjcI63wranpdKUBASjOmsTfXI1aYpGupl JcVUYkodOT1h7HMaPoy5iQVYchFVzUl/h4vKwzBXpc0LIZMiCYyrGgcJqznasIYTfVFU nmzUG3ELU5notSrJb9fkFIs9blkMFix43qZYaYLO7wxlat5AGGUEOodUbY9SfmV7nBif MI2eva4t+UEHIplZD71SOY/LFvlAyKTDHRKoG60gwiNgpAzLkygdiULr8HymlzdSIRgF mjpl0foc/skVWVwiETVREWTsTW++VFojiKvwKeq9kY5zVlMcNadYG3+K0xdBgPrQQFrm nA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3091me1yjv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Apr 2020 23:43:42 -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, 7 Apr 2020 23:43:40 -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, 7 Apr 2020 23:43:39 -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, 7 Apr 2020 23:43:39 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id AF8E53F7040; Tue, 7 Apr 2020 23:43: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 0386hdRW019420; Tue, 7 Apr 2020 23:43:39 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0386hdTM019419; Tue, 7 Apr 2020 23:43:39 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH 2/6] qedi: Avoid unnecessary endpoint allocation on link down Date: Tue, 7 Apr 2020 23:43:28 -0700 Message-ID: <20200408064332.19377-3-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200408064332.19377-1-mrangankar@marvell.com> References: <20200408064332.19377-1-mrangankar@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-07_10:2020-04-07,2020-04-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org No need to allocate and deallocate endpoint memory, if the physical link is down. Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_iscsi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c index 1f4a5fb..26b1151 100644 --- a/drivers/scsi/qedi/qedi_iscsi.c +++ b/drivers/scsi/qedi/qedi_iscsi.c @@ -836,6 +836,11 @@ static int qedi_task_xmit(struct iscsi_task *task) return ERR_PTR(ret); } + if (atomic_read(&qedi->link_state) != QEDI_LINK_UP) { + QEDI_WARN(&qedi->dbg_ctx, "qedi link down\n"); + return ERR_PTR(-ENXIO); + } + ep = iscsi_create_endpoint(sizeof(struct qedi_endpoint)); if (!ep) { QEDI_ERR(&qedi->dbg_ctx, "endpoint create fail\n"); @@ -870,12 +875,6 @@ static int qedi_task_xmit(struct iscsi_task *task) QEDI_ERR(&qedi->dbg_ctx, "Invalid endpoint\n"); } - if (atomic_read(&qedi->link_state) != QEDI_LINK_UP) { - QEDI_WARN(&qedi->dbg_ctx, "qedi link down\n"); - ret = -ENXIO; - goto ep_conn_exit; - } - ret = qedi_alloc_sq(qedi, qedi_ep); if (ret) goto ep_conn_exit; From patchwork Wed Apr 8 06:43:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 11479469 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 6AD9492C for ; Wed, 8 Apr 2020 06:43:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A0112075E for ; Wed, 8 Apr 2020 06:43:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="k6A0M7Ii" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbgDHGnu (ORCPT ); Wed, 8 Apr 2020 02:43:50 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:5948 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbgDHGnt (ORCPT ); Wed, 8 Apr 2020 02:43:49 -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 0386eZPu025142; Tue, 7 Apr 2020 23:43:44 -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=O3C0sOO85+ldsNc7SdAAa9jeTe4Wh8gPZW/yZn8jHqo=; b=k6A0M7Ii+qbS7nkz+UyZekUYY8PvWi24AGoOyeZKH7ZXgDPLARjtM1Ka0v6kWiHC89Dj VGivJ/do7WR5EiLKkckJQWuabU/Yp7lJtwHlcMN/CBqKY5GTg7zBqG3rOlUQTc6xvgRo Voa2vxqvSFnHfKZqRPwTP97uGuTuK9KkwrjE1pqoEoya/YNftx8Od8jA2aqfEecQIQJ8 FaByQIteiR7SFeEa5XKwGgA/1BtmjwcMySFgv3jifVfY+jyttoc+MaG5RPvT4YZdRUn3 rexqMQghe2wo6Sr/yWp+FXjFsVsVeE9Ni9UzbHBXs1+vnrsjhmtmaYSVGhSNiKnBQPB1 eQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3091me1yk6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Apr 2020 23:43:44 -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, 7 Apr 2020 23:43:42 -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, 7 Apr 2020 23:43:43 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id DE8063F703F; Tue, 7 Apr 2020 23:43:42 -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 0386hgsb019424; Tue, 7 Apr 2020 23:43:42 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0386hgxd019423; Tue, 7 Apr 2020 23:43:42 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH 3/6] qedi: Use correct msix count for fastpath vectors. Date: Tue, 7 Apr 2020 23:43:29 -0700 Message-ID: <20200408064332.19377-4-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200408064332.19377-1-mrangankar@marvell.com> References: <20200408064332.19377-1-mrangankar@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-07_10:2020-04-07,2020-04-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org For proper allocation between slow-path and fast-path use msix count provided by qed. Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 2fe1140..f1d998c 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -1360,7 +1360,7 @@ static int qedi_request_msix_irq(struct qedi_ctx *qedi) u16 idx; cpu = cpumask_first(cpu_online_mask); - for (i = 0; i < MIN_NUM_CPUS_MSIX(qedi); i++) { + for (i = 0; i < qedi->int_info.msix_cnt; i++) { idx = i * qedi->dev_info.common.num_hwfns + qedi_ops->common->get_affin_hwfn_idx(qedi->cdev); From patchwork Wed Apr 8 06:43:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 11479471 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 6E2AB1392 for ; Wed, 8 Apr 2020 06:43:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B3272072A for ; Wed, 8 Apr 2020 06:43:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="xeg2VIUV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726545AbgDHGnz (ORCPT ); Wed, 8 Apr 2020 02:43:55 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:36546 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726477AbgDHGny (ORCPT ); Wed, 8 Apr 2020 02:43:54 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0386f8nF031052; Tue, 7 Apr 2020 23:43: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=pfpt0818; bh=siZ+YXG2BvIdHnWnBV8TZ5AQYZIvgXt1c0Eer5ft7XU=; b=xeg2VIUVTk5ShxM4/C3TpGJSgh3OVpeCRu8wDDDmQAFpxtkL+7zxteB6SIBJJUMLjNWo 92Mlz5faohdhGlE0If8TwGKEXeBn2zalNmqnpGbCKtwvnlv4v6MUweUQ3GC7G0k928f7 YpVxQUsvJHjKEVz/XcgXww5uEErV+ekuhWimgSrPYp8bWJBWoAy4kMIGIu4WvF8P3F2g SiqxWxk7ICn4anj/Db36ejA3ktQklxzUmgHXPD/nu4cYI5sVppDRePeSgSm5Q3eCg0Dq SsDnwQwGgSOzUKWAE0C9JeBBgHVnlSvvRX3F2socdcC581YXrA91IRDfyK7U3bt8DQSw Dg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 3091jwa0r7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Apr 2020 23:43:47 -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, 7 Apr 2020 23:43:45 -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, 7 Apr 2020 23:43:46 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 178853F703F; Tue, 7 Apr 2020 23:43:46 -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 0386hjVJ019428; Tue, 7 Apr 2020 23:43:45 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0386hjLX019427; Tue, 7 Apr 2020 23:43:45 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH 4/6] qedi: Do not flush offload work if ARP not resolved. Date: Tue, 7 Apr 2020 23:43:30 -0700 Message-ID: <20200408064332.19377-5-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200408064332.19377-1-mrangankar@marvell.com> References: <20200408064332.19377-1-mrangankar@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-07_10:2020-04-07,2020-04-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Nilesh Javali For non-reachable target offload_work is not initialized, and endpoint state is set to OFLD_NONE. This result into the WARN_ON due to check of work function field set to zero. ------------[ cut here ]------------ WARNING: CPU: 24 PID: 18587 at ../kernel/workqueue.c:3037 __flush_work+0x1c1/0x1d0 : Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 02/01/2020 RIP: 0010:__flush_work+0x1c1/0x1d0 Code: ba 6d 00 03 80 c9 f0 eb b6 48 c7 c7 20 ee 6c a4 e8 52 d3 04 00 0f 0b 31 c0 e9 d1 fe ff ff 48 c7 c7 20 ee 6c a4 e8 3d d3 04 00 <0f> 0b 31 c0 e9 bc fe ff ff e8 11 f3 f 00 31 f6 RSP: 0018:ffffac5a8cd47a80 EFLAGS: 00010282 RAX: 0000000000000024 RBX: ffff98d68c1fcaf0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff98ce9fd99898 RDI: ffff98ce9fd99898 RBP: ffff98d68c1fcbc0 R08: 00000000000006fa R09: 0000000000000001 R10: ffffac5a8cd47b50 R11: 0000000000000001 R12: 0000000000000000 R13: 000000000000489b R14: ffff98d68c1fc800 R15: ffff98d692132c00 FS: 00007f65f7f62280(0000) GS:ffff98ce9fd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd2435e880 CR3: 0000000809334003 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? class_create_release+0x40/0x40 ? klist_put+0x2c/0x80 qedi_ep_disconnect+0xdd/0x400 [qedi] iscsi_if_ep_disconnect.isra.20+0x59/0x70 [scsi_transport_iscsi] iscsi_if_rx+0x129b/0x1670 [scsi_transport_iscsi] ? __netlink_lookup+0xe7/0x160 netlink_unicast+0x21d/0x300 netlink_sendmsg+0x30f/0x430 sock_sendmsg+0x5b/0x60 ____sys_sendmsg+0x1e2/0x240 ? copy_msghdr_from_user+0xd9/0x160 ___sys_sendmsg+0x88/0xd0 ? ___sys_recvmsg+0xa2/0xe0 ? hrtimer_try_to_cancel+0x25/0x100 ? do_nanosleep+0x9c/0x170 ? __sys_sendmsg+0x5e/0xa0 __sys_sendmsg+0x5e/0xa0 do_syscall_64+0x60/0x1f0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f65f6f16107 Code: 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 80 00 00 00 00 8b 05 aa d2 2b 00 48 63 d2 48 63 ff 85 c0 75 18 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 59 f3 c3 0f 1f 8 0 00 00 00 00 53 48 89 f3 48 RSP: 002b:00007ffd24367ca8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000055a7aeaaf110 RCX: 00007f65f6f16107 RDX: 0000000000000000 RSI: 00007ffd24367cc0 RDI: 0000000000000003 RBP: 0000000000000070 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000075c R11: 0000000000000246 R12: 00007ffd24367cc0 R13: 000055a7ae560008 R14: 00007ffd24367db0 R15: 0000000000000000 ---[ end trace 54f499c05d41f8bb ]--- Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_iscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c index 26b1151..80c724b 100644 --- a/drivers/scsi/qedi/qedi_iscsi.c +++ b/drivers/scsi/qedi/qedi_iscsi.c @@ -1000,7 +1000,8 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep) if (qedi_ep->state == EP_STATE_OFLDCONN_START) goto ep_exit_recover; - flush_work(&qedi_ep->offload_work); + if (qedi_ep->state != EP_STATE_OFLDCONN_NONE) + flush_work(&qedi_ep->offload_work); if (qedi_ep->conn) { qedi_conn = qedi_ep->conn; From patchwork Wed Apr 8 06:43:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 11479475 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 BB85292C for ; Wed, 8 Apr 2020 06:44:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A1742075E for ; Wed, 8 Apr 2020 06:44:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="nMLf4PmE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbgDHGoL (ORCPT ); Wed, 8 Apr 2020 02:44:11 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:27470 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbgDHGoL (ORCPT ); Wed, 8 Apr 2020 02:44:11 -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 0386f87G025980; Tue, 7 Apr 2020 23:44: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=oOgwQYFH4kqaGAdkSIBMYKGs+7G/KTQXPe2ITpmkVcI=; b=nMLf4PmEHpGpp6JpA3TSZLxwVwsf4nKduwyVvqstA8vV9bb7ZdVVyyyQWpGHYgWFHzTP SO2QsEll9kAejQZygg1JO+U3VhQ8Lo+HrLX/PaU0GGE94mCvR+8kVoblf+Yi2zXXbDcU is52C3EUgVbGkNp+LTF/ouh3I62gD2OeYJ7Q7vVyI8SjeZZoSLgYvCheJ4K8fWooEo1Z gzxFVdBvilD3fTTzs4Lqi7Axzis8BKhdzPGExN1ENroLsfzAmoAD7qOelVLGk7LUUq6y /1rACPVGoQ4dxAK15wTUAkfI5VdIM63ODiymB1VDo5pE9UaRqFumbMfzGiL8AedgK2Y7 Jw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3091me1yk1-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Apr 2020 23:44:06 -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, 7 Apr 2020 23:43:49 -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, 7 Apr 2020 23:43:49 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 47C123F703F; Tue, 7 Apr 2020 23:43:49 -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 0386hn6R019432; Tue, 7 Apr 2020 23:43:49 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0386hnnh019431; Tue, 7 Apr 2020 23:43:49 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH 5/6] qedi: Add modules param to enable qed iSCSI debug. Date: Tue, 7 Apr 2020 23:43:31 -0700 Message-ID: <20200408064332.19377-6-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200408064332.19377-1-mrangankar@marvell.com> References: <20200408064332.19377-1-mrangankar@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-07_10:2020-04-07,2020-04-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Add module parameter support to enable debug message specific to iSCSI functions. Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index f1d998c..b9a5c84 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -28,6 +28,10 @@ #include "qedi_gbl.h" #include "qedi_iscsi.h" +static uint qedi_qed_debug; +module_param(qedi_qed_debug, uint, 0644); +MODULE_PARM_DESC(qedi_qed_debug, " QED debug level 0 (default)"); + static uint qedi_fw_debug; module_param(qedi_fw_debug, uint, 0644); MODULE_PARM_DESC(qedi_fw_debug, " Firmware debug level 0(default) to 3"); @@ -2422,7 +2426,6 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) { struct qedi_ctx *qedi; struct qed_ll2_params params; - u32 dp_module = 0; u8 dp_level = 0; bool is_vf = false; char host_buf[16]; @@ -2445,7 +2448,7 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) memset(&qed_params, 0, sizeof(qed_params)); qed_params.protocol = QED_PROTOCOL_ISCSI; - qed_params.dp_module = dp_module; + qed_params.dp_module = qedi_qed_debug; qed_params.dp_level = dp_level; qed_params.is_vf = is_vf; qedi->cdev = qedi_ops->common->probe(pdev, &qed_params); From patchwork Wed Apr 8 06:43:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 11479473 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 293951392 for ; Wed, 8 Apr 2020 06:44:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08E9D2075E for ; Wed, 8 Apr 2020 06:44:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="COX4pMpC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726566AbgDHGn7 (ORCPT ); Wed, 8 Apr 2020 02:43:59 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:40870 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbgDHGn7 (ORCPT ); Wed, 8 Apr 2020 02:43:59 -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 0386emwf025182; Tue, 7 Apr 2020 23:43: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=7svR/YTSPxP3A/E2SxL95L7h5JARrcSytHzq0dP8vOE=; b=COX4pMpCnZJ0Q2JvkU0uf1A/DHh0V5cMlPRzVOyFqRPCtqWoUAOOlDYdySgoccQggb4n J3XKq+lynhkne5uujmkPO4LMKUrg3Z1go+nnbMuVitiL3zc2INq9KXvR+nv9lwCpR3KW 2nCJhVrW5mIEXmMSSMLzbmYC4V5ODhl+K0QTNoDUVMcGyXnE1W9TiBT31O0CM0FU4LED I5WGp0HVhZO219t+I/uyPsovXpTjBT/+AXk2xDZPu1ePVL0niEYSjBVXKaRql6S4Jh7n sCgSUnbxyatUDLFu2lvOsdg43MrHazIK+HQkUmjkMlT2/hV9HTYM9iNE7EXmKHhBmTga KQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 3091me1ykv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Apr 2020 23:43:54 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Apr 2020 23:43: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, 7 Apr 2020 23:43:52 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 74AAC3F703F; Tue, 7 Apr 2020 23:43:52 -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 0386hqCZ019444; Tue, 7 Apr 2020 23:43:52 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 0386hqf2019435; Tue, 7 Apr 2020 23:43:52 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH 6/6] qedi: Fix termination timeouts in session logout Date: Tue, 7 Apr 2020 23:43:32 -0700 Message-ID: <20200408064332.19377-7-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200408064332.19377-1-mrangankar@marvell.com> References: <20200408064332.19377-1-mrangankar@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-07_10:2020-04-07,2020-04-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Nilesh Javali The destroy conn ramrod timedout while session logouts. Fix the wait delay for graceful vs abortive termination as per the FW requirements. Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c index 80c724b..b867a14 100644 --- a/drivers/scsi/qedi/qedi_iscsi.c +++ b/drivers/scsi/qedi/qedi_iscsi.c @@ -1065,6 +1065,9 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep) break; } + if (!abrt_conn) + wait_delay += qedi->pf_params.iscsi_pf_params.two_msl_timer; + qedi_ep->state = EP_STATE_DISCONN_START; ret = qedi_ops->destroy_conn(qedi->cdev, qedi_ep->handle, abrt_conn); if (ret) {