From patchwork Thu Nov 20 00:04:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 412547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 1E606140170; Thu, 20 Nov 2014 11:04:59 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XrFEx-00011i-Dr; Thu, 20 Nov 2014 00:04:51 +0000 Received: from mail-ob0-f170.google.com ([209.85.214.170]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XrFEp-00010J-Lv for kernel-team@lists.ubuntu.com; Thu, 20 Nov 2014 00:04:43 +0000 Received: by mail-ob0-f170.google.com with SMTP id wp18so1403094obc.15 for ; Wed, 19 Nov 2014 16:04:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=BYQFPZM8GRzXjBPASQn8PVtezwbOt/wUoRf+P3ZgSfk=; b=g+CZV5ja1qoo5I/WfENsm8xNfp89O7sx3MTkOjZ9z7jMD1rhnVmiiludy+Z1aZXDyo XbH9c2fOwY9WBm70arY4eFRLvOdEGahOK9Yy6of765wBZhrvi0HdcXQXKRt4jrAUgxc4 kiqtOGr7oXDxFqa+y6Ioo4kOqahg7x+2olocGj1zbBhMKHoArUDSmqdgyL2KMs16ueFA hUAmwfWiwYRNJbCl/rGQE6IJoqPxlTkglejrbBv6Y/NjruGtjQAQunMWqyN9oduy5pdU ubJq6ZDu2QohvdWUxiqESgIWn26dRA5N9C6WXzXej7pT1MUzH8i9PgzYpxoyLK1R85pc AGeg== X-Gm-Message-State: ALoCoQnalSDWGeko6jV8E1hFR74M49YR3BifCAhjidDL0yPwlaMvSTYGzM5gLI5iHB9B9/Yzimup X-Received: by 10.182.87.37 with SMTP id u5mr22154745obz.38.1416441882994; Wed, 19 Nov 2014 16:04:42 -0800 (PST) Received: from localhost.localdomain (rrcs-67-79-14-250.sw.biz.rr.com. [67.79.14.250]) by mx.google.com with ESMTPSA id e18sm329851oih.3.2014.11.19.16.04.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Nov 2014 16:04:42 -0800 (PST) From: tim.gardner@canonical.com To: kernel-team@lists.ubuntu.com Subject: [PATCH Utopic SRU] ipr: don't log error messages when applications issues illegal requests Date: Wed, 19 Nov 2014 18:04:38 -0600 Message-Id: <1416441878-9491-1-git-send-email-tim.gardner@canonical.com> X-Mailer: git-send-email 2.1.3 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: "wenxiong@linux.vnet.ibm.com" BugLink: http://bugs.launchpad.net/bugs/1392152 Failing Device information are logged when IOA firmware detected these illegal request such as IOA firmware doesn't support inquiry with page code 2. The patch fixes the issue. Signed-off-by: Brian King Tested-by: Wen Xiong Signed-off-by: Christoph Hellwig (cherry picked from commit 3185ea63907cb281cfdc5aa29aa2d855826ad16a) Signed-off-by: Tim Gardner Acked-by: Andy Whitcroft --- drivers/scsi/ipr.c | 10 ++++++++++ drivers/scsi/ipr.h | 1 + 2 files changed, 11 insertions(+) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 924b0ba..2a9578c 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -2440,6 +2440,7 @@ static void ipr_handle_log_data(struct ipr_ioa_cfg *ioa_cfg, { u32 ioasc; int error_index; + struct ipr_hostrcb_type_21_error *error; if (hostrcb->hcam.notify_type != IPR_HOST_RCB_NOTIF_TYPE_ERROR_LOG_ENTRY) return; @@ -2464,6 +2465,15 @@ static void ipr_handle_log_data(struct ipr_ioa_cfg *ioa_cfg, if (!ipr_error_table[error_index].log_hcam) return; + if (ioasc == IPR_IOASC_HW_CMD_FAILED && + hostrcb->hcam.overlay_id == IPR_HOST_RCB_OVERLAY_ID_21) { + error = &hostrcb->hcam.u.error64.u.type_21_error; + + if (((be32_to_cpu(error->sense_data[0]) & 0x0000ff00) >> 8) == ILLEGAL_REQUEST && + ioa_cfg->log_level <= IPR_DEFAULT_LOG_LEVEL) + return; + } + ipr_hcam_err(hostrcb, "%s\n", ipr_error_table[error_index].error); /* Set indication we have logged an error */ diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index 31ed126..8f8960d0 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h @@ -130,6 +130,7 @@ #define IPR_IOASC_HW_DEV_BUS_STATUS 0x04448500 #define IPR_IOASC_IOASC_MASK 0xFFFFFF00 #define IPR_IOASC_SCSI_STATUS_MASK 0x000000FF +#define IPR_IOASC_HW_CMD_FAILEd 0x046E0000 #define IPR_IOASC_IR_INVALID_REQ_TYPE_OR_PKT 0x05240000 #define IPR_IOASC_IR_RESOURCE_HANDLE 0x05250000 #define IPR_IOASC_IR_NO_CMDS_TO_2ND_IOA 0x05258100