From patchwork Tue Sep 11 17:18:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10595997 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 D48D5920 for ; Tue, 11 Sep 2018 17:18:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B760429B1F for ; Tue, 11 Sep 2018 17:18:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB9AA29B23; Tue, 11 Sep 2018 17:18:39 +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,DKIM_SIGNED, DKIM_VALID,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 42E8B29B1F for ; Tue, 11 Sep 2018 17:18:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbeIKWSz (ORCPT ); Tue, 11 Sep 2018 18:18:55 -0400 Received: from mail-eopbgr710088.outbound.protection.outlook.com ([40.107.71.88]:7066 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727751AbeIKWSz (ORCPT ); Tue, 11 Sep 2018 18:18:55 -0400 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:X-MS-Exchange-SenderADCheck; bh=dU9Z45NJXXFkbNRt+i6HF+ujDwo7nFSI5iMkjrOowoc=; b=AoNU4QGi2q0IWOUNxgxCUSnNsa2mniXa5AZ8enLERPPvCy01ghSLHRNEZj+QgRIGvLiq/DhHIIlO6zAc0CGfylSlW6niRfZnFbw44gyoRErTsrEz8yzQTXa03XUmsZBhlhKcpkK9ZZcMNSIwj2jFnD28fvVjZ24Z+NYOjQG7RYg= Received: from DM6PR07CA0033.namprd07.prod.outlook.com (2603:10b6:5:94::46) by DM6PR07MB4395.namprd07.prod.outlook.com (2603:10b6:5:bf::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.17; Tue, 11 Sep 2018 17:18:36 +0000 Received: from CO1NAM05FT061.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::206) by DM6PR07CA0033.outlook.office365.com (2603:10b6:5:94::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1122.17 via Frontend Transport; Tue, 11 Sep 2018 17:18:36 +0000 Authentication-Results: spf=pass (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=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by CO1NAM05FT061.mail.protection.outlook.com (10.152.96.179) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.1164.5 via Frontend Transport; Tue, 11 Sep 2018 17:18:36 +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, 11 Sep 2018 10:18:29 -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 w8BHISg8029071; Tue, 11 Sep 2018 10:18:28 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w8BHISZt029070; Tue, 11 Sep 2018 10:18:28 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 05/16] qla2xxx: Fix dropped srb resource. Date: Tue, 11 Sep 2018 10:18:16 -0700 Message-ID: <20180911171827.29016-6-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180911171827.29016-1-himanshu.madhani@cavium.com> References: <20180911171827.29016-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)(346002)(136003)(39860400002)(376002)(396003)(2980300002)(438002)(199004)(189003)(305945005)(86362001)(36756003)(47776003)(478600001)(87636003)(72206003)(2906002)(106466001)(14444005)(1076002)(8676002)(356003)(110136005)(486006)(476003)(26005)(8936002)(44832011)(2616005)(50466002)(42186006)(48376002)(316002)(336012)(4326008)(11346002)(126002)(186003)(106002)(6666003)(81156014)(69596002)(80596001)(81166006)(5660300001)(51416003)(76176011)(50226002)(16586007)(54906003)(446003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR07MB4395;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT061;1:CNMERuF+UIWzTGkmJxtnikkSa+AZmdNApcuv7GFqfJXTQTxeF3fW8dFJ5VRBKSenKeZQOMMFatziaktk/+hazj6sgWlyG5B705D5/JKuJRgrODtUVrWFA18/zBNCs0fx X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b5f4f89-e6fb-48c5-b6fd-08d6180a9bd6 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:DM6PR07MB4395; X-Microsoft-Exchange-Diagnostics: 1;DM6PR07MB4395;3:BLCJCA7w8jdFV64BqD9xUx0kua5wahV5cZS1ynZuO/MJjG77Ilx8zOnZ0pMg3XSceBpCU/15gIQ/1kxBArRxD7Fpw+nd0vVdCNz31QITA0L54yL7j+QP8FObQ73Y2XSjknnfHub2Ut6GjvLK1MCjvOKfL43k0iH5o77hFFV0SjWEU4re6Bctulfycl6zbxLBYyQyWR37tT9UheXWwwS5J/NX7vNBW86bZU8+F+1GNxBnOYM5uSN491SHa4C5kY7sQkHqgmE8ljmBeg3q3QqjlTo7LEuedgJr1IEUgk9Xm810Ghn27cAmN9F6AAzmLPdzgU5cd0gX3ie7JYJFMvmfaGohi8v+tZRtnsoxHrMrufI=;25:NTZkUuyt+fLPkVDSx5c2WUlp3Z3Sprsj9Brks3/teFqCOldzLLNLV/R/lWNJRj26rluNqHME1UZjoAnSqJONKXtF5L7sJSPm78VVPkoad98xaI7i8+ZWm+if/j6wViUGGaLCEpmSwLAI3JYvtup+0wlwOQ6jRl6q35j8jnGEk/29PFPavxCZ0rBKHI+mU3maOowAQvfuyGsYyajWNoO+fRMbDHc7TA55Yg3X7+QlvvEoLugJRuaGsiGHieGJLo2RrIfQxxnR25eS/sNID53EnLt5AkdvxL+XOuamf/xGgIkZBRx3ik4UaGJFghmQ87qSPlXHAgxRG/vRfZKirOTRtA== X-MS-TrafficTypeDiagnostic: DM6PR07MB4395: X-Microsoft-Exchange-Diagnostics: 1;DM6PR07MB4395;31:c/GDQ7LTnW71zIuChGsguLFHhX8drFA5186jm4/EG+CN6U5/2oovRgTQynaQpwjXDbXWDM6QUB31hVx6wHx+yexN2m4+pKIqnx91CCq8NvnanWcjh93mYVtTxF15iB37iovRQY71UR/jIlZX/y8uAW2Y8TlBwGnmzXC9xS0ETHSTO0TCzSTBE16A3d6UkZBckTJ3ZzuDSjmXg3hZ+zciwzIavHTzl38JOcWIXkgGSWs=;20:wjeCHhdyoH1gHCFhANuYmumjpFuPpFDQrUcu5lLzwwjYj8adpupuTQnMBaklbtsE7R7OlZvClEgxy0glgOWbHp6JQCSDAMj7YM6qav878p3+kQho+nucTHvtsFXkK4ZAZSKZng6cBgTWQYDu0I+wqCsXwBOlZTORt0z/SQH6J4Q86IN445bPZjdWEx2Cyo9XTXPLECEmr2nFXa6n8NiBgtNoD/AkOfCBy338s0SdedoqhyDGJLKE7jVxQEnvwbuFR5cgknRhMTj1TCqEhvMR/p3Jo1ur7YzK7EloQz40lpvsio+oS3IvHQsASaz6yJvLIo0V3piomNBcZPlAMJylnyc45gDoIMeHJoGa/clOJIMKhgumOkIURF6mILTq9DlMoxeHFLWQR46p5tkS0fF4G02miIFRk9exZoJF4MQuGXxJXyIVOxwUmSHV9IjXoDQGA67ces/FTOMVGyGD808me/wx3Vxzeso8dsEbS6NnjNAiOMK+wDOc0Y4H/0fhrQFq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699050);SRVR:DM6PR07MB4395;BCL:0;PCL:0;RULEID:;SRVR:DM6PR07MB4395; X-Microsoft-Exchange-Diagnostics: 1;DM6PR07MB4395;4:VLv1ckDjwn5MrORWjI6aAhN/ppGlKldVogfI5UIkH33WToX18G+YxyNCzO79KAq18h2OjNiXfKGE7oKE4/ptRGnALuK4bmf1uHsRfyeuvR6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4XbffRHoSBkyMpBPu0KHvnS3JayxTKTvtTdm6NX0QLO1OZBFiYMjRkWKbK6CHuYHP2rVfWr99mwWw+NhCPFQ0+ejixkuNlNp+Bp+lrCzHuXg51BEvbk+b92Eusfr1kM8jS8pzjd3hdBuR5w==;5:IOKXNqKI3uxRYpTobNzeElNLqSypZo28sVzaGADsU9v31LUUqxtXsK++99JbtNzl0ygGNLPeeavQrRTOpsn82rrNC9ImF8fb2Cc6ifibh+reK7+udy7g/fbfk8Gw9uFP3Z/A+n/Aln7KCtLmZnyR0XaUnfY2Yxo0T4QOzyi+0LI=;7:jvJzdii2pF17muSJ5QVfmsQ9NAc0khKVTP0BsoEuB7lxKtMSg30MFbeJkiqhKq8SjJgPYb2nvCVH0bbCUV6ZWQDqJngB8E14ns6C2zLH8kKSQEKbJI0XCy3Zm1wTLfSG0l0uR7jFzd+kvKppg0EEar8zzPc1VgafWO3sH6sQrKpFRUO0eVNPUvirwB4AE95wuWdmd2yLKk566cYyTatEFHiylCUG8nLR9tti5g6ndcfm4cF2ve3UcOyaHvDpWNUJ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2018 17:18:36.0283 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b5f4f89-e6fb-48c5-b6fd-08d6180a9bd6 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: DM6PR07MB4395 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: Quinn Tran When FW rejects a command due to "entry_status" error (malform IOCB), the srb resource needs to be return back for cleanup. The filter to catch this is in the wrong location. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 0087174d3766..d73b04e40590 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -2845,6 +2845,7 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt) case ELS_IOCB_TYPE: case ABORT_IOCB_TYPE: case MBX_IOCB_TYPE: + default: sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); if (sp) { sp->done(sp, res); @@ -2855,7 +2856,6 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt) case ABTS_RESP_24XX: case CTIO_TYPE7: case CTIO_CRC2: - default: return 1; } fatal: