From patchwork Thu Dec 3 17:28:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Patterson X-Patchwork-Id: 64581 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB3HSRBG008291 for ; Thu, 3 Dec 2009 17:28:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513AbZLCR2a (ORCPT ); Thu, 3 Dec 2009 12:28:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755486AbZLCR2a (ORCPT ); Thu, 3 Dec 2009 12:28:30 -0500 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:42614 "EHLO g5t0007.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754513AbZLCR23 (ORCPT ); Thu, 3 Dec 2009 12:28:29 -0500 Received: from g5t0030.atlanta.hp.com (g5t0030.atlanta.hp.com [16.228.8.142]) by g5t0007.atlanta.hp.com (Postfix) with ESMTP id 3DD2114143; Thu, 3 Dec 2009 17:28:36 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g5t0030.atlanta.hp.com (Postfix) with ESMTP id 0C9D4140F4; Thu, 3 Dec 2009 17:28:21 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id E6242CF0017; Thu, 3 Dec 2009 10:28:20 -0700 (MST) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XSZLkUQ9d9ub; Thu, 3 Dec 2009 10:28:20 -0700 (MST) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id D1D35CF0007; Thu, 3 Dec 2009 10:28:20 -0700 (MST) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id BD1FA26146; Thu, 3 Dec 2009 10:28:20 -0700 (MST) Subject: [PATCH 1/2] PCI: unconditionally clear AER uncorr status register during cleanup To: linux-pci@vger.kernel.org From: Andrew Patterson Cc: prarit@redhat.com, jbarnes@virtuousgeek.org Date: Thu, 03 Dec 2009 10:28:20 -0700 Message-ID: <20091203172820.24020.95625.stgit@bob.kio> In-Reply-To: <20091203172815.24020.25978.stgit@bob.kio> References: <20091203172815.24020.25978.stgit@bob.kio> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 5391a9b..271d30c 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -84,19 +84,15 @@ EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting); int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) { int pos; - u32 status, mask; + u32 status; pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); if (!pos) return -EIO; pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, &status); - pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, &mask); - if (dev->error_state == pci_channel_io_normal) - status &= ~mask; /* Clear corresponding nonfatal bits */ - else - status &= mask; /* Clear corresponding fatal bits */ - pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status); + if (status) + pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status); return 0; }