From patchwork Wed Aug 1 06:13:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10551755 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 9AEA996FA for ; Wed, 1 Aug 2018 06:13:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AED02A5FC for ; Wed, 1 Aug 2018 06:13:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F5742A64D; Wed, 1 Aug 2018 06:13:54 +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 15F9A2A5FC for ; Wed, 1 Aug 2018 06:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733232AbeHAH5u (ORCPT ); Wed, 1 Aug 2018 03:57:50 -0400 Received: from mail-by2nam01on0067.outbound.protection.outlook.com ([104.47.34.67]:40224 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733143AbeHAH5u (ORCPT ); Wed, 1 Aug 2018 03:57:50 -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=V0yM8RIFoyUQCxO8FpXez7DZJlWzTfROf7wip0sNASw=; b=LLQFxeTWa6cARidxEDMzDxkPn0qhgTLjKlBYgnkHdqFwl6XjPBzws24Ehuhr3qCMZdfvZEEvSHJ8psoOiUnBIiyT6NYfa4GbxRaPVqr11HMde7stAI+Y2dJ2HlCHANxZXOzqL+whlCz+JEaWXf9ce9WTWBij6iCftYTuuvN6/0A= Received: from SN4PR0701CA0001.namprd07.prod.outlook.com (2603:10b6:803:28::11) by BN3PR0701MB1378.namprd07.prod.outlook.com (2a01:111:e400:4018::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Wed, 1 Aug 2018 06:13:51 +0000 Received: from BY2NAM05FT053.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::203) by SN4PR0701CA0001.outlook.office365.com (2603:10b6:803:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1017.14 via Frontend Transport; Wed, 1 Aug 2018 06:13:50 +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 BY2NAM05FT053.mail.protection.outlook.com (10.152.100.190) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.1038.3 via Frontend Transport; Wed, 1 Aug 2018 06:13:50 +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, 31 Jul 2018 23:13:37 -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 w716Dc9X028797; Tue, 31 Jul 2018 23:13:38 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w716DcBs028796; Tue, 31 Jul 2018 23:13:38 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 13/16] qla2xxx: Fix stalled relogin Date: Tue, 31 Jul 2018 23:13:32 -0700 Message-ID: <20180801061335.28709-14-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180801061335.28709-1-himanshu.madhani@cavium.com> References: <20180801061335.28709-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)(396003)(376002)(136003)(39860400002)(346002)(2980300002)(438002)(189003)(199004)(446003)(4326008)(47776003)(48376002)(110136005)(50466002)(16586007)(42186006)(476003)(6666003)(80596001)(36756003)(44832011)(54906003)(2616005)(486006)(69596002)(11346002)(50226002)(26005)(106002)(5660300001)(126002)(316002)(52396003)(478600001)(106466001)(76176011)(81166006)(575784001)(72206003)(81156014)(87636003)(86362001)(2906002)(8936002)(305945005)(1076002)(8676002)(51416003)(356003)(14444005)(186003)(336012);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR0701MB1378;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;BY2NAM05FT053;1:hG7NLHoJXfKiUISime7jZqYIq25iSyt9K2yxTINJR+Cae4H29MiLMdKDpW+TLaM0gYUe58waqDlRyQ0rPbeQ5jAfgvhzzT3vqRS5xIlu8vPZn6w2QDYCmnEm8rIVpIQK X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8b9f452-eec3-49ce-fa81-08d5f775f314 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BN3PR0701MB1378; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1378;3:DdRaKY5pB0XGq7/BimhcB3cypd2DpjbSkLEFG8r+Szwrzq5hRGEnY9HBq2ub2fGJyGDQjsK+khraQTnaoTScaPjpWPT+wKyKnx0D11y+RxCqt7FW9YvNAUCoX5tzehcgI2rDzxEUvkD+fGNLCOaFt32yd6IZYcv5ppKKqlvzdy25tcm/gWJKL2AO0PCuPIasdrv9xir5F3S49elVtcm7g8s35Qmkde7J1Lgv7fRXltNaknSyDWaCk9ecQwIAhL10mHBe3rLLZ1xfRvaFAxp3ksYpsVJc5Mmo9leY2e0WKL/1r9fTbpM6itSq+WIqoKZzq/qrc7LvuzBx/LJtwa9ZF4YABSj/Fo4Ggbqe2g+it28=;25:tpTF9BrGcrwOqSaVo8S0P1JxvWpOOFRnfNetJgkImBU/csIuoh6o4BjPZgSuGpZM6dtyYgscXqat7lgwpVHJUEaL4Ia/1awvV0LbKgGWH9BHORxjdCgd7m35OgmELC0BRElBcLQsSFlnwUMnV+iakT1lGMsOkrJKU8ae9qEnpP38kbWAbI6erGkQg21enX90eguMHBNFBEWAZXA3P5bBTBhq+yccZKexCBZxqtfW/EXIlBkkrBkK/DgWxv/rqRb9qMOLu/8jLMudHZ+do59X4TUl04Cy3K6xgkejD/1rs13+E9VeriCNOeDF5KXAouXSdS41avBfAt52NNqE5iWLEA== X-MS-TrafficTypeDiagnostic: BN3PR0701MB1378: X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1378;31:d/rd82eLGwHiNGWINhWkCEiSUGEb9Tj3LsKl2ZycfhlszkVf7EK9wXMzWBy8Tklfn6dp9F7ZUmRiiTETRRUHzf44T/bp88PtuTqXBZ7pobvZehV/fSLp8uEdn3po0XrxNsvs+l1U+XPUG+R+FokN+ULIu9XyGFvi8Rl4hubYnIF5qYDC7HlfWC60Z+jG9TTJGAaOnNG7+yd5kyCCfjdATirqKrKkqZ+n4RZYVGKuZuM=;20:TPfXs9V280YZ5s4fZCpZIghzS2u6wT0eqDOwk0PDK0b+gorMeX6RNuM8bhZFcqQaeyvFzn+f4LDcxN9JFlgET6ibygzYUHhf85LXcya0XyvKMC9o00B8+w+6gQHQkEQI6D8K+TbZxGzo629LAwxbsCmeup8T39Vkg/Kfg/O8k66Zhg1YfsGJtbQToXrgcdk/VzX5EBARcJrxTnTRfikPQrbKCLCOrGzmSfrY7U4gzQhzAomjTKaw5mUNRi5Yz0UucMJBNF+f+qVhcWoN8yaxhfKq4Qdm9PGWFgy65Hhw9CGXqld5Lj2m9i13DKxrBMpzcldkL70hRN0Czk5F1fP75JSgADVubHiUiq3KEyclqXWSMeanbva4WiN/arIhfhc4n+fQeOhRdDClnASqdJRkW9aZrirhdhVO1qwJ8LIXWR6KZhtxpcGvrScCU/IwT/Iehyqs2bCdmqccO3PNYR/yuAVgau8il3/W8eTQwKhOb8niNzXC6juQWLJ1D6u9QXNA 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)(3002001)(93006095)(93004095)(10201501046)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011)(7699016);SRVR:BN3PR0701MB1378;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1378; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1378;4:5gdcNrsso0p2VwXyaem+fWmNogCQklNnLvu5KFcwiUJmjj00wfLC8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Nyx1tKm8MyXTnM6pvEOUbvdtMa1xsOUV0o6vp4KQSnF+xkzvwbig/iaxYtjE+OdJ+OBPJAkze8Q9IXn8/mVmrTMRopgjtaECj8T66244cSBNbS1yR/nBeEt1IidB3WZTb/jMCrpxWgbP2dNroi9Ty16yZSEIpWSe2ashdRGbszzbS8lMsftn0GV3NmwnTepT7Uugg6MtKuNDG0gYzyt5QBPpZga7vpuJ5MV7Aassw7w==;5:W7q1YTS2gcXLKVdlJmWj4N4aWRwAKbhuPQOaLDxxRf9I+Qt2Ixp6Z8cgsXuqwfOy5ic5owXJSt0BX01IMn1rPFgxIf4S8ClZXKFxNKIgqgFMnqkZqJSuBdiSMLm4/oNbVn0iTcSAZKdRzuwF868KIRYYowJe2rc9I9QNHwrfM5g=;7:LNTM/lR3bAcHQ/GHYYL4nDywCYUJDnuF4QlWTWDRDpl5BraQMy8XLUyRIJBMnJ0lybhqEue8DfanYmdWUzsi4ibdH/5yctN/v42kxYZO1h/l0iQnmnXcsgGELYz22Ipz/wHQGSYQAX3Z0SWzUdjVSiysObXLOTwv9niwiAyg4LE89gwvMQNUEBCJG03EczlgS+paU0yGrXt5VG0B9pk1ogB8ysGv/WlWG9vx7MuA7rml2wSsZKCfanzAtKj4PTho SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2018 06:13:50.2234 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8b9f452-eec3-49ce-fa81-08d5f775f314 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: BN3PR0701MB1378 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 This patch sets and clears FCF_ASYNC_{SENT|ACTIVE} flags to prevent stalling of relogin attempt. Once flag are correctly set/cleared, relogin timer can retry relogin attempt for driver to continue login. Fixes: fa83e65885b9 ("scsi: qla2xxx: ensure async flags are reset correctly") Cc: stable@vger.kernel.org #4.17 Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index b5c1a1dea087..a0c730bed312 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -431,7 +431,7 @@ qla2x00_async_adisc_sp_done(void *ptr, int res) "Async done-%s res %x %8phC\n", sp->name, res, sp->fcport->port_name); - sp->fcport->flags &= ~FCF_ASYNC_SENT; + sp->fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE); memset(&ea, 0, sizeof(ea)); ea.event = FCME_ADISC_DONE; diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index e1ff2e27e59f..ba14db8d0b8d 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -2634,6 +2634,7 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode, ql_dbg(ql_dbg_io, vha, 0x3073, "Enter: PLOGI portid=%06x\n", fcport->d_id.b24); + fcport->flags |= FCF_ASYNC_SENT; sp->type = SRB_ELS_DCMD; sp->name = "ELS_DCMD"; sp->fcport = fcport;