From patchwork Tue Mar 20 04:00:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10296359 Return-Path: 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 352E2602B3 for ; Tue, 20 Mar 2018 04:01:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2705C29252 for ; Tue, 20 Mar 2018 04:01:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A3A2294BB; Tue, 20 Mar 2018 04:01:27 +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 266D129252 for ; Tue, 20 Mar 2018 04:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751736AbeCTEAJ (ORCPT ); Tue, 20 Mar 2018 00:00:09 -0400 Received: from mail-by2nam03on0061.outbound.protection.outlook.com ([104.47.42.61]:43376 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750828AbeCTEAF (ORCPT ); Tue, 20 Mar 2018 00:00:05 -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; bh=ohj6Wrg1RxawsLzkZf6lOE/mpTH8WCyGz+OG9hZEGEg=; b=RqwveSISH71YJIfKKjLSshafJcEyTXJg6dkNwz/PD2qm/9Bo4TdpwSJ//vi96Whv2AR/AUBVX2z8tq4bqJDeUKag9/sA2hsystQeAwltLbEZppYnALosf25MRLuki+/GrpYKd1lu3jKiRefMfvO8E/6tn+m56vHvj8PQ7JaQF5U= Received: from SN4PR0701MB3632.namprd07.prod.outlook.com (10.167.142.138) by SN4PR0701MB3693.namprd07.prod.outlook.com (10.167.142.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Tue, 20 Mar 2018 04:00:03 +0000 Received: from SN4PR0701MB3632.namprd07.prod.outlook.com ([fe80::b589:29ba:16b5:3b7e]) by SN4PR0701MB3632.namprd07.prod.outlook.com ([fe80::b589:29ba:16b5:3b7e%13]) with mapi id 15.20.0588.016; Tue, 20 Mar 2018 04:00:03 +0000 From: "Madhani, Himanshu" To: Meelis Roos CC: Dept-Eng QLA2xxx Upstream , "linux-scsi@vger.kernel.org" Subject: Re: [PATCH 1/3] qla2xxx: fix error message on References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Himanshu.Madhani@cavium.com; x-originating-ip: [173.186.134.106] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN4PR0701MB3693; 7:vdaDhS1UQoVhEnxFqIoIKw5EgmniEDTIlJFx7GzQ0p0o0u3Y3+3gJJx1uAWbP+FTV7FPP19vq9CySaerWJ+qWKFLouw8sFMURFLvCMGUDTawVJthLcClzbvZTbvruOdUhTVyrYgHEyx7ml8mpPA2vNJsbnHK64JYrNtcvmG8bs0Xr8QRDYAvTMpQrkKm/116/wiFAN+HN8JoMgtI2q4g/8yU2bfSapKEF/soNMaw4wrDYYAu+6CYF9xQH3FTiDSK x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 8ffa680d-e789-4df5-86a6-08d58e170f3f x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN4PR0701MB3693; x-ms-traffictypediagnostic: SN4PR0701MB3693: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501244)(52105095)(10201501046)(3002001)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:SN4PR0701MB3693; BCL:0; PCL:0; RULEID:; SRVR:SN4PR0701MB3693; x-forefront-prvs: 061725F016 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(39860400002)(366004)(376002)(396003)(199004)(189003)(7736002)(86362001)(305945005)(59450400001)(54906003)(25786009)(4326008)(229853002)(102836004)(53546011)(6506007)(6246003)(83716003)(2950100002)(6916009)(186003)(26005)(68736007)(6512007)(53936002)(8676002)(3660700001)(81166006)(81156014)(8936002)(15650500001)(66066001)(105586002)(316002)(106356001)(2900100001)(97736004)(6436002)(33656002)(6486002)(99286004)(36756003)(76176011)(82746002)(5660300001)(2906002)(5250100002)(3280700002)(3846002)(72206003)(6116002)(14454004)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0701MB3693; H:SN4PR0701MB3632.namprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: uVp/7zbwHUzkMSxBhvLzVEo7PCkC8gjl7QreV/5O6BbG/MVVK6Q95IhEIusHDcBIULCgAXCQr4NFJRruhd9L+OwEf03Xu9TRVhRBmzC+FsqcZL7LopA0P9Q3938c5wHC4xYkCtQfwwBgdCU4T0fg/1GZm4S31NGGRKeqQyUYz6BG17hnke0ZDbhmWM9lKJkBieCIo7lVrIVpieUKLD4XdJGkXyjw7EiKvrJ04lyTMpFp+8MZ43yg2E6P8mBPlD1iDBC2my26297X9s/f77cMUgTRs/V7ZpgMmYH/yH096CF8UdXyA7C9CeglUIF9oQlU6lB7tVeptEdkQ3gmn6mKgQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ffa680d-e789-4df5-86a6-08d58e170f3f X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2018 04:00:03.2756 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0701MB3693 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 > On Mar 8, 2018, at 5:44 AM, Meelis Roos wrote: > > This patch fixes IO traps caught by hardware when mailbox command fails on > qla2200. The error handler assumes newer firmware that is available on 2400 and > newer HBA-s. > > This causes ugly crashes on sparc64. > > Fix it with separate debug prints on different firmware generations like most > other places do. > > Note: the debug line identifier is the same 0x1198 for both cases. Maybe it > needs to be renumbered in the new case? > > Signed-off-by: Meelis Roos > > --- > drivers/scsi/qla2xxx/qla_mbx.c | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) > > diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c > index 7397aed..3a81555 100644 > --- a/drivers/scsi/qla2xxx/qla_mbx.c > +++ b/drivers/scsi/qla2xxx/qla_mbx.c > @@ -503,11 +503,19 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) > } > pr_warn(" cmd=%x ****\n", command); > } > - ql_dbg(ql_dbg_mbx, vha, 0x1198, > - "host_status=%#x intr_ctrl=%#x intr_status=%#x\n", > - RD_REG_DWORD(®->isp24.host_status), > - RD_REG_DWORD(®->isp24.ictrl), > - RD_REG_DWORD(®->isp24.istatus)); > + if (IS_FWI2_CAPABLE(ha) && !(IS_P3P_TYPE(ha))) { > + ql_dbg(ql_dbg_mbx, vha, 0x1198, > + "host_status=%#x intr_ctrl=%#x intr_status=%#x\n", > + RD_REG_DWORD(®->isp24.host_status), > + RD_REG_DWORD(®->isp24.ictrl), > + RD_REG_DWORD(®->isp24.istatus)); > + } else { > + ql_dbg(ql_dbg_mbx, vha, 0x1198, use 0x1206 here for numbering. > + "ctrl_status=%#x ictrl=%#x istatus=%#x\n", > + RD_REG_WORD(®->isp.ctrl_status), > + RD_REG_WORD(®->isp.ictrl), > + RD_REG_WORD(®->isp.istatus)); > + } > } else { > ql_dbg(ql_dbg_mbx, base_vha, 0x1021, "Done %s.\n", __func__); > } > -- > 2.1.4 > Also, you need to update qla_dbg.c with this number Here’s diff will look like With these changes, you can add Acked-by: Himanshu Madhani Thanks, - Himanshu diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 1abc8a9064b3..5fd44c50bbac 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -14,7 +14,7 @@ * | Module Init and Probe | 0x0193 | 0x0146 | * | | | 0x015b-0x0160 | * | | | 0x016e | - * | Mailbox commands | 0x1205 | 0x11a2-0x11ff | + * | Mailbox commands | 0x1206 | 0x11a2-0x11ff | * | Device Discovery | 0x2134 | 0x210e-0x2116 | * | | | 0x211a | * | | | 0x211c-0x2128 |