From patchwork Wed Dec 20 06:56:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10125083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B8EC16019C for ; Wed, 20 Dec 2017 06:57:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFCF729649 for ; Wed, 20 Dec 2017 06:57:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4B912964F; Wed, 20 Dec 2017 06:57:35 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 3FF1029649 for ; Wed, 20 Dec 2017 06:57:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932439AbdLTG5d (ORCPT ); Wed, 20 Dec 2017 01:57:33 -0500 Received: from mail-co1nam03on0045.outbound.protection.outlook.com ([104.47.40.45]:62688 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932460AbdLTG5R (ORCPT ); Wed, 20 Dec 2017 01:57:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mfeUqdDKArWkCQZPe/pUJ69xUpOig9TXpy6gy6g+zvk=; b=lp1xoZZPmsOOW/S9d5rcKWuGHiCsCLzQAtujVPG/UqMxbwadG7lzxxJsbMkBVUHiRK6n9mm7EVzI3LSaKC+RJXVYVTQ/w2OK/rW2hKuiVQUauM8bZuaQeuNXn5Bz+9Tr5X6ivxPy6fN7DE777a9ZEJCG5JpOA5idMbp5wc3RdS8= Received: from SN4PR0701CA0020.namprd07.prod.outlook.com (2603:10b6:803:28::30) by SN4PR0701MB3823.namprd07.prod.outlook.com (2603:10b6:803:4f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Wed, 20 Dec 2017 06:57:09 +0000 Received: from BN1AFFO11FD027.protection.gbl (2a01:111:f400:7c10::106) by SN4PR0701CA0020.outlook.office365.com (2603:10b6:803:28::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.323.15 via Frontend Transport; Wed, 20 Dec 2017 06:57:09 +0000 Authentication-Results: spf=permerror (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: PermError (protection.outlook.com: domain of cavium.com used an invalid SPF mechanism) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1AFFO11FD027.mail.protection.outlook.com (10.58.52.87) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.302.6 via Frontend Transport; Wed, 20 Dec 2017 06:56:56 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Tue, 19 Dec 2017 22:56:48 -0800 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 vBK6umOw021610; Tue, 19 Dec 2017 22:56:48 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vBK6umiY021609; Tue, 19 Dec 2017 22:56:48 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 16/43] qla2xxx: Don't call dma_free_coherent with IRQ disabled. Date: Tue, 19 Dec 2017 22:56:17 -0800 Message-ID: <20171220065644.21511-17-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171220065644.21511-1-himanshu.madhani@cavium.com> References: <20171220065644.21511-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(39380400002)(346002)(2980300002)(448002)(189003)(199004)(87636003)(4326008)(478600001)(51416003)(1076002)(106466001)(2906002)(50466002)(72206003)(47776003)(85326001)(76176011)(6666003)(48376002)(305945005)(81166006)(36756003)(5660300001)(2950100002)(316002)(59450400001)(42186006)(16586007)(50226002)(69596002)(81156014)(86362001)(80596001)(110136005)(8936002)(54906003)(356003)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0701MB3823; H:CAEXCH02.caveonetworks.com; FPR:; SPF:PermError; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD027; 1:e7kl43ORlil+51hEANVKUrE3wSaRkMl4VBqAnSC4iD0AXfnzu6GVdxi0nkYAbiSYgW+8DabAm+rrKxPoAjzJ8aeutgfkvXtNcU8oqDGh8cDYbq6EO2R+W86jvCsTh5mA X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cc311dc2-6a14-457f-36af-08d54776dc17 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:SN4PR0701MB3823; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3823; 3:3269u0UJZC/ZctGGETkmBf6j3CBGwsv8FzUnN2u1j6l4xFAClTVylpwU+2RF7aGKyt/Xag0D3SZ4lh42zi/zX+F5ap1Fh1Fi/fpDaHCwIjytGqeSQjfUfdIihF6aNaHP2+ckv0xzCXSQj1ULxNP2pFirVkyYfJ7t57THc5JIP3L+CM+FMYFZl+ylqFFjJ1IubwBLavUXQQ6NckSyGNTWX4DUn05a6uifkwlIFbc8jOpzKV58BkQeNbDN7nFp2FsqhR4PLiuvfzPCoKj7AtyVJFWtb0olHJ1ISgRB5xR7W4EoKEmLXulgK2mgvSqBoo23NRg2KLhxM30pWHotUXUd3tCcuwloRIy3yhly21Dy0eE=; 25:zq8w0CYSeSQ+uHmqNDxPznTn2FDdIx7NvCF/w/yiqtqXaL/RnqN7aIOyjHMvWShy3S44QxbMY1kKOs64Hyz/8cV1RRZyEuxOIHZqawW/FuqXF4kr8ElaROnT/lmvjO0qUrSbDilQJOK65KVyLn9SkHDEfnVJROvEZdkX2L3S81BInTruIoCqTShfIgfOrin/P1a9ebPa71xyAkkXz11EK+xSMj3Sua0FHyxdL75pHwZy7OR1KvdqMUcZk3dAFdEZAjPT72oQlmZHNq/LAeyfBGkA9q4peQYhm3TJtk1Hri8d0HE02VGYDPfVgAI9esfMQZ+EqBboYdvbQSRSE8msXA== X-MS-TrafficTypeDiagnostic: SN4PR0701MB3823: X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3823; 31:l9KuDORdt4wKNwoI8ltOWWY9RxJvPke+SEeWbnwU1Sj7jiQ6Wsgy2eG8L134By/9kc2S4EK6/Bhcff3WRjFyfiAR41iY/98ImMwZeIIhwAREuo8Pzl4W3w4ZQNKBSnzHgRGXxeDXlLQuLVD8lqQvutIjRchRjtD48vBPHbllgGA8t5o5BqAgpi7nSHA5OT+DHEdjyMCXwrAD3FMh26eIVEDmQWZZ9qJvphl6W6xM/Fw=; 20:7I6+JAn8j02LwW9T+tf1soGxMHhGPA72PJpG5BJKEcPN6Aw6hoLJho/HZK7xN3O5YyJxyrbiQW1tKjtufxTvErvlae9EF3v/rsYGxqvrX/Z0NHNV5FuPoidTCqT08eMhW3/MsKG2jqbnIp590niiXr/avuFjqUDuiNHYzBmaP4ZdmXXeySG/JGBzWCpEm3CJuOaLkMPGXiQ3IcDm7wDky/JL7QZMhEEItWdbun7qS4J3j2Jkkoap9eVp/E4ZR4zL//lbSVHdwOXL33VWlBoUBgVOnyYfLsmJr743kBRyWNRCgmot4jpJiVzHhxajyEcLKLJbS/xFNr6mhwPOIZBp2EfxWS7Gd94qriwl2sNbHgnjg2+PaQE7J5ovR0gighyFK7LMM/c50gTFmckbCj50QPc55RUwnVnWDFatXAM31mJDQ8MJRNCQ/1UoOFrPIqw3I6X6ZvGeN4R/2oNr0v1xoQIPaRRPu99g7sY2pEt82Mn+q64YxyvK+LrWDaPn3S3f X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231023)(6041268)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN4PR0701MB3823; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SN4PR0701MB3823; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3823; 4:mdhtvtLpLKn1awYCmHJNbL0zIfnnY8RuDQaguV7IfFfxORa4wt2+aBDf0i/Iau5xKTeTdjUXTdw7MvXrTM9XxpfCP2kiYPkDTcvxIPhrfRzmeK5G9aZK0AjUPOCnIF+I/HOhsxpPLtwxSS8z9IFlvT7yZDQDyTan6B2/o3+33CwqNkQyTdJbx7cM/6kvD7UMpfOpv4b0JG9Zi8I3EFpRPGRSRDB2YlvyQ2r0aIICCT5AWybQdgU/mktMJUkFPSApneeYyh+9Sf5DU7QB4Pqggw== X-Forefront-PRVS: 0527DFA348 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN4PR0701MB3823; 23:PdguNeLtW5+4d1WxFqEMQBflzojNKm4Ts5r5qPg?= =?us-ascii?Q?Yh3h8VjUGf0U7H/XKCgSbIPx4PiAqDAKRf7Fhwh/A+gRnZUMfMyBkxKL/JJh?= =?us-ascii?Q?u+qK/ECaDa+IoP3Nef1+w2vrDBzuN0kR5xKtIqPe8VcxCqHEamF9Vyhh29TG?= =?us-ascii?Q?NFb8kFFCc/t1BjoHGbdvBJq9wkm5C66BHcDaioudJcwQY+dIctAlfO+fX7sA?= =?us-ascii?Q?MpahIWRQMSx4sBDDq/dOwzgLZkJQTPm1TbFj8/wI89gktWWBi0cdRALoYT7a?= =?us-ascii?Q?yPuse5M7XYcHb+rT7I6cJhSBF+NNE+6kb11fkJgU5bLfQNYIKzHNEpF+Jk4W?= =?us-ascii?Q?B0HslSs8asr84+lW5TPNVbjYvbr5GTZ9T7n3mLrtPfbBD158PqQXFlq4tK1A?= =?us-ascii?Q?zDlCR9O0782Cf/imjBiTDLPHjO+qISAjSPmy6rCmuXoxZG7lFrEcJUyh/V7H?= =?us-ascii?Q?qYyupGuNjPi8rb2yIaMIz5B7AMEYi8lEkJQnNhdmZ43hF87HlYPVjdCfMMVh?= =?us-ascii?Q?yG9/tNjfDbqtvjzJRLBlfUkSwZDn5VRZCUu4doj2x6easuhq/AM/1QhCO+xj?= =?us-ascii?Q?EawPYcxQiNcd6ANuBfBhRZg8BQT4b91/kjAGSL+pw13HJUFG4FXT5jIb6qQf?= =?us-ascii?Q?6HbaFnk6usuHyUgZC/FRXSd52DLEPbcJ736qvR8SLUFVkLOkfJX1mq/3sRiY?= =?us-ascii?Q?v/pnXit4BMPOolzYgwogivYYakW70cHPoAgKzIoBMkjCyOm/tSk+yimkENau?= =?us-ascii?Q?fkKl5VOCm8j+8R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28CJzQHobUl7DuogOEv4z/VA8QVzVJzZliAiEexhoSy4hBrd8g6G0w0JQoVoR9N/DndKPiohq7+pQvUoJUfIwrtT5fBlkVWuWp0cMD0hy4KVXeGvBgP5kDoE2M5ha1fqBJIr1tzsHqkkt0dkfQX4Ns2+aGY3JB3h+7C6hDUHLt+VRBFQOLi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2017 06:56:56.3583 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc311dc2-6a14-457f-36af-08d54776dc17 X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0701MB3823 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 From: Giridhar Malavali The logo ELS command allocates dma coherent memory for the data payload and serialize the completions. When this command times out, the timeout routine completes the thread waiting for completion which in turn cleanup resources allocated for this ELS command processing. Don't call generic sp->free routine when this ELS command times out to avoid to double freeing of the same resources. Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 900f6d3f3a3a..28248adb611d 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -59,7 +59,8 @@ qla2x00_sp_timeout(struct timer_list *t) req->outstanding_cmds[sp->handle] = NULL; iocb = &sp->u.iocb_cmd; iocb->timeout(sp); - sp->free(sp); + if (sp->type != SRB_ELS_DCMD) + sp->free(sp); spin_unlock_irqrestore(&vha->hw->hardware_lock, flags); }