From patchwork Wed Jun 6 15:41:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10450567 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 B31BC60375 for ; Wed, 6 Jun 2018 15:41:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A88A29818 for ; Wed, 6 Jun 2018 15:41:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EBED2984D; Wed, 6 Jun 2018 15:41:49 +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 C250229818 for ; Wed, 6 Jun 2018 15:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752451AbeFFPls (ORCPT ); Wed, 6 Jun 2018 11:41:48 -0400 Received: from mail-co1nam03on0057.outbound.protection.outlook.com ([104.47.40.57]:41041 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752067AbeFFPlq (ORCPT ); Wed, 6 Jun 2018 11:41:46 -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=+znJR+QVUjExSCrnLAXc6ilaoqkV4/tG3PLGS12hifI=; b=PrxuygIcREL7wwRCIMMGoA5g3ITsStsv+0y9/jBSm5l78Ro7uA62TmdB//eqvGpQapVfaLeB/0G/s2jROnAXl7qd59Bj6Alh4VbKuyoPsVQ3hdpJBZR9OkmIQH768fF7hXnQMYagz+38VG/kN73ymlPVLH2tcWf4bwCxwUgT3Wg= Received: from DM6PR07CA0025.namprd07.prod.outlook.com (2603:10b6:5:94::38) by DM5PR07MB2825.namprd07.prod.outlook.com (2603:10b6:3:7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.13; Wed, 6 Jun 2018 15:41:45 +0000 Received: from DM3NAM05FT014.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::205) by DM6PR07CA0025.outlook.office365.com (2603:10b6:5:94::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.841.14 via Frontend Transport; Wed, 6 Jun 2018 15:41:45 +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 DM3NAM05FT014.mail.protection.outlook.com (10.152.98.123) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.841.6 via Frontend Transport; Wed, 6 Jun 2018 15:41:44 +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; Wed, 6 Jun 2018 08:41:43 -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 w56Ffh8L011480; Wed, 6 Jun 2018 08:41:43 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w56FfgAr011479; Wed, 6 Jun 2018 08:41:42 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH] qla2xxx: Mask off Scope bits in retry delay. Date: Wed, 6 Jun 2018 08:41:42 -0700 Message-ID: <20180606154142.11445-1-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 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)(396003)(39380400002)(376002)(39860400002)(346002)(2980300002)(438002)(189003)(199004)(8936002)(4326008)(106002)(305945005)(54906003)(110136005)(81156014)(81166006)(8676002)(5660300001)(47776003)(2906002)(72206003)(356003)(50226002)(478600001)(87636003)(186003)(86362001)(336012)(69596002)(1857600001)(80596001)(486006)(42186006)(316002)(16586007)(126002)(106466001)(26005)(50466002)(51416003)(36756003)(2616005)(1076002)(44832011)(48376002)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB2825; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Pass; LANG:en; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM05FT014; 1:9r9LtpPJp2/AZA70pREkB7pmR9G4rTWwtYDy7lus+Cj29vjTSgGNtllko7PKUcgbIuapMu/igpBd6YNbq262rbV/yFrqugDVwF3GltVMVgoE0bN9CebC/LPaxH17D30X X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:DM5PR07MB2825; X-Microsoft-Ex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yTdBu2FOHLN/91wStrux3GY/N13BYKIYoq5E9WZH82c42DJtEqaeC1mmHusPCpci4ZSKEbEMKJXbhnkD7SISfZiHqL/oyM3MUhMApcZevNtWIVzYOhj9wdMNKqj1mrPuxoS1y4U0dCY++y7GrQUWEMQBRwKmS0LIYbnOcme1SM2nU/YXS4iLXlW3N/xqRC2H15W3EGvIPDko99YI4gy5ayGA+a262rMQIs71590c5BLd3ITcr8UzEitCdMr6aV5unwfr6UvyWjF50PanSPagf3xTt6nf8mTRVUf3tPUSJmaILUmKDAcdctuQpk9H6WCwFWDME90BUK1Iys1xI1vRmWIQotnjp+omIRo56PGd0giyRS/nCOp81YYp3EAm1pWo+PgZa4MDvFVrtuKPonReAeUe7/14zeC921s9xcB5J+GQOxREg3hv6aImktfPvBw7UjnLngEQ+v19JRYgx8rDgHKVlgfQYFQz/j X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3002001)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:DM5PR07MB2825; BCL:0; PCL:0; RULEID:; SRVR:DM5PR07MB2825; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB2825; 4:kYI0zjmBwAvAdfXNDMBnB1x2DDwqXQq0Tyi9swloUELBRqfa7QFrylRdADhhcKEgPws7oBms6PLSUeUeVF1L8pzBLPP4pbybqYWqMR7N9q2CN7yu7P2/DRn+lYcVUXdAIfRofGO5qhSjuzsZDoCfua2zY6aZUulGFuN0KoHFEMh6EWo+YeCxyJwvgHilsDdyDN4QT90tgZED09UFrPAWR67NYIoXaRSPg06iiGOH7ISZRYa77DEmCW0TQ2pQVyJTMp5D4t+03ZIZLSNZmToWmPoikfTQabGcE9UIthEPcQXMd/lukKBslImjcNe/kfrK X-Forefront-PRVS: 06952FC175 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB2825; 23:Z8GkSTuPMOjMSpQJpECHLPbd23ZPeP3KGQefZKxtQ?= =?us-ascii?Q?oaasbhO9Wc9wyVd28UGi1HSVeKmyrlDWJUQakOyKIfRh0bG5cJmPqU1ZfO7V?= =?us-ascii?Q?MoD5LWUbFftQq57SOUeJkvf3P0iMSQVRoPRuNJe6suhZe9Ba5opt3UHjIVck?= =?us-ascii?Q?h8Q4eNxYBROXRNIP3Juvws/2gF7R9XZ72zdmHUzldpGH3VcK3lycPolO19Tp?= =?us-ascii?Q?NGNXhbBJwDIlZO7P5mNLSFh9aMogTTD4ebFOBV2yXLFc8JZSBqc3F8evClI2?= =?us-ascii?Q?16BBJb7ene0FJ+6YkpvyhCJsb3VcNgxdWKdmiAnXvBaPioNBLVKJOzhq6Lv7?= =?us-ascii?Q?E9ZIJHyrk2Qg/PUxKm0LuTVSgjVxD0nb/RMEA+vof9P4QM7Rywi4madYXhPf?= =?us-ascii?Q?6m3GRGsXrFgbep3OTMkuiZPzJaHM+NytHxgAO0o16BbhnuCmL4o9NmAmFVYg?= =?us-ascii?Q?XGeY9hkAJcnhGCx0QBXpotvrtAgB8Tsmx20vrc1Os7vvb6gKe6wo5NW6SpAp?= =?us-ascii?Q?jgCJBTGE96503fYJujQ0OFMuea+eUT2sbLZnz2IDdwJ/KFHDWnliGj1zqRki?= =?us-ascii?Q?2J+L2+zf62wskZts7OGi6oWvX+NfbFewwzSSy3RdkF6bo7sTpNL5DuLo3ncI?= =?us-ascii?Q?ALbJn+saR9jGeTuIYIIaaHHBi/dgOzaSN+zqNLpZluDO/4p1r1RE67q1DLty?= =?us-ascii?Q?w82wMVTIZeFyKimmoKDEjyTuVCh8jIJI7GWeeX54Pb8MNslwQSz5CARUt7DK?= =?us-ascii?Q?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mwfN/qSUmPgcHdCG3wXVxw3T5japI0yTN12+y5tgHlAgjd/Aw==; 5:LzjOA0ETsYDKpD4e/J8MVjvFwpUYpN1DF+QznwQCM0tS0Uma1fkpMXhqoQpHB2scbXI3tS5+GivUs33VJDK06rAAIPTBaStLk64A98ZZwiqju/cfYkGCCslqg5k7n0k313omsWy/IYiC9w/dtnsA/xQCH03kn/K4sT93hGAHlC4=; 24:PLuaBOHRsr8N826VB58yv5jSBOf/hhwfY0JDoSG/95bjEyTXEnKwuF1gtKMU9k378HIvg+YQKojhnkDPqnYkUKwpJ1nlJWGdJDPd+E1OYJc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB2825; 7:XjnkLOb4gX/46mON7HvFl0strcarMurYdapfHkPQzafi4v0L6pPTi8+ltlDFbEO0kY3RT+n0KIetaMdiud+INO54pC8VrteWFIQyko25iw3hStPA0F7s173MTV7TpH5ZIUlUhCPb2DB0S/8IWrmziim3djd8rb4oEGvSje6iieyp74GSbfb7COSw1iklPHB+EoW8fDAjN2DAf2Z+aEq64GEtIMIgRrGPf1ISK3XHLe0Z6qCQHkDpqNpH7RMkWtFM X-MS-Office365-Filtering-Correlation-Id: 1959eda2-fa5e-4348-5020-08d5cbc40205 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2018 15:41:44.7755 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1959eda2-fa5e-4348-5020-08d5cbc40205 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: DM5PR07MB2825 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: Anil Gurumurthy Some newer target uses "Status Qualifier" response in a returned "Busy Status". This new response code of 0x4001, which is "Scope" bits, translates to "Affects all units accessible by target". Due to this new value returned in the Scope bits, driver was using that value as timeout value which resulted into driver waiting for 27min timeout. This patch masks off this Scope bits so that driver does not use this value as retry delay time. Cc: Signed-off-by: Anil Gurumurthy Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Reviewed-by: Ewan D. Milne Acked-by: Martin Wilck --- Hi Martin, This patch fixes driver retry delay timer with a specific target which returns Scope field in the BUSY status. Driver was translating this Scope bits as timeout delay value and was wating for 27 minutes for retry. Please apply this to 4.18/scsi-fixes at your earliest convenience. Thanks, Himanshu --- drivers/scsi/qla2xxx/qla_isr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index a3dc83f9444d..68560a097ae1 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -2494,8 +2494,12 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) ox_id = le16_to_cpu(sts24->ox_id); par_sense_len = sizeof(sts24->data); /* Valid values of the retry delay timer are 0x1-0xffef */ - if (sts24->retry_delay > 0 && sts24->retry_delay < 0xfff1) - retry_delay = sts24->retry_delay; + if (sts24->retry_delay > 0 && sts24->retry_delay < 0xfff1) { + retry_delay = sts24->retry_delay & 0x3fff; + ql_dbg(ql_dbg_io, sp->vha, 0x3033, + "%s: scope=%#x retry_delay=%#x\n", __func__, + sts24->retry_delay >> 14, retry_delay); + } } else { if (scsi_status & SS_SENSE_LEN_VALID) sense_len = le16_to_cpu(sts->req_sense_length);