From patchwork Wed Jul 25 17:01:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10544453 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 C9969112E for ; Wed, 25 Jul 2018 17:01:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4A5D2A807 for ; Wed, 25 Jul 2018 17:01:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A880A2A816; Wed, 25 Jul 2018 17:01:38 +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 3AF442A86B for ; Wed, 25 Jul 2018 17:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729506AbeGYSOK (ORCPT ); Wed, 25 Jul 2018 14:14:10 -0400 Received: from mail-eopbgr730040.outbound.protection.outlook.com ([40.107.73.40]:9136 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728557AbeGYSOI (ORCPT ); Wed, 25 Jul 2018 14:14:08 -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=ZypwnS/KIZRjJhDD4wMtKbx30p+lCstCBOuLlSjO+rw=; b=hZvpiDo7MJPtQJ1xhGlYsOUshJMfSpGimitUBRzXopAH3Nj3Md50p8nB5QOYA+yHEo3KR8QCCDrBs7iu79xQpfs4sSl92iR72q55vIAEnOmJmQrAh5AJuOXN7+DIJYi4JDZuv2DaSbvlmcqehNlIzou0BxbF9GBf/MbQiJFv/cA= Received: from SN1PR0701CA0025.namprd07.prod.outlook.com (2a01:111:e400:5173::35) by CY1PR0701MB1387.namprd07.prod.outlook.com (2a01:111:e400:4c1b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Wed, 25 Jul 2018 17:01:29 +0000 Received: from DM3NAM05FT064.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::205) by SN1PR0701CA0025.outlook.office365.com (2a01:111:e400:5173::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.995.16 via Frontend Transport; Wed, 25 Jul 2018 17:01:28 +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 DM3NAM05FT064.mail.protection.outlook.com (10.152.98.188) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.1017.0 via Frontend Transport; Wed, 25 Jul 2018 17:01:28 +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, 25 Jul 2018 10:01:21 -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 w6PH1LnA010320; Wed, 25 Jul 2018 10:01:21 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w6PH1LG7010319; Wed, 25 Jul 2018 10:01:21 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 04/16] qla2xxx: Add longer window for Chip reset Date: Wed, 25 Jul 2018 10:01:08 -0700 Message-ID: <20180725170120.10269-5-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180725170120.10269-1-himanshu.madhani@cavium.com> References: <20180725170120.10269-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)(39860400002)(136003)(396003)(376002)(346002)(2980300002)(438002)(199004)(189003)(1076002)(16586007)(42186006)(316002)(336012)(47776003)(186003)(48376002)(72206003)(50466002)(446003)(11346002)(478600001)(26005)(87636003)(6666003)(5660300001)(106466001)(305945005)(76176011)(80596001)(69596002)(356003)(51416003)(4326008)(50226002)(2906002)(8936002)(575784001)(81156014)(110136005)(86362001)(476003)(126002)(14444005)(44832011)(8676002)(36756003)(106002)(54906003)(486006)(2616005)(81166006)(148743002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB1387;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT064;1:w8cnUxlaLvDW8IhAu84GR4Y/iKD1PSloAETsOxquM37icLIz0Afb+2FqXwFzUZ/tM8MS7jv2U9rGUsQVqOLbIfNRgsL3IrDkrpzXePaNjjGiqZvL+7CxTG4TIgP1FPrE X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c481bac1-bc86-4971-5307-08d5f2504380 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060);SRVR:CY1PR0701MB1387; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1387;3:D1oSf11OVWyBUxBqXB542AcAuGW5Ljy2DVy51VYJiBBVI7o+ofRryIPx3ByKwyXfhYoDJ/CW4QVPb+YzeEjM8D4O/mjQ1d57FmwBp+22u4cfnr5YEHmnt3LoiOelrJWBRrX8j8l0dOINOoCemVBiLQMGvlmPfcmQhpiAte5+y/Ngo1HnATVGQkxdOFcpHziI8+P00WTVN5hCB6hq9zacOoagn8NFOg73G2pAavaFyOm7FbqVkKEoF6t86t0AltATE3kk2G5hadyQFkC6u4aC/yLaa/OfXNkRxITxD//pV1xoFxeNs4lEyQ3kXOuXSCL+cF/sCEf9nNno+qwxaaedNUf2I/sd7mGu52XMV/tvhUM=;25:be21SNTp924JEUUy5tA/8QQ02epeSW4H5/NGO1tU9ETz6Mxr0Kn3zovaXnKSgqqQo3kRyYhXs0VqD2mg5Mz8WeTc8vmVMqfHsk6NI8hZ7cj4x6rsnKvDYpNI4nHHekBAsWWqBnFgeZEMBhgo5QwplYoQOyLv6WWAdSNHTMwTtNyg46yNRpWctJUQ9sSh9fxdEE5Kx1ElpGtf1X9LwZt1javWF2OqDnt6A0GgG9MC8+gr6S6CGFAs95muB0vD2xUm5BRCVr67vOFmUijhh8zFhiavrurQ/qZatx05btpbQkBF5fblia9+gUEHHUcA0G1BHWwLRLKqM1uBEB6cvbuw4g== X-MS-TrafficTypeDiagnostic: CY1PR0701MB1387: X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1387;31:iRq1WzIWtUUvvFq5AaN8aEl4f+BjVOl4DErWj45xs3yZ4TOjZhYNsXirGljm4ijQAm4r0xtC6k8SnT0S8SvNBPoWPyWAF2NTRcCwT6sXBZNEViB4dfPLI26XY7agTXAXtjhxQ6GO5W9qrolephaAIDaL82/ZCXokuWDO/SFZUVNnWKBOE91XseTC76Umk3jLE9GabtMHKi7DhHGjWJj8ydhKpaEb0TDuyEwmjcUP8VI=;20:x386UPD8Lde60qm8oneDGelylBc2neBSX9vfb1+sX6MLFLzhrpVtzbbwfNQe3SsWLuTICJ8k8C7OAIWUX36mSyrzHQ9SvgETjNUUbKKbAEvlDXmCypEb87wL3wrUM/FKs3sZJrHg2STJOfUnk32iupmKEILmUSyuosWpnmoenuyhQYBYsGEigGk9kpjooPtOJfMMZKc4F82zcm9vMYEmQoO1bstJmq1WO2vVD027wjDppbvti443So69yfE0GSDvJNHPdr2jaG/4Mj7/rv5wQehXmRT0Rr1UKsJS+BbxMDvXdZMnGasJCrF3T++WW3HXy8218NjjVfVIkXCsmPpLcSggvUpeyrGFjQUvcjYkukerWX/4Tl4BkH6ucO+Qfg9fZ+NYPUT7OFvv/Yl181UIqhMI1jwlJOMDEFKG/rq5f8q8qS/L1LtF3X0/1n1f0zsdO1A481KEAciSPsN6prGIYgyOG+owJHYKIvqhFVUVAFx6Kd9VYzsxN+iDiB1W/EhR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93004095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:CY1PR0701MB1387;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1387; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1387;4:Vspf3gtsdwdjK0O+hPEwHG4cPvj0y7rXAOqDN8upMK/h5Hh5zXgA+jzQJ5ohq8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L2jA605ECbqOr1u0lhBCCTTxBub7I+xwPjHF4gnGPlV+F6m4RTXPC1q24xjIgdZhFb1DT+8wdOxYpszh028gjaGCQBB//LTxKeA0FFfuzhB59eccHqa/d49AyFw8RN6IGUA8Cf64g7uW2LWO3/j+5Ztz2P+HfwxsB5aheN5AxBks5wCQs7Y1rkqbOMWxrNt7lPc6iYWRPtW44AeN0SrTd8c6EHyC9Q==;5:u+9dcurdiFq7yDVXvDlZpJsuZpVJS9sGhrULMtNDZyp8Mzc1zffD2k3d6Jjq/Aj8WL0RtQ/jdozulxRkw5Bv1wGhCDh4lTE50Jv6ueAAjNZX3lCgc7/QjYRT8FtpeTIIgoUniETp8ecJzrv72/KCTgyzuycpT7mBEb66wdgrMTA=;7:CoWcEQGVQabMs2fbq5aiLxzMPP4ByioiylmVjbb30JaxNmmDJuCogAlRP61WieUdLqP3BLq8B3L2uTxjz2y1AR5m/CZEexoG+psSDR2EbZo7aixzyNRfnTIwtbUKJ7L7KDBT4rjmIWKtRQUX/2YVa1yv2bVPi9zQj5OT3KBLwbPvrTgGIDA/pewX4wdO5aEW3jOeVRt5vvUZ6UIe1mEIhb59gxLEito6u6gs306A+WJxeG6if+nDsU5YnC0mT9xF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2018 17:01:28.3613 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c481bac1-bc86-4971-5307-08d5f2504380 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: CY1PR0701MB1387 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 The qla2x00_reset_active only cover the window of turning the chip off, add check to cover Chip on. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 3 +++ drivers/scsi/qla2xxx/qla_tmpl.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 5fd44c50bbac..c7533fa7f46e 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -1130,6 +1130,7 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ha->fw_dump); goto qla24xx_fw_dump_failed; } + QLA_FW_STOPPED(ha); fw = &ha->fw_dump->isp.isp24; qla2xxx_prep_dump(ha, ha->fw_dump); @@ -1384,6 +1385,7 @@ qla25xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ha->fw_dump); goto qla25xx_fw_dump_failed; } + QLA_FW_STOPPED(ha); fw = &ha->fw_dump->isp.isp25; qla2xxx_prep_dump(ha, ha->fw_dump); ha->fw_dump->version = htonl(2); @@ -2036,6 +2038,7 @@ qla83xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) "request...\n", ha->fw_dump); goto qla83xx_fw_dump_failed; } + QLA_FW_STOPPED(ha); fw = &ha->fw_dump->isp.isp83; qla2xxx_prep_dump(ha, ha->fw_dump); diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c index 731ca0d8520a..b170eb54aab5 100644 --- a/drivers/scsi/qla2xxx/qla_tmpl.c +++ b/drivers/scsi/qla2xxx/qla_tmpl.c @@ -1028,8 +1028,10 @@ qla27xx_fwdump(scsi_qla_host_t *vha, int hardware_locked) ql_log(ql_log_warn, vha, 0xd300, "Firmware has been previously dumped (%p)," " -- ignoring request\n", vha->hw->fw_dump); - else + else { + QLA_FW_STOPPED(vha->hw); qla27xx_execute_fwdt_template(vha); + } #ifndef __CHECKER__ if (!hardware_locked)