]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
pci: implement "pci=noaer"
authorRandy Dunlap <randy.dunlap@oracle.com>
Fri, 5 Oct 2007 20:17:58 +0000 (13:17 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 22:03:17 +0000 (15:03 -0700)
For cases in which CONFIG_PCIEAER=y (such as distro kernels), allow users
to disable PCIE Advanced Error Reporting by using "pci=noaer" on the
kernel command line.

This can be used to work around hardware or (kernel) software problems.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/kernel-parameters.txt
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/pcie/aer/aerdrv.c

index a57c1f216b2154d352b6b3fc9b94a1f47d2cf0b1..3f0173f45019a99bfa0616e3a290c7feb7a100ad 100644 (file)
@@ -68,6 +68,7 @@ parameter is applicable:
        PARIDE  The ParIDE (parallel port IDE) subsystem is enabled.
        PARISC  The PA-RISC architecture is enabled.
        PCI     PCI bus support is enabled.
+       PCIE    PCI Express support is enabled.
        PCMCIA  The PCMCIA subsystem is enabled.
        PNP     Plug & Play support is enabled.
        PPC     PowerPC architecture is enabled.
@@ -1270,6 +1271,9 @@ and is between 256 and 4096 characters. It is defined in the file
                                Mechanism 1.
                conf2           [X86-32] Force use of PCI Configuration
                                Mechanism 2.
+               noaer           [PCIE] If the PCIEAER kernel config parameter is
+                               enabled, this kernel boot option can be used to
+                               disable the use of PCIE advanced error reporting.
                nommconf        [X86-32,X86_64] Disable use of MMCONFIG for PCI
                                Configuration
                nomsi           [MSI] If the PCI_MSI kernel config parameter is
index 19a64a36ecab6449c074d6797f296b55c18c8aba..2dd5c282fabe6a875ae9f6c55be6e9d0b57d6a90 100644 (file)
@@ -1586,6 +1586,8 @@ static int __devinit pci_setup(char *str)
                if (*str && (str = pcibios_setup(str)) && *str) {
                        if (!strcmp(str, "nomsi")) {
                                pci_no_msi();
+                       } else if (!strcmp(str, "noaer")) {
+                               pci_no_aer();
                        } else if (!strncmp(str, "cbiosize=", 9)) {
                                pci_cardbus_io_size = memparse(str + 9, &str);
                        } else if (!strncmp(str, "cbmemsize=", 10)) {
index 4c36e80f6d26b26f590a45bfa1551c53440d0b4a..5360d73d4941dd4ba8db16099d6163081f8f1bb9 100644 (file)
@@ -52,6 +52,12 @@ void pci_restore_msi_state(struct pci_dev *dev);
 static inline void pci_restore_msi_state(struct pci_dev *dev) {}
 #endif
 
+#ifdef CONFIG_PCIEAER
+void pci_no_aer(void);
+#else
+static inline void pci_no_aer(void) { }
+#endif
+
 static inline int pci_no_d1d2(struct pci_dev *dev)
 {
        unsigned int parent_dstates = 0;
index ad90a01b0dfc3c1ddd578ba677079ac0b3ebf5e9..7a62f7dd9009ab49a2deeb5d372fd45ceb881548 100644 (file)
@@ -81,6 +81,13 @@ static struct pcie_port_service_driver aerdriver = {
        .reset_link     = aer_root_reset,
 };
 
+static int pcie_aer_disable;
+
+void pci_no_aer(void)
+{
+       pcie_aer_disable = 1;   /* has priority over 'forceload' */
+}
+
 /**
  * aer_irq - Root Port's ISR
  * @irq: IRQ assigned to Root Port
@@ -327,6 +334,8 @@ static void aer_error_resume(struct pci_dev *dev)
  **/
 static int __init aer_service_init(void)
 {
+       if (pcie_aer_disable)
+               return -ENXIO;
        return pcie_port_service_register(&aerdriver);
 }