From patchwork Thu Aug 2 20:16:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10554159 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 D7CA39093 for ; Thu, 2 Aug 2018 20:17:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C425D2C444 for ; Thu, 2 Aug 2018 20:17:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7D5F2C451; Thu, 2 Aug 2018 20:17:11 +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 4F3F72C461 for ; Thu, 2 Aug 2018 20:17:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727841AbeHBWJw (ORCPT ); Thu, 2 Aug 2018 18:09:52 -0400 Received: from mail-sn1nam01on0066.outbound.protection.outlook.com ([104.47.32.66]:60016 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727302AbeHBWJv (ORCPT ); Thu, 2 Aug 2018 18:09:51 -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=SPjWmH3xUMxL85J3+F9s6zmUylfhNIe3+CkkGC+JDn9cbaKxBzwhFwIRHkvzGdSwjLetOi4DdDWrzQSk8UqvtcTJjeWYvKArHC58AY0a+0+jr/bmQMVXbJU7dhIQkbQ5kYkWbSuSco6vdT0maBhWdin7vN9DisM7ZTxLdhxOHO0= Received: from DM5PR07CA0085.namprd07.prod.outlook.com (2603:10b6:4:ae::14) 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.1017.15; Thu, 2 Aug 2018 20:17:06 +0000 Received: from BY2NAM05FT006.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::202) by DM5PR07CA0085.outlook.office365.com (2603:10b6:4:ae::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1017.14 via Frontend Transport; Thu, 2 Aug 2018 20:17:06 +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 BY2NAM05FT006.mail.protection.outlook.com (10.152.100.143) 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; Thu, 2 Aug 2018 20:17:06 +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; Thu, 2 Aug 2018 13:17:00 -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 w72KGxOH007954; Thu, 2 Aug 2018 13:16:59 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w72KGxOR007953; Thu, 2 Aug 2018 13:16:59 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 04/16] qla2xxx: Add longer window for Chip reset Date: Thu, 2 Aug 2018 13:16:46 -0700 Message-ID: <20180802201658.7903-5-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180802201658.7903-1-himanshu.madhani@cavium.com> References: <20180802201658.7903-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)(376002)(39860400002)(346002)(396003)(136003)(2980300002)(438002)(199004)(189003)(356003)(81156014)(81166006)(8676002)(6666003)(47776003)(2906002)(4326008)(5660300001)(478600001)(87636003)(1076002)(106466001)(186003)(72206003)(575784001)(86362001)(316002)(44832011)(126002)(476003)(446003)(486006)(2616005)(50226002)(69596002)(80596001)(11346002)(305945005)(8936002)(106002)(14444005)(51416003)(110136005)(50466002)(36756003)(48376002)(336012)(42186006)(26005)(54906003)(16586007)(76176011)(148743002);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;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;BY2NAM05FT006;1:VQo8woFtHY1c8k2Q06TlpSGFrqcvE3aizQ31g0F8wSYehsNlvlyRpUgiJX37eIgzGL346An3R9S99wC6FTe57r17ku4LTK/qc9snZdLg4lcRYON5xfqHGrDIkU93u35U X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef338df1-6af9-4d57-efd4-08d5f8b4eb04 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:fm89FatU82AcTWiHkgkwAllA9H9Ih+XocfsYJHh1XHz/mvUzRTw156i2Jg0a2z+tIkwaG/kZIUTCD3k59TTothesQgs76BSsU6BulLTdu9WOX8fGVKCKFaJDz0Dvi1ERxqu51l4q80LHruuWRgRPwFND5zcN9YyFcDGOc3dtXGFtgM/aPJpV1VmYjsQ8+98ptByDS4Eq8pF6k9HpUqIpFt8HRDHFrERbQcMdeUg+OhCrK1EGw5304lCXqBIsTizXN+l0fT+5KxxQrDjmHhwVjZr0JHkxv1Z0gdx7zmicTA2zuKsVCaOZtuhNdHiNtpc6I/7JDAfnAh5PkkZWfBurIcway7KPW1YTBDtt0H/l5pA=;25:2lgOEkSPZDL53mcrTYSuUjGvu5ZcHMM0icr3Tac2d3XF3kZtgkiWvoofB3mD34POmhkMvTgWQBcWbW3sm27A7l6TSQ4xQLRkqUfnxeoFC9fqFoUXOoo46gy6g8Y84CEfEzWOB/92jsER9S0jYrYgd0AhPNiKr8vXIOiHiJyr9ndt3+z//LoMrNIMtredqZDML2+NsPCtbRXif+DucDYD/al5daFiM+Hg37bXE9MWo4ZEUlOwxSCVfJq1frw+8IJBSDCoTr56h1k/Dh8ZCLOvQuhXaa25nnXls4YWlNghcpLiB+4Gub5eH5BbHdh+nEltr7fBCio8cIFMZLlr9tEj3w== X-MS-TrafficTypeDiagnostic: BN3PR0701MB1378: X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1378;31:q77JfuxTRJLFlvFIgXbK9HaDKWljVjGmnTEUPvmyvko0iY/0NrBBjt5D4jOxY7L0rzXENZKA7jW6grFDLKxgjnqri4y4Ole6QXN/Kf1VHgzZMqTN+nQDRXy58bcMy8FBX/yvxaBKSldXhZyBcipKsgBrIRju5RRiyGbI9vWABTNVoweIZrnTn30MsnGlXUZ4+4r9mFE+9ex9fpNK0ZJEkRM8AMMeXOvkf1IolDcBe2s=;20:CKWqIWB6Y34NcG9NiPoDk+UMaAdgwLZ5MT3XFAL3/dEgVO+GpylGw5h+sJPz3CXLfBVOabCF//N1ySbyIORe5NoXGeezNtLKnIkPs8mLcNvkka39FzXAOV73MspwIL+lkk+yGhkwy4cFI7HdvYLgT6NToGDRYYb9aTq+vFrDsHFYpGcwGy9QlkWYvqtlt9TfdbzI1FcPivL94V9fC0+rFUeUne/pfl07xXzYzzDwhZBj7LcsiT5GUWzAkYeEkw8TTbLzwDJ5Nep8xqM0hmJBxVGCLctPMLlcjyFZ6A2aFyGbmJyCOaxO5Ao4asoBETQdFRJhdP7GnvZNiqdrBmOeWYvz1cQSC9t1z5m2Tffj2nxx4BmXFwiizYONB/H4/Aeoq5hizmSxax34886XFxPHLrpQs3j/qhFjWX5cHTutHe0g4aZiaYbjG9FqQTW838Z3TDoMFozVeVC0QfQgD7BMyXauT0R53v/vTq9rzoH68aOSLPTD6MaEjtWZRPXrjXvM 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)(5005006)(8121501046)(10201501046)(93006095)(93004095)(3002001)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016);SRVR:BN3PR0701MB1378;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1378; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1378;4:/AxdWywA7pmhwbNeu/2jQwbZTpLQF/sTaPlDZt1EQ+k2Bf9hH2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se4F2uC537IzywprQBpw416uVBhIrNxcRKQ2FBvattmRRDcKSOAE0bfgd7jBzoguZWNxj0OWhY9y1lj/B5ydR7HMgK+C4xVyoJIKPHjd4eZqgzYAgsmRRhRLNWEpBCu/8FtelMho2cOHFrz2161M93Q5qZ2VQA3T9A7rGPDhPZbPdFbIZlzDcvcFaekCkcmjcerVZobCxV5zCWEHg==;5:rhpZyquI+jJ4zUqHh2+h3ys7vvjrQDHIpsZvF3pOf/ogJpBqpT6NXEHt8/0QVjgSCXNhj7k8r2PvLOvp6/nbz/eQdOZ0lJS2DEGjbR/k6xxXl9Q53bmvLmzizZDd+Z1naQekhsLXQ/WZIorK/pVao4p/Gv4b94J7HbcwlGsHTlI=;7:k/tu+yHaolo4eKeEFpPG6jr5X20cYBixd6dD1/O0tHYzxidyGk+8x3Koz8VlmsPQ6fQju+ai+yJkyYGKj5NG1r/RrIMueE2RsIYMqqwRYlTC5VwlBV+ycW+dkpgyml2E+SYPyu0kbf3HJI77QbGEsaBNH0JOHMfWbvt/FdyHSe4TcgMa2OfF2HMfJft0cbAH0kFhaJ5OShiLf6fydGkTK2P/V3k1GIo3XGABsdZRJFL+VNrBa9PEFVPCPEC2JBBZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2018 20:17:06.1376 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef338df1-6af9-4d57-efd4-08d5f8b4eb04 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 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)