From patchwork Tue May 28 18:48:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Betty Dall X-Patchwork-Id: 2626091 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E54BB3FDBC for ; Tue, 28 May 2013 18:53:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753516Ab3E1Sxk (ORCPT ); Tue, 28 May 2013 14:53:40 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:45177 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753426Ab3E1Sxh (ORCPT ); Tue, 28 May 2013 14:53:37 -0400 Received: from g4t0018.houston.hp.com (g4t0018.houston.hp.com [16.234.32.27]) by g4t0017.houston.hp.com (Postfix) with ESMTP id 4B354384BF; Tue, 28 May 2013 18:53:37 +0000 (UTC) Received: from linux1.fc.hp.com (linux1.fc.hp.com [16.71.12.34]) by g4t0018.houston.hp.com (Postfix) with ESMTP id EA84C10569; Tue, 28 May 2013 18:53:36 +0000 (UTC) From: Betty Dall To: rjw@sisk.pl, bhelgaas@google.com Cc: ying.huang@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Betty Dall Subject: [PATCH 2/3] ACPI/APEI: Force fatal AER severity when bus has been reset Date: Tue, 28 May 2013 12:48:48 -0600 Message-Id: <1369766929-4386-3-git-send-email-betty.dall@hp.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1369766929-4386-1-git-send-email-betty.dall@hp.com> References: <1369766929-4386-1-git-send-email-betty.dall@hp.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The CPER error record has a reset bit that indicates that the platform has reset the bus. The reset bit can be set for any severity error including recoverable. From the AER code path's perspective, any error is fatal if the bus has been reset. This patch upgrades the severity of the AER recovery to AER_FATAL whenever the CPER error record indicates that the bus has been reset. Signed-off-by: Betty Dall --- drivers/acpi/apei/ghes.c | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index d668a8a..4a42afc 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -451,7 +451,26 @@ static void ghes_do_proc(struct ghes *ghes, int aer_severity; devfn = PCI_DEVFN(pcie_err->device_id.device, pcie_err->device_id.function); - aer_severity = cper_severity_to_aer(sev); + /* + * Some Firmware First implementations + * put the device in SBR to contain + * the error. This is indicated by the + * CPER Section Decriptor Flags reset + * bit which means the component must + * be re-initialized or re-enabled + * prior to use. Promoting the AER + * serverity to FATAL will cause the + * AER code to link_reset and allow + * drivers to reprogram their cards. + */ + if (gdata->flags & CPER_SEC_RESET) + aer_severity = cper_severity_to_aer( + CPER_SEV_FATAL); + else + aer_severity = + cper_severity_to_aer(sev); + + aer_recover_queue(pcie_err->device_id.segment, pcie_err->device_id.bus, devfn, aer_severity);