Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f0dce411930d16a678173e534594bca160f5eaff
Commit:     f0dce411930d16a678173e534594bca160f5eaff
Parent:     65b3bc358a3195ebe459761a248cf33a61539947
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Wed Jun 6 11:50:34 2007 +0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Wed Jul 11 16:02:08 2007 -0700

    PCI aer: add pci_cleanup_aer_correct_aer_status
    
    Function to clear bogus correctable errors. Analog to 
pci_aer_uncorrect_are_status.
    The Marvell chips seem to start out with a bogus value that needs to be
    cleared.
    
    Yanmin ported it to 2.6.22-rc4 by fixing a fuzz patch applying info.
    
    Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
    Acked-by: Zhang Yanmin <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/pci/pcie/aer/aerdrv_core.c |   16 ++++++++++++++++
 include/linux/aer.h                |    2 ++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/pcie/aer/aerdrv_core.c 
b/drivers/pci/pcie/aer/aerdrv_core.c
index fef159a..92a8469 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -117,6 +117,21 @@ int pci_cleanup_aer_uncorrect_error_status(struct pci_dev 
*dev)
        return 0;
 }
 
+int pci_cleanup_aer_correct_error_status(struct pci_dev *dev)
+{
+       int pos;
+       u32 status;
+
+       pos = pci_find_aer_capability(dev);
+       if (!pos)
+               return -EIO;
+
+       pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS, &status);
+       pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, status);
+
+       return 0;
+}
+
 static int find_device_iter(struct device *device, void *data)
 {
        struct pci_dev *dev;
@@ -741,4 +756,5 @@ EXPORT_SYMBOL_GPL(pci_find_aer_capability);
 EXPORT_SYMBOL_GPL(pci_enable_pcie_error_reporting);
 EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting);
 EXPORT_SYMBOL_GPL(pci_cleanup_aer_uncorrect_error_status);
+EXPORT_SYMBOL_GPL(pci_cleanup_aer_correct_error_status);
 
diff --git a/include/linux/aer.h b/include/linux/aer.h
index 64aacae..5096562 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -13,11 +13,13 @@ extern int pci_enable_pcie_error_reporting(struct pci_dev 
*dev);
 extern int pci_find_aer_capability(struct pci_dev *dev);
 extern int pci_disable_pcie_error_reporting(struct pci_dev *dev);
 extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
+extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev);
 #else
 #define pci_enable_pcie_error_reporting(dev)           (-EINVAL)
 #define pci_find_aer_capability(dev)                   (0)
 #define pci_disable_pcie_error_reporting(dev)          (-EINVAL)
 #define pci_cleanup_aer_uncorrect_error_status(dev)    (-EINVAL)
+#define pci_cleanup_aer_correct_error_status(dev)      (-EINVAL)
 #endif
 
 #endif //_AER_H_
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to