diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-06 17:09:19 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-14 16:27:38 -0400 |
commit | 9ff25e6b3eb0012297288dfa87930c7b62ef6ab1 (patch) | |
tree | d64dab9c589fc71d8a5322bd1c828018f5de61a7 | |
parent | 443b40ba21aa346388ddfb8fa7f2baee6b74e8ee (diff) |
PCI/AER: Remove aerdriver.nosourceid kernel parameter
The aerdriver.nosourceid kernel parameter was intended for working around
broken chipsets don't supply the source ID for AER events. We recently
added PCI_BUS_FLAGS_NO_AERSID, which can be set by quirks for the same
purpose.
Remove the aerdriver.nosourceid kernel parameter. For anything other than
debugging, asking users to find and use kernel parameters is a poor user
experience. Instead, we should add PCI_BUS_FLAGS_NO_AERSID quirks for any
hardware that needs it.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | Documentation/PCI/pcieaer-howto.txt | 4 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/Documentation/PCI/pcieaer-howto.txt b/Documentation/PCI/pcieaer-howto.txt index b4987c0bcb20..4956df36c59d 100644 --- a/Documentation/PCI/pcieaer-howto.txt +++ b/Documentation/PCI/pcieaer-howto.txt | |||
@@ -61,10 +61,6 @@ be initiated although firmwares have no _OSC support. To enable the | |||
61 | walkaround, pls. add aerdriver.forceload=y to kernel boot parameter line | 61 | walkaround, pls. add aerdriver.forceload=y to kernel boot parameter line |
62 | when booting kernel. Note that forceload=n by default. | 62 | when booting kernel. Note that forceload=n by default. |
63 | 63 | ||
64 | nosourceid, another parameter of type bool, can be used when broken | ||
65 | hardware (mostly chipsets) has root ports that cannot obtain the reporting | ||
66 | source ID. nosourceid=n by default. | ||
67 | |||
68 | 2.3 AER error output | 64 | 2.3 AER error output |
69 | When a PCI-E AER error is captured, an error message will be outputted to | 65 | When a PCI-E AER error is captured, an error message will be outputted to |
70 | console. If it's a correctable error, it is outputted as a warning. | 66 | console. If it's a correctable error, it is outputted as a warning. |
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 8f5e14cac600..f8a9b17da949 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
@@ -28,9 +28,7 @@ | |||
28 | #include "aerdrv.h" | 28 | #include "aerdrv.h" |
29 | 29 | ||
30 | static bool forceload; | 30 | static bool forceload; |
31 | static bool nosourceid; | ||
32 | module_param(forceload, bool, 0); | 31 | module_param(forceload, bool, 0); |
33 | module_param(nosourceid, bool, 0); | ||
34 | 32 | ||
35 | #define PCI_EXP_AER_FLAGS (PCI_EXP_DEVCTL_CERE | PCI_EXP_DEVCTL_NFERE | \ | 33 | #define PCI_EXP_AER_FLAGS (PCI_EXP_DEVCTL_CERE | PCI_EXP_DEVCTL_NFERE | \ |
36 | PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_URRE) | 34 | PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_URRE) |
@@ -132,8 +130,7 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info) | |||
132 | * When bus id is equal to 0, it might be a bad id | 130 | * When bus id is equal to 0, it might be a bad id |
133 | * reported by root port. | 131 | * reported by root port. |
134 | */ | 132 | */ |
135 | if (!nosourceid && | 133 | if ((PCI_BUS_NUM(e_info->id) != 0) && |
136 | (PCI_BUS_NUM(e_info->id) != 0) && | ||
137 | !(dev->bus->bus_flags & PCI_BUS_FLAGS_NO_AERSID)) { | 134 | !(dev->bus->bus_flags & PCI_BUS_FLAGS_NO_AERSID)) { |
138 | /* Device ID match? */ | 135 | /* Device ID match? */ |
139 | if (e_info->id == ((dev->bus->number << 8) | dev->devfn)) | 136 | if (e_info->id == ((dev->bus->number << 8) | dev->devfn)) |
@@ -146,11 +143,10 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info) | |||
146 | 143 | ||
147 | /* | 144 | /* |
148 | * When either | 145 | * When either |
149 | * 1) nosourceid==y; | 146 | * 1) bus id is equal to 0. Some ports might lose the bus |
150 | * 2) bus id is equal to 0. Some ports might lose the bus | ||
151 | * id of error source id; | 147 | * id of error source id; |
152 | * 3) bus flag PCI_BUS_FLAGS_NO_AERSID is set | 148 | * 2) bus flag PCI_BUS_FLAGS_NO_AERSID is set |
153 | * 4) There are multiple errors and prior ID comparing fails; | 149 | * 3) There are multiple errors and prior ID comparing fails; |
154 | * We check AER status registers to find possible reporter. | 150 | * We check AER status registers to find possible reporter. |
155 | */ | 151 | */ |
156 | if (atomic_read(&dev->enable_cnt) == 0) | 152 | if (atomic_read(&dev->enable_cnt) == 0) |