From patchwork Thu Mar 8 13:44:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meelis Roos X-Patchwork-Id: 10268119 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 F27B06016D for ; Thu, 8 Mar 2018 13:44:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E266C29931 for ; Thu, 8 Mar 2018 13:44:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6DEB2993B; Thu, 8 Mar 2018 13:44:12 +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,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 5EE0E29931 for ; Thu, 8 Mar 2018 13:44:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755920AbeCHNoL (ORCPT ); Thu, 8 Mar 2018 08:44:11 -0500 Received: from smtp2.it.da.ut.ee ([193.40.5.67]:60913 "EHLO smtp2.it.da.ut.ee" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755144AbeCHNoL (ORCPT ); Thu, 8 Mar 2018 08:44:11 -0500 Received: from math.ut.ee (unknown [IPv6:2001:bb8:2002:2400:5054:ff:fe3b:8db9]) by smtp2.it.da.ut.ee (Postfix) with ESMTP id 9ABB790055; Thu, 8 Mar 2018 15:44:09 +0200 (EET) Received: by math.ut.ee (Postfix, from userid 1014) id 8D7F6221E68; Thu, 8 Mar 2018 15:44:07 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by math.ut.ee (Postfix) with ESMTP id 878A5221E66; Thu, 8 Mar 2018 15:44:07 +0200 (EET) Date: Thu, 8 Mar 2018 15:44:07 +0200 (EET) From: Meelis Roos To: qla2xxx-upstream@qlogic.com, linux-scsi@vger.kernel.org Subject: [PATCH 1/3] qla2xxx: fix error message on User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 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 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, + "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__); }