diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2007-10-05 16:17:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 18:03:17 -0400 |
commit | 7f785763660e75c9eddaddea3d618696af4ae3a2 (patch) | |
tree | 4538775b2b0f05d77509dd2b6b91ba9e6429154c | |
parent | fd6e732186ab522c812ab19c2c5e5befb8ec8115 (diff) |
pci: implement "pci=noaer"
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>
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
-rw-r--r-- | drivers/pci/pci.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci.h | 6 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.c | 9 |
4 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index a57c1f216b2..3f0173f4501 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -68,6 +68,7 @@ parameter is applicable: | |||
68 | PARIDE The ParIDE (parallel port IDE) subsystem is enabled. | 68 | PARIDE The ParIDE (parallel port IDE) subsystem is enabled. |
69 | PARISC The PA-RISC architecture is enabled. | 69 | PARISC The PA-RISC architecture is enabled. |
70 | PCI PCI bus support is enabled. | 70 | PCI PCI bus support is enabled. |
71 | PCIE PCI Express support is enabled. | ||
71 | PCMCIA The PCMCIA subsystem is enabled. | 72 | PCMCIA The PCMCIA subsystem is enabled. |
72 | PNP Plug & Play support is enabled. | 73 | PNP Plug & Play support is enabled. |
73 | PPC PowerPC architecture is enabled. | 74 | PPC PowerPC architecture is enabled. |
@@ -1270,6 +1271,9 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1270 | Mechanism 1. | 1271 | Mechanism 1. |
1271 | conf2 [X86-32] Force use of PCI Configuration | 1272 | conf2 [X86-32] Force use of PCI Configuration |
1272 | Mechanism 2. | 1273 | Mechanism 2. |
1274 | noaer [PCIE] If the PCIEAER kernel config parameter is | ||
1275 | enabled, this kernel boot option can be used to | ||
1276 | disable the use of PCIE advanced error reporting. | ||
1273 | nommconf [X86-32,X86_64] Disable use of MMCONFIG for PCI | 1277 | nommconf [X86-32,X86_64] Disable use of MMCONFIG for PCI |
1274 | Configuration | 1278 | Configuration |
1275 | nomsi [MSI] If the PCI_MSI kernel config parameter is | 1279 | nomsi [MSI] If the PCI_MSI kernel config parameter is |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 19a64a36eca..2dd5c282fab 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1586,6 +1586,8 @@ static int __devinit pci_setup(char *str) | |||
1586 | if (*str && (str = pcibios_setup(str)) && *str) { | 1586 | if (*str && (str = pcibios_setup(str)) && *str) { |
1587 | if (!strcmp(str, "nomsi")) { | 1587 | if (!strcmp(str, "nomsi")) { |
1588 | pci_no_msi(); | 1588 | pci_no_msi(); |
1589 | } else if (!strcmp(str, "noaer")) { | ||
1590 | pci_no_aer(); | ||
1589 | } else if (!strncmp(str, "cbiosize=", 9)) { | 1591 | } else if (!strncmp(str, "cbiosize=", 9)) { |
1590 | pci_cardbus_io_size = memparse(str + 9, &str); | 1592 | pci_cardbus_io_size = memparse(str + 9, &str); |
1591 | } else if (!strncmp(str, "cbmemsize=", 10)) { | 1593 | } else if (!strncmp(str, "cbmemsize=", 10)) { |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 4c36e80f6d2..5360d73d494 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -52,6 +52,12 @@ void pci_restore_msi_state(struct pci_dev *dev); | |||
52 | static inline void pci_restore_msi_state(struct pci_dev *dev) {} | 52 | static inline void pci_restore_msi_state(struct pci_dev *dev) {} |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #ifdef CONFIG_PCIEAER | ||
56 | void pci_no_aer(void); | ||
57 | #else | ||
58 | static inline void pci_no_aer(void) { } | ||
59 | #endif | ||
60 | |||
55 | static inline int pci_no_d1d2(struct pci_dev *dev) | 61 | static inline int pci_no_d1d2(struct pci_dev *dev) |
56 | { | 62 | { |
57 | unsigned int parent_dstates = 0; | 63 | unsigned int parent_dstates = 0; |
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index ad90a01b0df..7a62f7dd900 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c | |||
@@ -81,6 +81,13 @@ static struct pcie_port_service_driver aerdriver = { | |||
81 | .reset_link = aer_root_reset, | 81 | .reset_link = aer_root_reset, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static int pcie_aer_disable; | ||
85 | |||
86 | void pci_no_aer(void) | ||
87 | { | ||
88 | pcie_aer_disable = 1; /* has priority over 'forceload' */ | ||
89 | } | ||
90 | |||
84 | /** | 91 | /** |
85 | * aer_irq - Root Port's ISR | 92 | * aer_irq - Root Port's ISR |
86 | * @irq: IRQ assigned to Root Port | 93 | * @irq: IRQ assigned to Root Port |
@@ -327,6 +334,8 @@ static void aer_error_resume(struct pci_dev *dev) | |||
327 | **/ | 334 | **/ |
328 | static int __init aer_service_init(void) | 335 | static int __init aer_service_init(void) |
329 | { | 336 | { |
337 | if (pcie_aer_disable) | ||
338 | return -ENXIO; | ||
330 | return pcie_port_service_register(&aerdriver); | 339 | return pcie_port_service_register(&aerdriver); |
331 | } | 340 | } |
332 | 341 | ||