From patchwork Wed Aug 6 08:32:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gong X-Patchwork-Id: 4684461 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AA7A19F373 for ; Wed, 6 Aug 2014 09:04:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F23BF2013A for ; Wed, 6 Aug 2014 09:04:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1131A20125 for ; Wed, 6 Aug 2014 09:04:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753307AbaHFJEk (ORCPT ); Wed, 6 Aug 2014 05:04:40 -0400 Received: from mga11.intel.com ([192.55.52.93]:52491 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753262AbaHFJEj (ORCPT ); Wed, 6 Aug 2014 05:04:39 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 06 Aug 2014 02:04:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,811,1400050800"; d="scan'208";a="580747835" Received: from gchen-sby.bj.intel.com (HELO localhost) ([10.238.158.82]) by fmsmga002.fm.intel.com with ESMTP; 06 Aug 2014 02:04:36 -0700 From: "Chen, Gong" To: bhelgaas@google.com, rdunlap@infradead.org, bp@alien8.de, tony.luck@intel.com Cc: linux-pci@vger.kernel.org, "Chen, Gong" Subject: [PATCH 2/5] PCI-e, AER: Replenish missed AER status bits for AER driver Date: Wed, 6 Aug 2014 04:32:41 -0400 Message-Id: <1407313964-20794-2-git-send-email-gong.chen@linux.intel.com> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1407313964-20794-1-git-send-email-gong.chen@linux.intel.com> References: <1407313964-20794-1-git-send-email-gong.chen@linux.intel.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 6c2b374d is commited, the capability of PCI-e AER has changed a lot. This patch adds all missed CE/UC error bits existed in PCI-e SPEC r3.0. Meanwhile, adjust the code format to make it simpler to read/maintain. Signed-off-by: Chen, Gong --- drivers/pci/pcie/aer/aerdrv_errprint.c | 60 ++++++++++++++-------------------- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index 35d06e1..5c4f7e2 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c @@ -75,44 +75,34 @@ static const char *aer_error_layer[] = { }; static const char *aer_correctable_error_string[] = { - "Receiver Error", /* Bit Position 0 */ - NULL, - NULL, - NULL, - NULL, - NULL, - "Bad TLP", /* Bit Position 6 */ - "Bad DLLP", /* Bit Position 7 */ - "RELAY_NUM Rollover", /* Bit Position 8 */ - NULL, - NULL, - NULL, - "Replay Timer Timeout", /* Bit Position 12 */ - "Advisory Non-Fatal", /* Bit Position 13 */ + [0] = "Receiver Error", + [6] = "Bad TLP", + [7] = "Bad DLLP", + [8] = "RELAY_NUM Rollover", + [12] = "Replay Timer Timeout", + [13] = "Advisory Non-Fatal Error", + [14] = "Corrected Internal Error", + [15] = "Header Log Overflow", }; static const char *aer_uncorrectable_error_string[] = { - NULL, - NULL, - NULL, - NULL, - "Data Link Protocol", /* Bit Position 4 */ - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - "Poisoned TLP", /* Bit Position 12 */ - "Flow Control Protocol", /* Bit Position 13 */ - "Completion Timeout", /* Bit Position 14 */ - "Completer Abort", /* Bit Position 15 */ - "Unexpected Completion", /* Bit Position 16 */ - "Receiver Overflow", /* Bit Position 17 */ - "Malformed TLP", /* Bit Position 18 */ - "ECRC", /* Bit Position 19 */ - "Unsupported Request", /* Bit Position 20 */ + [0] = "Undefined", + [4] = "Data Link Protocol Error", + [5] = "Surprise Down Error", + [12] = "Poisoned TLP", + [13] = "Flow Control Protocol Error", + [14] = "Completion Timeout", + [15] = "Completer Abort", + [16] = "Unexpected Completion", + [17] = "Receiver Overflow", + [18] = "Malformed TLP", + [19] = "ECRC Error", + [20] = "Unsupported Request Error", + [21] = "ACS Violation", + [22] = "Uncorrectable Internal Error", + [23] = "MC Blocked TLP", + [24] = "AtomicOp Egress Blocked", + [25] = "TLP Prefix Blocked Error", }; static const char *aer_agent_string[] = {