From patchwork Fri Apr 26 10:55:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 10919031 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 C37A91515 for ; Fri, 26 Apr 2019 10:56:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B27E428BB8 for ; Fri, 26 Apr 2019 10:56:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6CA028BBB; Fri, 26 Apr 2019 10:56:06 +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 3565428BB8 for ; Fri, 26 Apr 2019 10:56:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726012AbfDZK4G (ORCPT ); Fri, 26 Apr 2019 06:56:06 -0400 Received: from mail-eopbgr690075.outbound.protection.outlook.com ([40.107.69.75]:43431 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725877AbfDZK4F (ORCPT ); Fri, 26 Apr 2019 06:56:05 -0400 Received: from BN8PR07CA0034.namprd07.prod.outlook.com (2603:10b6:408:ac::47) by BYAPR07MB5366.namprd07.prod.outlook.com (2603:10b6:a03:64::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Fri, 26 Apr 2019 10:56:03 +0000 Received: from DM3NAM05FT015.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::206) by BN8PR07CA0034.outlook.office365.com (2603:10b6:408:ac::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12 via Frontend Transport; Fri, 26 Apr 2019 10:56:02 +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 DM3NAM05FT015.mail.protection.outlook.com (10.152.98.124) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1856.4 via Frontend Transport; Fri, 26 Apr 2019 10:56:01 +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; Fri, 26 Apr 2019 03:55:50 -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 x3QAtnMq011889; Fri, 26 Apr 2019 03:55:49 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x3QAtnNo011888; Fri, 26 Apr 2019 03:55:49 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH v2 1/2] qedi: Abort ep termination if offload not scheduled. Date: Fri, 26 Apr 2019 03:55:45 -0700 Message-ID: <20190426105546.11850-2-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190426105546.11850-1-mrangankar@marvell.com> References: <20190426105546.11850-1-mrangankar@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 132007497623306841;(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)(396003)(39860400002)(376002)(136003)(346002)(2980300002)(1110001)(339900001)(199004)(189003)(87636003)(26826003)(8936002)(51416003)(68736007)(498600001)(69596002)(336012)(76176011)(8676002)(76130400001)(105606002)(107886003)(4326008)(81166006)(81156014)(47776003)(85426001)(53936002)(26005)(50226002)(80596001)(2906002)(486006)(1076003)(305945005)(126002)(42186006)(14444005)(316002)(48376002)(2201001)(476003)(11346002)(6666004)(356004)(50466002)(36756003)(446003)(2616005)(97736004)(5660300002)(70206006)(70586007)(16586007)(54906003)(110136005)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB5366;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: 7d61a70e-8794-4a1d-0d0d-08d6ca35c5fd X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600141)(711020)(4605104)(2017052603328);SRVR:BYAPR07MB5366; X-MS-TrafficTypeDiagnostic: BYAPR07MB5366: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 001968DD50 X-Microsoft-Antispam-Message-Info: koo9UuQskmS86dEFH4y6vbTyzT1EADNKr2NOdyT6TY+rzyfPYlCgERR5UmkWAIJjRPOHwW2EyUoLUqGehNVzeqb4E2eo2Gr0MOp8PZlBBI5RzC7aADXPXQP/cnQ5j8U4llrADQiusi26jAOtoLKK+nPDInlZL/VTc2TNXZw1OnXTGJpQkHqDqf3x5xpZxzaH8/dWZkC6yzHt8twpkfk8Zk9XMfcyLO/UiTrvALA3+7OCdJk5laJsVKNXPC63Ct8t6FE50uL7FWP+2EMnkKNPd0Z61YvEEdzX9/nHCkloit0mKpwTL2SzQhX3CCF9bqa/pypheeFxlF66rN1JuJBqObpE8lzZ56lha5+NAaKlZp/cz6INnkpvJ+4o9ka6R5qbr4WGTUy6asJpHcjsZ7JLwhBs2RmgxvbaZRJLUPw/pGE= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2019 10:56:01.6291 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d61a70e-8794-4a1d-0d0d-08d6ca35c5fd 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: BYAPR07MB5366 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 Sometimes during connection recovery when there is a failure to resolve ARP, and offload connection was not issued, driver tries to flush pending offload connection work which was not queued up. 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 26 10:55:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Rangankar X-Patchwork-Id: 10919033 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 1F35F1515 for ; Fri, 26 Apr 2019 10:56:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EE7328BB8 for ; Fri, 26 Apr 2019 10:56:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 036C928BBB; Fri, 26 Apr 2019 10:56:15 +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 A82D428BBA for ; Fri, 26 Apr 2019 10:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726077AbfDZK4O (ORCPT ); Fri, 26 Apr 2019 06:56:14 -0400 Received: from mail-eopbgr730088.outbound.protection.outlook.com ([40.107.73.88]:48807 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725877AbfDZK4O (ORCPT ); Fri, 26 Apr 2019 06:56:14 -0400 Received: from BN8PR07CA0034.namprd07.prod.outlook.com (2603:10b6:408:ac::47) by MW2PR07MB4026.namprd07.prod.outlook.com (2603:10b6:907:6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.14; Fri, 26 Apr 2019 10:56:12 +0000 Received: from DM3NAM05FT015.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::206) by BN8PR07CA0034.outlook.office365.com (2603:10b6:408:ac::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12 via Frontend Transport; Fri, 26 Apr 2019 10:56:12 +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 DM3NAM05FT015.mail.protection.outlook.com (10.152.98.124) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1856.4 via Frontend Transport; Fri, 26 Apr 2019 10:56:10 +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; Fri, 26 Apr 2019 03:55:53 -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 x3QAtrJb011893; Fri, 26 Apr 2019 03:55:53 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x3QAtrum011892; Fri, 26 Apr 2019 03:55:53 -0700 From: Manish Rangankar To: , , CC: , Subject: [PATCH v2 2/2] qedi: Adjust termination and offload ramrod timers. Date: Fri, 26 Apr 2019 03:55:46 -0700 Message-ID: <20190426105546.11850-3-mrangankar@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190426105546.11850-1-mrangankar@marvell.com> References: <20190426105546.11850-1-mrangankar@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 132007497715315375;(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)(376002)(136003)(396003)(2980300002)(1110001)(339900001)(189003)(199004)(85426001)(5660300002)(26005)(486006)(36756003)(76176011)(47776003)(105606002)(11346002)(2201001)(4326008)(446003)(86362001)(51416003)(476003)(2616005)(126002)(107886003)(26826003)(87636003)(498600001)(68736007)(53936002)(54906003)(110136005)(70206006)(76130400001)(305945005)(48376002)(16586007)(69596002)(2906002)(42186006)(50466002)(80596001)(316002)(97736004)(1076003)(50226002)(336012)(14444005)(8936002)(70586007)(8676002)(81166006)(81156014)(6666004)(356004);DIR:OUT;SFP:1101;SCL:1;SRVR:MW2PR07MB4026;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: 2f536a21-0890-4629-fdbe-08d6ca35cb78 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600141)(711020)(4605104)(2017052603328);SRVR:MW2PR07MB4026; X-MS-TrafficTypeDiagnostic: MW2PR07MB4026: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2043; X-Forefront-PRVS: 001968DD50 X-Microsoft-Antispam-Message-Info: v3mHpy981hBXMwqLs2gDSGDJgX22hHh+lHsK46ckfDAkw9NSBhZ3cl5DIe2bN/Ma+iv/KtFA5kQRNgZBX7jB8O1rij8kVZ177sueyTzzw7fSrf8hmHObLQF5kA06td4VW2fPqkH0biiaoa/UkVIKSAktJGRduGu5vQZoFOzJYHxqjbjKW5MfUMP5xUVJHAGaY8oar5RMkHiCsKI2hi1HUTPrTii9n3rnw1rElFlXiiOWLQ5NcMW5SIYhm76BAsJlxqbP8SqYIkotlzHC5ygCkZCx00mOf1eBSb5UwGfsMOz3NAmERR5gszFMfoiHtYWaE+A9edleAKs0DrLgcqu1bD1SMEbDdEU4dTxvplrtPyxdy9JDIEBkXvfMixYYOiWIRt4sJyV3HWx1iRPy0cKz4pMuwfm0uRLpOxqsJ3RkrLw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2019 10:56:10.8097 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f536a21-0890-4629-fdbe-08d6ca35cb78 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: MW2PR07MB4026 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 Whenever offload ramrod is issued, firmware wants driver to wait for max 5 sec, otherwise driver can initiate further corrective action. Similarly, when termination ramrod is issued, irrespective of abortive or non-abortive termination driver should wait for 60 sec * max TCP-RT timeout. 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;