]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/pcie/aer/aerdrv.c
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
[linux-2.6-omap-h63xx.git] / drivers / pci / pcie / aer / aerdrv.c
index 07c3bdb6edc2ad5b261f3877eed725466f4d895a..e390707661dde323e8beafc4bf96e651a843dd06 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/pcieport_if.h>
 
 #include "aerdrv.h"
+#include "../../pci.h"
 
 /*
  * Version Information
@@ -104,7 +105,7 @@ static irqreturn_t aer_irq(int irq, void *context)
        unsigned long flags;
        int pos;
 
-       pos = pci_find_aer_capability(pdev->port);
+       pos = pci_find_ext_capability(pdev->port, PCI_EXT_CAP_ID_ERR);
        /*
         * Must lock access to Root Error Status Reg, Root Error ID Reg,
         * and Root error producer/consumer index
@@ -219,8 +220,7 @@ static int __devinit aer_probe (struct pcie_device *dev,
 
        /* Alloc rpc data structure */
        if (!(rpc = aer_alloc_rpc(dev))) {
-               printk(KERN_DEBUG "%s: Alloc rpc fails on PCIE device[%s]\n",
-                       __func__, device->bus_id);
+               dev_printk(KERN_DEBUG, device, "alloc rpc failed\n");
                aer_remove(dev);
                return -ENOMEM;
        }
@@ -228,8 +228,7 @@ static int __devinit aer_probe (struct pcie_device *dev,
        /* Request IRQ ISR */
        if ((status = request_irq(dev->irq, aer_irq, IRQF_SHARED, "aerdrv",
                                dev))) {
-               printk(KERN_DEBUG "%s: Request ISR fails on PCIE device[%s]\n",
-                       __func__, device->bus_id);
+               dev_printk(KERN_DEBUG, device, "request IRQ failed\n");
                aer_remove(dev);
                return status;
        }
@@ -253,7 +252,7 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
        u32 status;
        int pos;
 
-       pos = pci_find_aer_capability(dev);
+       pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
 
        /* Disable Root's interrupt in response to error messages */
        pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, 0);
@@ -273,7 +272,7 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
         * to issue Configuration Requests to those devices.
         */
        msleep(200);
-       printk(KERN_DEBUG "Complete link reset at Root[%s]\n", dev->dev.bus_id);
+       dev_printk(KERN_DEBUG, &dev->dev, "Root Port link has been reset\n");
 
        /* Enable Root Port's interrupt in response to error messages */
        pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &status);
@@ -317,7 +316,7 @@ static void aer_error_resume(struct pci_dev *dev)
        pci_write_config_word(dev, pos + PCI_EXP_DEVSTA, reg16);
 
        /* Clean AER Root Error Status */
-       pos = pci_find_aer_capability(dev);
+       pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
        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)