From patchwork Fri Jun 2 16:11:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9762955 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 33D0260365 for ; Fri, 2 Jun 2017 16:12:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 261C528556 for ; Fri, 2 Jun 2017 16:12:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AEFC28569; Fri, 2 Jun 2017 16:12:27 +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 A3B5F28556 for ; Fri, 2 Jun 2017 16:12:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751218AbdFBQMZ (ORCPT ); Fri, 2 Jun 2017 12:12:25 -0400 Received: from mail-by2nam03on0084.outbound.protection.outlook.com ([104.47.42.84]:13696 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751141AbdFBQMU (ORCPT ); Fri, 2 Jun 2017 12:12:20 -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; bh=sLnnbMB6WzOOk/MCjKOgDZHlltGZZw+Go9IvjkBFlOc=; b=AVkRkXcMPRLtTy8Uh6fBMlIbUdqq4EApDO8I4rcYClN6twi2JQlkIhTlENKdEAFuQ+G6sgvQpMFlFYKxgd8tTB19D68pabdPPQr9P5obT5T/YTD6oCUx4Qd2Hjl7EDN0oFVs6nip9G0xt/wI5XiXlVAHFQtEx2NMjEMrClX+POc= Received: from SN1PR0701CA0029.namprd07.prod.outlook.com (10.162.96.39) by BLUPR0701MB1012.namprd07.prod.outlook.com (10.160.34.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Fri, 2 Jun 2017 16:12:18 +0000 Received: from BL2FFO11FD055.protection.gbl (2a01:111:f400:7c09::118) by SN1PR0701CA0029.outlook.office365.com (2a01:111:e400:5173::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10 via Frontend Transport; Fri, 2 Jun 2017 16:12:18 +0000 Authentication-Results: spf=none (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: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD055.mail.protection.outlook.com (10.173.161.183) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Fri, 2 Jun 2017 16:12:18 +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; Fri, 2 Jun 2017 09:12:08 -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 v52GC87e006715; Fri, 2 Jun 2017 09:12:08 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v52GC8Q2006714; Fri, 2 Jun 2017 09:12:08 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 05/15] tcm_qla2xxx: Do not allow aborted cmd to advance. Date: Fri, 2 Jun 2017 09:11:57 -0700 Message-ID: <20170602161207.6660-6-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170602161207.6660-1-himanshu.madhani@cavium.com> References: <20170602161207.6660-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)(6009001)(39850400002)(39400400002)(39450400003)(39410400002)(39840400002)(2980300002)(428002)(199003)(189002)(9170700003)(305945005)(48376002)(50466002)(72206003)(1076002)(81166006)(8676002)(8936002)(105586002)(47776003)(2906002)(80596001)(86362001)(42186005)(478600001)(38730400002)(106466001)(33646002)(189998001)(54906002)(5660300001)(76176999)(356003)(50986999)(2950100002)(101416001)(50226002)(36756003)(6666003)(5003940100001)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1012; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD055; 1:GBtUTNMaI+JoFa11UXuvtF/7v1Eelnn4sncCWFE7cMb3g/nc2d9X42LBj/Dce/vSvjLq3Sxg5u5V+p4O5lRMypUHSxxk0Q5pF0lraGQLgp4zbjmhnKd5z3eoi5rK65/UANOLnuzSlpgBHrrVwI6cYuwlJL7+5y+IOQJhooqiG4Eg2qoRnI/mfHT3NNCsyVJv1ca/Pnk7azicOEoyhdybgs8WtIUN0J7BlNfSgWBDA4hNpoa2V4R+LL+6WlZ2f5IjVvX458W00w8c3izto1krjY/Lix1GgWHMvddl1yNqvWJ+PhJ9gQTRJUNOfELL3a8DkYkBxNGo/0hrUORYdZ7OhANGsCTkYcm2QAJZpZj6fZH7UVfojOe732Z0bnjXwEPGFLLao/bg3B7LIbsYRf58PGBOy9UOVHgPwnXSpyTjbg946OG0pMMdkCjKm9z3V/AmbGq3xcfnj0y/zt7ftfKOCexc65KES2Ld7pDKZWKv8Oxd58XgMhrD1WUE1OGnVAkR X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0701MB1012: X-MS-Office365-Filtering-Correlation-Id: c97f108c-5ba1-4ee4-f37f-08d4a9d22476 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR0701MB1012; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1012; 3:CtKDOnSbCGhoH3BpHNXvlU0U9eAPHvHqCdX9vI185K+i/MpEUeXNuZZJKh4dWR0gm66jc4FXXI0AjBFIGt26GKs//ANT3XsjNOzrUe3K4rbrLKj85h7W9pueJrMz+TZGi34kOFA4bMG4nemVAJKNt3mlInDIsjMhx46MFJ6GAPqVWcQXVYgGjnq2/joHPHPA0fBpD++e92uPhJAamX8RIGKdR/zpjidoOY9E1hLYMYkRTWysse+M6fWnjOI7PnkKAnGSNnOAdZ7fntOHURZ2bVRA01ccSaorFH0FBx94ADFuW25g/VBBEmI+IcUHnXuwhSkFc4dYmnxqyDI/46xBcPLBb2CpsT8r6jw8CMSoNadx9i2o0NSHOhkAHzwEWV2+zxEha8k/XVrCTeo1+dd2FDXPIT1buaanZWyLuksmKZS5AST5WzFIsOokhQVIZNesntU/g6zWnc9KTIQ2ffhzMiGNqw3njYlsecdf266CzEo8oPsFJELlEHJhJeGdHmeK X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1012; 25:mwRrWpMAPGBbId9MkMt9ZlJU8dBCwJPQf5iUurXQ0qlEITzkH93ZcsXR0byNh0b9yyv+ekdrTq4o1fhA2pWNuNth6WDn3m7zW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ZKpyn82dI1Ubquz5iX+aGO9xAVabNNMr5t+vBaIXueTguFh+3pj2ag9gLrFHa1iHE30ghMDSKPxtNg4fusYaeUcDDhupgjAj2WKXnWAaGOl3uVTrXl6U9M9l4qSQnN4u59VnzEeXh/K+j7O X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(13018025)(13016025)(5005006)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6041248)(20161123564025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1012; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1012; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1012; 4:Bnn6M6ps/O8/VSTUHHz96FXy8dL74xNlSYytcbO1?= =?us-ascii?Q?JogDeTkiN0/ClFbHfYTEYhEiu3Vh4eSVmntGiOCL3QRfRTzTnVgv779bIvOU?= =?us-ascii?Q?ohAl6AHV8BfU+6gBILm2uPiNtSmEnftfvPzDgiedTRjB3oobOD7suG9K3ovK?= =?us-ascii?Q?c/8XFz6tWDb/d8TDCrjTPJXxANkh/wssOujWDTgyb0b6jlXDFEaF+5L0upPX?= =?us-ascii?Q?pBNYDwf2KB65ksDd0oUxsxoO0zKRbI5HLvYsL3cOR1e75kWRyi/PaNUfOtBm?= =?us-ascii?Q?XtMVKOFs8iNy1fZwDuRmvr0O5pT2XQE5bJUToDrm0NcHdoKyczohDzk6cuJe?= =?us-ascii?Q?SS/npAhI4IMh5WiJuyXlujg2Ezcewj6xD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?= X-Forefront-PRVS: 03264AEA72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1012; 23:9K0joNciauVGp2moIIB2JEFVnIdRUKeryvuLlgj?= =?us-ascii?Q?enad7xNJ5l+ZHU/FajylEGXxKmQUBn3Wk6zG2xizm9tJIyR8U5D68FoBeIRv?= =?us-ascii?Q?QLfIeowdscfeU5fwk2OOM6CYez3wPCZv3tkusUSrwUJ9ImHA5kl8iqPHz9D+?= =?us-ascii?Q?t3Tk30eCGo6yaogen2mozjqXEUohqCsNVjrrz4Me2LOWN60OVO7ji06TNv3e?= =?us-ascii?Q?Um9ULHrVubQGHwVWIijTm1C1X9PFxgw/87yhECmOMq+tnJ88CbyYMYj/2yAh?= =?us-ascii?Q?gmt/EgVvyhRKwbN4tYl4GVC7f5gOKL/XZDtLl+LVdeEhwQZEJyKwYKaJ2HFn?= =?us-ascii?Q?4wHwEj36Rg2/ppN4AI5SjNsWnNdnjPRsvPxa7vyC5M2DBmI8sZpNaWiY1H++?= =?us-ascii?Q?vK8wLqHDhg/WzZ0lwCAUeCSY2kKrr8aMQG1qgKAERR2LZuqwe6ABuqQvhqUz?= =?us-ascii?Q?aEymIFyM9xlzOOFc1BHpG0GTj5ayEKwHBroNyTZchs58PkX8fN+S8aJI40J8?= =?us-ascii?Q?IpBl5W+tILL32FVeXNB0kDubEp1dw6e4OkcB+kEWUVT+P9qs/fP9M05EJNJD?= =?us-ascii?Q?P8WpymNjfXLVkzGVIHXbG4NCS1IG+jYkdDS2JGbC6pcK4gtHf5KJm9NOeOpq?= =?us-ascii?Q?Z4z6zt0mnL//cCWBbTgFMhgm7O3ECQ9YaR29l9xK7tfJBQ3M0A7Vi46cAoGi?= =?us-ascii?Q?01H17PexkvGOtOlFwy2fWs3uA5XPk5gbu85eq/4ZSK8j2incm5iYERwUXzwM?= =?us-ascii?Q?p4ZwXdKJS0Cc+bNKRRrTrBH62JpOmYwDl+AbkLpOxcWquPrXhfXkB1/gTRLw?= =?us-ascii?Q?2y93esEa2+Vm0uolVrHDobgAFEsUzBAA5HClbGSQFI/bOxpQ0Qp7xHFfQb41?= =?us-ascii?Q?XkSdjEUpEhv59VXycD4i1gZG0wlqkXZEjRpFoZFHFETU/h7cDY0LZ4nVbJC5?= =?us-ascii?Q?8absS14aTZD8iV3/Erf3oFvNAkUJEtCqf2L1OTGc6f9z9pM1FmULc6aE7WYl?= =?us-ascii?Q?WkWOQpQ5/kDsWpJc8y9ObtVBizZ2sc/dD69ipadSiWTBoNdZkPKA0wR61qW2?= =?us-ascii?Q?zWMiavfM=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1012; 6:Kr1UtWLHNcaWWnvWwh1vzL9nXYKyGw3MlPGSXmzSiTOZkWRhH3bXiQHyIp3G8bo7YqD72HQnr4n4LkxGi5B8hHRc/ferYKRQtPTJV5fLKLz67A4pPjb7uY8tXERSe1cltN4a7U8oHSPX8fHqnXCeRkG1a8CC0E12GfngwFvjMvexEv400t2tYw2ZTPKMozrUODFK8lPzB2ZmsCm3HmWMXxYDAcYll5mNOJabH57HyRNi8mAhHSFLgAq3Eqvzsixb0cX/yxMTP9Mpqk6waYFt097bxQWohO+KnZxq57D6JrNITY+H6bhr2inQ155OYI+JgoBASEt9JIsdu1trW1xRXit70hc1OlyFZUEVL/Ge0RfwRAtQK8DpmG5TAk2OyhB03GaSRzjuIVdQ88kmiOmLkfgUendFkgS0eZv/cmD+kJOOCeIgdNfYAyFdQZIkF4CcRCWMhy63D8L9AdypgpKAFZyLJSPDys8vTSXWWuUqfmicD0jEVipZUrXQ/HQ7EY5J5stjNnzgOUV92ukmFd+56Q== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1012; 5:G0BTggyuXEBrBIvouCRj9lgO/Tt3l5b800BOZdGxo4cNzUMD++KpPGrXsOgut672wbBblaXyw9CfOWQM9rL/be56SSJgqm7Bf1ugvonEpUC+nqnIoMwsH2K/vLZXIqW78wM8FVgpYlbcR1rPjPeP2BK0RsoJXPZ40VSnN8G1Zj/c7/5nFYO4tiBjcXfkXdrGN6vuqcGaBAHbKKtre7Quu7aFEq9Uey9CyAJST6tP0RK0oN4rbAG9UZVqXKJqyqjelvtjrT200Azd35iq2qBYXk50bDj5GbBPouUA65aUHhtIQfD2Jp/XQk0fmxV/OvdVzRG6gorMEDRo+2t+VQoJeEbkgoJIVnWULhVdKkyKaGfUtHNJtXSbq1e88t+Wdm9Jm3HgtvhIYAH9xXcIHtWivpyT/nRAGFx83TsBby+Oh5cf/1znFNi0IeGvJ6mZYEAN0BpbFTDrTESK7YKwIUtfjCqo8uLfsT6qyWS/W9on/8TEGm6MmDjjQ3iZuicO3swU; 24:prdXtfZYNWRHSpCWSGWIZNg8PbHvh6R3DQwqLFE1WlxxjSzNI2liIlicQBJNrn9L8LA1SitfhUlE8TBsywA/PS9j6MORRUZ4XaVjJY5HeCE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1012; 7:XPMGz1WgwAWf1cCDsURrTyxSYJSVuI1U9QvAz3Mkq/av7/9LqY4aOzPZZ85DjOG5pQFZAVosYyjK4i989axc0hN5z9YrhRiXj7ASoc32jmo3i8dQRRucYxELdDX3tHnfEUPo3psgl+yg/ARd1RJZEkszhCmjLu5qpiSmTkSf/elRa2LOvBEJlhRxtj4PuaGF5omqdgJlw5zm0ZHhqoKn0yVSmUWrjJayJmF3SB3qP6Blsu1w3PQaWvIQBnZ1V+H+39Y28cOdQtBhMSN98tDbWrO4KohWh2aEOj/d/qoH3S1n76abcfH0unzpgz8/AqR4BucZbmak2cleSdUasMEwlw== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2017 16:12:18.2496 (UTC) 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: BLUPR0701MB1012 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 In case of hardware queue full, commands can loop between TCM stack and tcm_qla2xx shim layers for retry. While command is waiting for retry, task mgmt can get ahead and abort the cmmand that encountered queue full condition. Fix this by dropping the command, if task mgmt has already started the command free process. Acked-by: Nicholas Bellinger Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Reviewed-by: Bart Van Assche --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 7443e4efa3ae..1131fe8e2dd2 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -686,6 +686,19 @@ static int tcm_qla2xxx_queue_status(struct se_cmd *se_cmd) struct qla_tgt_cmd, se_cmd); int xmit_type = QLA_TGT_XMIT_STATUS; + if (cmd->aborted) { + /* + * Cmd can loop during Q-full. tcm_qla2xxx_aborted_task + * can get ahead of this cmd. tcm_qla2xxx_aborted_task + * already kick start the free. + */ + pr_debug( + "queue_data_in aborted cmd[%p] refcount %d transport_state %x, t_state %x, se_cmd_flags %x\n", + cmd, kref_read(&cmd->se_cmd.cmd_kref), + cmd->se_cmd.transport_state, cmd->se_cmd.t_state, + cmd->se_cmd.se_cmd_flags); + return 0; + } cmd->bufflen = se_cmd->data_length; cmd->sg = NULL; cmd->sg_cnt = 0;