From patchwork Fri Apr 19 06:29:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 10909049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FB7D1850 for ; Fri, 19 Apr 2019 18:15:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06ED928D95 for ; Fri, 19 Apr 2019 18:15:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEDF028D9B; Fri, 19 Apr 2019 18:15:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 742AC28D95 for ; Fri, 19 Apr 2019 18:15:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725878AbfDSSPm (ORCPT ); Fri, 19 Apr 2019 14:15:42 -0400 Received: from mail-eopbgr740055.outbound.protection.outlook.com ([40.107.74.55]:17293 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725280AbfDSSPk (ORCPT ); Fri, 19 Apr 2019 14:15:40 -0400 Received: from BN8PR07CA0018.namprd07.prod.outlook.com (2603:10b6:408:ac::31) by BN7PR07MB4403.namprd07.prod.outlook.com (2603:10b6:406:b6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.12; Fri, 19 Apr 2019 06:30:00 +0000 Received: from DM3NAM05FT054.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::205) by BN8PR07CA0018.outlook.office365.com (2603:10b6:408:ac::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1813.12 via Frontend Transport; Fri, 19 Apr 2019 06:30:00 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by DM3NAM05FT054.mail.protection.outlook.com (10.152.98.168) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1792.7 via Frontend Transport; Fri, 19 Apr 2019 06:29:59 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Thu, 18 Apr 2019 23:29:55 -0700 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 x3J6Ttnk025961; Thu, 18 Apr 2019 23:29:55 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x3J6TtPt025960; Thu, 18 Apr 2019 23:29:55 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH 1/2] qedi: Abort ep termination if offload not scheduled. Date: Thu, 18 Apr 2019 23:29:51 -0700 Message-ID: <20190419062952.25922-2-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190419062952.25922-1-mrangankar@marvell.com> References: <20190419062952.25922-1-mrangankar@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 132001289998814824;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(136003)(39860400002)(376002)(346002)(396003)(2980300002)(1110001)(339900001)(189003)(199004)(2906002)(69596002)(316002)(11346002)(446003)(110136005)(16586007)(36906005)(42186006)(85426001)(36756003)(87636003)(26826003)(81156014)(54906003)(5660300002)(107886003)(50226002)(70586007)(70206006)(86362001)(498600001)(53936002)(4326008)(80596001)(8676002)(2201001)(97736004)(8936002)(81166006)(1076003)(26005)(14444005)(6666004)(305945005)(76130400001)(356004)(51416003)(76176011)(50466002)(48376002)(2616005)(486006)(105606002)(126002)(476003)(47776003)(68736007)(336012);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR07MB4403;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd5fd626-6fb9-4017-8038-08d6c49072bc X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600141)(711020)(4605104)(2017052603328);SRVR:BN7PR07MB4403; X-MS-TrafficTypeDiagnostic: BN7PR07MB4403: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0012E6D357 X-Microsoft-Antispam-Message-Info: dLoqEP+4WIGIaIk4Pk2rSToNwFzFP3hoJpV5qmyTqUJ0mjXyUXsiG9ctmCPL/YPyleghWYRH3nxjDrRx09wTzsTm4/zWsvJdOHZyoiC3vJIZsIG+j4Y3jC3nGscCE1tCXGcTuTWQxlRy9Hya3ngMY/cLLDSTCDafmUyI7VtWfoD+9exncl2hmMdC5XnGR/gJPAA9K6kodqX3qalUNtiju38qMy72HbHzgWFA4R87WzJd7JbnMBaqGISaaejgX5qTOfwO5zggq5WTDI3XkncDiByf2TIp8MDoRG+rX+7wzWgORPIZUeh/QLqdCXPvJK4XD0n81K38xqQLrh00QCu3nujWSIbn8ScHhsfO+zMt6XL8LMqX///84Ao084qyUpLbxRgDNoCp7go/aVY8Cajgz14utqm98IzXAa7MbSJ/xh0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2019 06:29:59.5402 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd5fd626-6fb9-4017-8038-08d6c49072bc X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR07MB4403 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kernel: WARNING: CPU: 19 PID: 10110 at kernel/workqueue.c:3030 __flush_work.isra.34+0x19c/0x1b0 kernel: CPU: 19 PID: 10110 Comm: iscsid Tainted: G W 5.1.0-rc4 #11 kernel: Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 2.9.1 12/04/2018 kernel: RIP: 0010:__flush_work.isra.34+0x19c/0x1b0 kernel: Code: 8b fb 66 0f 1f 44 00 00 31 c0 eb ab 48 89 ef c6 07 00 0f 1f 40 00 fb 66 0f 1f 44 00 00 31 c0 eb 96 e8 08 16 fe ff 0f 0b eb 8d <0f> 0b 31 c0 eb 87 0f 1f 40 00 66 2e 0f 1 f 84 00 00 00 00 00 0f 1f kernel: RSP: 0018:ffffa6b4054dba68 EFLAGS: 00010246 kernel: RAX: 0000000000000000 RBX: ffff91df21c36fc0 RCX: 0000000000000000 kernel: RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff91df21c36fc0 kernel: RBP: ffff91df21c36ef0 R08: 0000000000000000 R09: 0000000000000000 kernel: R10: 0000000000000038 R11: ffffa6b4054dbd60 R12: ffffffffc05e72c0 kernel: R13: ffff91db10280820 R14: 0000000000000048 R15: 0000000000000000 kernel: FS: 00007f5d83cc1740(0000) GS:ffff91df2f840000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000001cc5000 CR3: 0000000465450002 CR4: 00000000001606e0 kernel: Call Trace: kernel: ? try_to_del_timer_sync+0x4d/0x80 kernel: qedi_ep_disconnect+0x3b/0x410 [qedi] kernel: ? 0xffffffffc083c000 kernel: ? klist_iter_exit+0x14/0x20 kernel: ? class_find_device+0x93/0xf0 kernel: iscsi_if_ep_disconnect.isra.18+0x58/0x70 [scsi_transport_iscsi] kernel: iscsi_if_recv_msg+0x10e2/0x1510 [scsi_transport_iscsi] kernel: ? copyout+0x22/0x30 kernel: ? _copy_to_iter+0xa0/0x430 kernel: ? _cond_resched+0x15/0x30 kernel: ? __kmalloc_node_track_caller+0x1f9/0x270 kernel: iscsi_if_rx+0xa5/0x1e0 [scsi_transport_iscsi] kernel: netlink_unicast+0x17f/0x230 kernel: netlink_sendmsg+0x2d2/0x3d0 kernel: sock_sendmsg+0x36/0x50 kernel: ___sys_sendmsg+0x280/0x2a0 kernel: ? timerqueue_add+0x54/0x80 kernel: ? enqueue_hrtimer+0x38/0x90 kernel: ? hrtimer_start_range_ns+0x19f/0x2c0 kernel: __sys_sendmsg+0x58/0xa0 kernel: do_syscall_64+0x5b/0x180 kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 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 6d6d601..bf371e7 100644 --- a/drivers/scsi/qedi/qedi_iscsi.c +++ b/drivers/scsi/qedi/qedi_iscsi.c @@ -1000,6 +1000,9 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep) qedi_ep = ep->dd_data; qedi = qedi_ep->qedi; + if (qedi_ep->state == EP_STATE_OFLDCONN_START) + goto ep_exit_recover; + flush_work(&qedi_ep->offload_work); if (qedi_ep->conn) { From patchwork Fri Apr 19 06:29:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 10909053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E893B1850 for ; Fri, 19 Apr 2019 18:15:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF36928D9A for ; Fri, 19 Apr 2019 18:15:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D254728D9B; Fri, 19 Apr 2019 18:15:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C18E728D3F for ; Fri, 19 Apr 2019 18:15:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725928AbfDSSPq (ORCPT ); Fri, 19 Apr 2019 14:15:46 -0400 Received: from mail-eopbgr770080.outbound.protection.outlook.com ([40.107.77.80]:16791 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725821AbfDSSPn (ORCPT ); Fri, 19 Apr 2019 14:15:43 -0400 Received: from BN8PR07CA0018.namprd07.prod.outlook.com (2603:10b6:408:ac::31) by CY4PR07MB2951.namprd07.prod.outlook.com (2603:10b6:903:28::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Fri, 19 Apr 2019 06:30:04 +0000 Received: from DM3NAM05FT054.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::205) by BN8PR07CA0018.outlook.office365.com (2603:10b6:408:ac::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1813.12 via Frontend Transport; Fri, 19 Apr 2019 06:30:04 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by DM3NAM05FT054.mail.protection.outlook.com (10.152.98.168) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1792.7 via Frontend Transport; Fri, 19 Apr 2019 06:30:03 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Thu, 18 Apr 2019 23:29:58 -0700 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 x3J6TwOK025965; Thu, 18 Apr 2019 23:29:58 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x3J6TwKl025964; Thu, 18 Apr 2019 23:29:58 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH 2/2] qedi: Adjust termination and offload ramrod timers. Date: Thu, 18 Apr 2019 23:29:52 -0700 Message-ID: <20190419062952.25922-3-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190419062952.25922-1-mrangankar@marvell.com> References: <20190419062952.25922-1-mrangankar@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 132001290040158484;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(39860400002)(396003)(136003)(376002)(2980300002)(1110001)(339900001)(199004)(189003)(26826003)(87636003)(498600001)(76176011)(50466002)(336012)(70206006)(2906002)(70586007)(356004)(51416003)(2201001)(2616005)(305945005)(446003)(69596002)(80596001)(476003)(486006)(86362001)(126002)(6666004)(11346002)(4326008)(47776003)(110136005)(16586007)(5660300002)(50226002)(53936002)(54906003)(76130400001)(68736007)(26005)(81166006)(107886003)(36756003)(48376002)(81156014)(85426001)(8676002)(4744005)(1076003)(97736004)(8936002)(105606002)(42186006)(36906005)(316002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR07MB2951;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 61c90c46-fa3f-45b4-33c9-08d6c4907533 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600141)(711020)(4605104)(2017052603328);SRVR:CY4PR07MB2951; X-MS-TrafficTypeDiagnostic: CY4PR07MB2951: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0012E6D357 X-Microsoft-Antispam-Message-Info: 73tZ0t13V/JL4um2XYxj5PMtFhlp9un0vxvIp0tECMu4L5CF1aELlhDFgujB4xrexgCGBzhXdfFDDl+WxXKdmgAvwvhpSUci0blZna2c4IuJLJmTVmL+9Kbk36qdxNI8nOn3OK7ZhZDh43JXhdKq8pzz5fI2GYTd+AZ5g2lxRsko+L8wzddx07g5QLK1Pb2LFWXCdorqKlsAW6vb79hzx31g7Un9GnuDqtfZumnB54ftkbBq+072GMjdhCXzD+N+MD0VekLlmCzW6tugjVxODDKa1UhFvWMWT8jn8zB3ME0tH9X+xWDPrm6BIhpGrTH8L+z5tSitIvxHLluWl5o3LtE+0822uWwwPEpZBCCb5N1yEN7Cp9YHC+kQhbNt64133zId9hHXjJU69NtyxTiCJQ+ttdRzmMAcOusHfPhl8vg= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2019 06:30:03.6625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61c90c46-fa3f-45b4-33c9-08d6c4907533 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB2951 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_iscsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c index bf371e7..3032bfc 100644 --- a/drivers/scsi/qedi/qedi_iscsi.c +++ b/drivers/scsi/qedi/qedi_iscsi.c @@ -993,10 +993,11 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep) struct iscsi_conn *conn = NULL; struct qedi_ctx *qedi; int ret = 0; - int wait_delay = 20 * HZ; + int wait_delay; int abrt_conn = 0; int count = 10; + wait_delay = 60 * HZ + DEF_MAX_RT_TIME; qedi_ep = ep->dd_data; qedi = qedi_ep->qedi; @@ -1166,7 +1167,7 @@ static void qedi_offload_work(struct work_struct *work) struct qedi_endpoint *qedi_ep = container_of(work, struct qedi_endpoint, offload_work); struct qedi_ctx *qedi; - int wait_delay = 20 * HZ; + int wait_delay = 5 * HZ; int ret; qedi = qedi_ep->qedi;