From patchwork Tue Apr 23 21:52:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10913777 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 C55981575 for ; Tue, 23 Apr 2019 21:53:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6E2728931 for ; Tue, 23 Apr 2019 21:53:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB5EE2893D; Tue, 23 Apr 2019 21:53:50 +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,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 53BC928931 for ; Tue, 23 Apr 2019 21:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727918AbfDWVxu (ORCPT ); Tue, 23 Apr 2019 17:53:50 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:31966 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726665AbfDWVxt (ORCPT ); Tue, 23 Apr 2019 17:53:49 -0400 Received: from BN8PR07CA0026.namprd07.prod.outlook.com (2603:10b6:408:ac::39) by BN7PR07MB5361.namprd07.prod.outlook.com (2603:10b6:408:2e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Tue, 23 Apr 2019 21:53:47 +0000 Received: from BY2NAM05FT043.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::204) by BN8PR07CA0026.outlook.office365.com (2603:10b6:408:ac::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12 via Frontend Transport; Tue, 23 Apr 2019 21:53:47 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by BY2NAM05FT043.mail.protection.outlook.com (10.152.100.180) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1835.12 via Frontend Transport; Tue, 23 Apr 2019 21:53:47 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Tue, 23 Apr 2019 14:52:38 -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 x3NLqd6n013703; Tue, 23 Apr 2019 14:52:39 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x3NLqdKE013702; Tue, 23 Apr 2019 14:52:39 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 1/2] qla2xxx: Fix device staying in blocked state Date: Tue, 23 Apr 2019 14:52:35 -0700 Message-ID: <20190423215236.13664-2-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190423215236.13664-1-hmadhani@marvell.com> References: <20190423215236.13664-1-hmadhani@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 132005300273581885;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(136003)(346002)(376002)(39860400002)(396003)(2980300002)(1110001)(339900001)(189003)(199004)(76130400001)(87636003)(68736007)(498600001)(2616005)(126002)(76176011)(36756003)(486006)(11346002)(85426001)(51416003)(26826003)(476003)(110136005)(54906003)(305945005)(316002)(16586007)(42186006)(26005)(4326008)(36906005)(14444005)(2906002)(8676002)(446003)(97736004)(336012)(53936002)(105606002)(5660300002)(86362001)(8936002)(48376002)(50226002)(70206006)(15650500001)(81156014)(70586007)(50466002)(6666004)(80596001)(69596002)(1076003)(47776003)(81166006)(356004);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR07MB5361;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: af522bd2-2d84-45e2-1a10-08d6c83629bd X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600141)(711020)(4605104)(2017052603328);SRVR:BN7PR07MB5361; X-MS-TrafficTypeDiagnostic: BN7PR07MB5361: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0016DEFF96 X-Microsoft-Antispam-Message-Info: sX0ggeGTQdmhZ4Fn7/jRAsSJVP0YRI5PBBs+JDWFINszyzme7mMvP27i7fLGwwVt5WvKbsCRWA4RGKFn3Ysfl0nOGik9XpkmOJSEgCUiFbMkwsavJ06GtYnuU9l2wgt1QWiVKMoYahhmtNRWrZ/YEeVpbQSly45SDyvDwMXcNWQNvJbZoueoYd3kzrZEYeFIeoe6Sy0fcOQ77S1JIpwc3XYXCEXE3UE6nb1wxvz4HvNAOD78ToNGHBX+wGEwXmbUqVYX7OGJkmfRBeK+3MWrBXRid35AQWocebiEqPf2I/qCJOWnuVOdBgi1kdLIG2LYcpmc+ljL8C51CsUlOS2CULvujyzzFDBjpfETiDluWxTocc/ys48RS8JIUWhLjXJud3Yho3TnM/F1Xme5HG6itYA/VEfzgIn33r61kCKPtIw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2019 21:53:47.1039 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af522bd2-2d84-45e2-1a10-08d6c83629bd X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR07MB5361 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 This patch fixes issue reported by some of the customers, who discovered that after cable pull scenario the devices disappear and path seems to remain in blocked state. Once the device reappears, driver does not seem to update path to online. This issue appears because of the defer flag creating race condition where the same session reappears. This patch fixes this issue by indicating SCSI-ML of device lost when qlt_free_session_done() is called from qlt_unreg_sess(). Fixes: 41dc529a4602a ("qla2xxx: Improve RSCN handling in driver") Signed-off-by: Quinn Tran Cc: stable@vger.kernel.org #4.19 Signed-off-by: Himanshu Madhani Reviewed-by: Ewan D. Milne --- drivers/scsi/qla2xxx/qla_target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 57cdd762230d..fc8914dd9dde 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -982,6 +982,8 @@ void qlt_free_session_done(struct work_struct *work) sess->send_els_logo); if (!IS_SW_RESV_ADDR(sess->d_id)) { + qla2x00_mark_device_lost(vha, sess, 0, 0); + if (sess->send_els_logo) { qlt_port_logo_t logo; @@ -1163,8 +1165,6 @@ void qlt_unreg_sess(struct fc_port *sess) if (sess->se_sess) vha->hw->tgt.tgt_ops->clear_nacl_from_fcport_map(sess); - qla2x00_mark_device_lost(vha, sess, 0, 0); - sess->deleted = QLA_SESS_DELETION_IN_PROGRESS; sess->disc_state = DSC_DELETE_PEND; sess->last_rscn_gen = sess->rscn_gen; From patchwork Tue Apr 23 21:52:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10913775 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 0F6101575 for ; Tue, 23 Apr 2019 21:53:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00CC328931 for ; Tue, 23 Apr 2019 21:53:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8CD42893D; Tue, 23 Apr 2019 21:53: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,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 9019D28931 for ; Tue, 23 Apr 2019 21:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727838AbfDWVxt (ORCPT ); Tue, 23 Apr 2019 17:53:49 -0400 Received: from mail-eopbgr820077.outbound.protection.outlook.com ([40.107.82.77]:52982 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726083AbfDWVxt (ORCPT ); Tue, 23 Apr 2019 17:53:49 -0400 Received: from BN8PR07CA0009.namprd07.prod.outlook.com (2603:10b6:408:ac::22) by CO2PR07MB2533.namprd07.prod.outlook.com (2603:10b6:102:17::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.18; Tue, 23 Apr 2019 21:53:46 +0000 Received: from BY2NAM05FT043.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::206) by BN8PR07CA0009.outlook.office365.com (2603:10b6:408:ac::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12 via Frontend Transport; Tue, 23 Apr 2019 21:53:45 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by BY2NAM05FT043.mail.protection.outlook.com (10.152.100.180) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1835.12 via Frontend Transport; Tue, 23 Apr 2019 21:53:45 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Tue, 23 Apr 2019 14:52:42 -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 x3NLqgWo013707; Tue, 23 Apr 2019 14:52:42 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x3NLqghA013706; Tue, 23 Apr 2019 14:52:42 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 2/2] qla2xxx: Silence Sucessful ELS IOCB message Date: Tue, 23 Apr 2019 14:52:36 -0700 Message-ID: <20190423215236.13664-3-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190423215236.13664-1-hmadhani@marvell.com> References: <20190423215236.13664-1-hmadhani@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 132005300254918296;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(136003)(346002)(376002)(39860400002)(396003)(2980300002)(1110001)(339900001)(189003)(199004)(8936002)(76130400001)(86362001)(26005)(105606002)(68736007)(76176011)(70586007)(6666004)(305945005)(5660300002)(2906002)(11346002)(70206006)(51416003)(2616005)(356004)(446003)(476003)(486006)(87636003)(42186006)(316002)(26826003)(15650500001)(36756003)(14444005)(54906003)(47776003)(80596001)(81156014)(16586007)(36906005)(498600001)(336012)(69596002)(48376002)(4326008)(126002)(85426001)(81166006)(50466002)(50226002)(8676002)(110136005)(1076003)(97736004)(53936002)(4744005);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR07MB2533;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3bedbf8f-bc87-4f9b-8892-08d6c836288d X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600141)(711020)(4605104)(2017052603328);SRVR:CO2PR07MB2533; X-MS-TrafficTypeDiagnostic: CO2PR07MB2533: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0016DEFF96 X-Microsoft-Antispam-Message-Info: BsWyWCohIyfHhiOGvROrwt8bRDn5iKVn1eCyNkmggj7i36+XF0GOEJ6FdAjftBK9mNchkyB8Wc3HjzHaafbkVV2BnvSEm53M3v0pZOvblCoXO/kakavDLomG2Tv8KNyr9szW7k1F5luArX2KoaRbDMfanu7fkNWXqtIg/T+lAJ8tOARa4mfOEt2DlZXKxdbFi938LWmDp8eVoOPKuoc8E5PjXZCAq5zS2orZZ/yDdgcbgbtkYeGCpv/aY80oqMJbc0+oa/9Z2RWH/dFbAua2iqUtsDV4qo+jAUEiZGYYU6JClf6UXLIo9dcUJQ9eOGRtEaBCXYFr7csrw51AzvCkiSj1mE8wFwS9zHa5qW1P8qBRObFR/ZxxCarDfM9Y/jneGRlmR2eY3ILo5DBT9APE2bKxmXXoMnmgGeUmLWd1HOw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2019 21:53:45.1185 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3bedbf8f-bc87-4f9b-8892-08d6c836288d X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2533 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 ELS IOCB done message should be moved to verbose logging to prevent confusion about the error case v/s sucessful submission case. Signed-off-by: Himanshu Madhani Reviewed-by: Ewan D. Milne --- 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 8432ef05f20b..063c78cfa997 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -1625,7 +1625,7 @@ qla24xx_els_ct_entry(scsi_qla_host_t *vha, struct req_que *req, res = DID_ERROR << 16; } } - ql_log(ql_log_info, vha, 0x503f, + ql_dbg(ql_dbg_user, vha, 0x503f, "ELS IOCB Done -%s error hdl=%x comp_status=0x%x error subcode 1=0x%x error subcode 2=0x%x total_byte=0x%x\n", type, sp->handle, comp_status, fw_status[1], fw_status[2], le16_to_cpu(((struct els_sts_entry_24xx *)