Message ID | 20171204224517.3409-9-himanshu.madhani@cavium.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> 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 0DD09600C5 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 4 Dec 2017 22:45:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0008429387 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 4 Dec 2017 22:45:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8D8029446; Mon, 4 Dec 2017 22:45:56 +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 5FCCA29387 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 4 Dec 2017 22:45:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752472AbdLDWpy (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Mon, 4 Dec 2017 17:45:54 -0500 Received: from mail-sn1nam01on0056.outbound.protection.outlook.com ([104.47.32.56]:36983 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752240AbdLDWpk (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Mon, 4 Dec 2017 17:45:40 -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=oGYvtCvx/LFbGM1b8CKF1FyAVVNmcvgpm96TiVkRXCU=; b=j+RoLJxiYdiZDepp9qyu0/HyHh6zgDfE2lLqL9DDmo2H24LccSYMadtvPUGcPVbrE2CfRf1aeeIW3HT0GYaKOYi/GjrNYO1682ZHnJHbRPC/dGwHgOpSflwkAUex9Lr4ZeS4UxaAU3m9tgTsx5H+VhrxjP+53UsI5aZlXk3foF0= Received: from CO2PR07CA0059.namprd07.prod.outlook.com (2603:10b6:100::27) by SN4PR0701MB3822.namprd07.prod.outlook.com (2603:10b6:803:4e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Mon, 4 Dec 2017 22:45:38 +0000 Received: from BL2FFO11FD054.protection.gbl (2a01:111:f400:7c09::161) by CO2PR07CA0059.outlook.office365.com (2603:10b6:100::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Mon, 4 Dec 2017 22:45:37 +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 BL2FFO11FD054.mail.protection.outlook.com (10.173.161.182) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.239.4 via Frontend Transport; Mon, 4 Dec 2017 22:45:37 +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; Mon, 4 Dec 2017 14:45:19 -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 vB4MjJnX003477; Mon, 4 Dec 2017 14:45:19 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vB4MjJA2003476; Mon, 4 Dec 2017 14:45:19 -0800 From: Himanshu Madhani <himanshu.madhani@cavium.com> To: <James.Bottomley@HansenPartnership.com>, <martin.petersen@oracle.com> CC: <himanshu.madhani@cavium.com>, <linux-scsi@vger.kernel.org> Subject: [PATCH v3 08/22] qla2xxx: Fix login state machine stuck at GPDB Date: Mon, 4 Dec 2017 14:45:03 -0800 Message-ID: <20171204224517.3409-9-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171204224517.3409-1-himanshu.madhani@cavium.com> References: <20171204224517.3409-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(2980300002)(428002)(189002)(199003)(316002)(47776003)(69596002)(101416001)(110136005)(16586007)(4326008)(189998001)(1076002)(50226002)(5660300001)(8676002)(105586002)(42186006)(80596001)(54906003)(81166006)(106466001)(36756003)(76176011)(51416003)(356003)(81156014)(86362001)(72206003)(6666003)(8936002)(87636003)(2950100002)(478600001)(305945005)(33646002)(2906002)(48376002)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0701MB3822; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD054; 1:2GjP4pu1UPTMM6a3pBf70sPwOapjXkogN0DjH3Yzxxnd64geINK2AC/8nMrpOrWHm7MrCEQEMUv0IcCpT9WVqajENTHGoK/WaeCnQJUpwjRrsfTmpgivIlqRIsG6jyMd X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc5ff159-bd96-4589-d2a0-08d53b68bd2a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603286); SRVR:SN4PR0701MB3822; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3822; 3:fCjYdi8FhMYMhb+dB5zkyvnmBUCYHFZvVJKwteH7GuJD2sMdcpp7bn3UXI64RZsOCHjVlDwjsEOL5LiF7v7b+UsLbUS9ktN3M+kDGx0FxZ585j9HhpDui8HMIEwSAgyn8J6wCQ+RygCWMZ98xVVhUPrnk6fgo35JwQeis8E3ERlzrXk+aTf56jIHVbsN/xDTX9/ypbFRW5shkAIPodOizWlRV+wI6Y1NxivCoNngOpjAf8JgvgFcM8JKalZfMvISvSC3XSolHkjwEa9gm2sGo1UUCtO/q8YQnYAMVv0tzzZD2VsjmiZ1QUF7WqY078rZvke6SmouhZIQXvjZShOOeiHqAv9SMo0p2wAf1ItgJFM=; 25:iJaRB7LHNSy9M20j9Pmi+7MRUmx26H1oXQOAyu2PoSb5U9IVsXZUpnbre5Qht63cDePKCnQQkDoCDxRj0dpg+F0NaM0Z2yLSF7yRjD8MaZMCeiDred12QcaiS0ofeAdfQNxBqkm+dGencRIUTbszhFII/+D9C4aEHiLVvzCCaNRzoKxhprVYN7mu7zPxGff8k5d6IfCwRY4giCV7iLO0QcFg/DfY9zqdMnOaruvKX/WGGnR6di45DeLuX2OsXPaI33D5nbuIqKhHlW7FK/JUn6gAKochIpvVOMoPpP+u6YBeqoaNUceDcD/eA6Th3gqgDm4Mc7kMq0bFrPcxupuhcA== X-MS-TrafficTypeDiagnostic: SN4PR0701MB3822: X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3822; 31:aQrZBDTFn3w23tv/YG8cUnOkjN8a3czixhCNKCNUXQ7Gl4cpYsk4ECZwoR2QoxPvLv7QtoGHjA04wg55c37audLa/C/Xj/lrpoTTLjHpJsVhzH2H3GI1fs0TvOm69g9228/cVxKVndLsWoy86warEuEQtH9QIJoMEj68JscKMaSe5h/3hwiqyjZ4RBsv2odxR+Cn8VXPdaJPdXGgvW7LNvyj/wZ3fF5bToRj68bLW1I=; 20:xEoXKTAp3EAqiQ4Vwvr1m6Qjbt1OD0nUfXiCPeAV+CgP8q9PWZHEUICOKbH6LeQx0R7Tjm2iZSjkWHupXOiHyfUTOWxXkOU6OLOZwJXDcxHQyRTB551P56VPCzAxFmcBxArVmeweqqA2GKow7KwqLjTlOPl1R72ulbE8uPiQIsXWpR0EEDMLs1k0hSmFv/6Txt0PceaJNeTz847DEqIc1ruCVT8sV8zWNiCERMCxrkoy8LtXHZIndNq0jxVq3JbfT59YsjNc+UUMTcaeoJnxAKs8l4wW4FE9RBxJ+qjEVUIVe0r00hOneI2Tn/uLRdI1SYnmtBndBTwgWYhp3igCB2WKyx6uEiFaCnWRiVrZMDTj8kRpraAIf4iW52VVX9UkBof71QnFRQB7/4PqVEauNMA2az26wUEA7LUAtjCaFQ+esnKSL3fqCQliqsWF2aM8vFdzLN1MyT1w01aTOneHtSrTwF1l+ts6NZOealg+Gr+zNwLTMURlCHTTtHyUSO/8 X-Microsoft-Antispam-PRVS: <SN4PR0701MB3822BBDBDDD6B8B70F0DE75EF53C0@SN4PR0701MB3822.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3231022)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(6072148)(201708071742011); SRVR:SN4PR0701MB3822; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SN4PR0701MB3822; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3822; 4:2ZIUEaFi7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4U5OMlc9vD7KAWsqnWs1dki2cG+WhTtYp3p4RnzSlGZXzNPiJiL0YbL2hgcepR8=; 24:0niuOM1J0Hd6/CW6S/vgqx6lKjyRWqC5kzc8aXc62CC6VfPOI5V1Ho5cKAjM7f3Gt4ZTXEBZ9KwLnFe3ERVO2DGGdGYTkQrYil1h4JZ9+fw=; 7:zpTsQ29jItxgprd4mp2NkqkD3u+ruPOL+iHYnrxI4K74hmYEBeE1GiMw3KJ9Q4t3ez4juHfJ8bPFoOlx/22x/02Qb3Fw/rbNRtnLD5AJ58aV1Jxm00YCSVRzHvIrmrmKBNYpgbqljTJgmhw7E+1pTJleOC0sxD12pu1l5XgyyGYaSg4/2RYDoxh1RUD9fIrPepuLcHzhcroq9JO18T3HK2PV4LDdCOTgf6MWNyxt7RMxJBJ+sO8UBQoEGBecyPSU SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2017 22:45:37.5387 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc5ff159-bd96-4589-d2a0-08d53b68bd2a 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: SN4PR0701MB3822 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index be4c67b465b8..2f246996d3e2 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -863,6 +863,7 @@ void qla24xx_handle_gpdb_event(scsi_qla_host_t *vha, struct event_arg *ea) int rval = ea->rc; fc_port_t *fcport = ea->fcport; unsigned long flags; + u16 opt = ea->sp->u.iocb_cmd.u.mbx.out_mb[10]; fcport->flags &= ~FCF_ASYNC_SENT; @@ -893,7 +894,8 @@ void qla24xx_handle_gpdb_event(scsi_qla_host_t *vha, struct event_arg *ea) } spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags); - ea->fcport->login_gen++; + if (opt != PDO_FORCE_ADISC) + ea->fcport->login_gen++; ea->fcport->deleted = 0; ea->fcport->logout_on_delete = 1; @@ -917,6 +919,13 @@ void qla24xx_handle_gpdb_event(scsi_qla_host_t *vha, struct event_arg *ea) qla24xx_post_gpsc_work(vha, fcport); } + } else if (ea->fcport->login_succ) { + /* + * We have an existing session. A late RSCN delivery + * must have triggered the session to be re-validate. + * session is still valid. + */ + fcport->disc_state = DSC_LOGIN_COMPLETE; } spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags); } /* gpdb event */