diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2010-04-15 00:21:27 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-05-11 15:01:38 -0400 |
commit | 89713422a768458a0d375f0c2f3586cd5ccde6a1 (patch) | |
tree | c446440123602cdb5320617ac7a8c2dbf514ff41 /Documentation/PCI | |
parent | 517cae3829ae8cc3033c24f60e64eb251b2f0d14 (diff) |
PCI: aerdrv: introduce default_downstream_reset_link
I noticed that when I inject a fatal error to an endpoint via
aer-inject, aer_root_reset() is called as reset_link for a
downstream port at upstream of the endpoint:
pcieport 0000:00:06.0: AER: Uncorrected (Fatal) error received: id=5401
:
pcieport 0000:52:02.0: Root Port link has been reset
It externally appears to be working, but internally issues some
accesses to PCI_ERR_ROOT_COMMAND/STATUS registers that is for
root port so not available on downstream port.
This patch introduces default_downstream_reset_link that is
a version of aer_root_reset() with no accesses to root port's
register. It is used for downstream ports that has no reset_link
function its specific.
This patch also updates related description in pcieaer-howto.txt.
Some minor fixes are included.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'Documentation/PCI')
-rw-r--r-- | Documentation/PCI/pcieaer-howto.txt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Documentation/PCI/pcieaer-howto.txt b/Documentation/PCI/pcieaer-howto.txt index 8c406a496799..26d3d945c3c2 100644 --- a/Documentation/PCI/pcieaer-howto.txt +++ b/Documentation/PCI/pcieaer-howto.txt | |||
@@ -13,7 +13,7 @@ Reporting (AER) driver and provides information on how to use it, as | |||
13 | well as how to enable the drivers of endpoint devices to conform with | 13 | well as how to enable the drivers of endpoint devices to conform with |
14 | PCI Express AER driver. | 14 | PCI Express AER driver. |
15 | 15 | ||
16 | 1.2 Copyright © Intel Corporation 2006. | 16 | 1.2 Copyright (C) Intel Corporation 2006. |
17 | 17 | ||
18 | 1.3 What is the PCI Express AER Driver? | 18 | 1.3 What is the PCI Express AER Driver? |
19 | 19 | ||
@@ -108,7 +108,7 @@ but the PCI Express link itself is fully functional. Fatal errors, on | |||
108 | the other hand, cause the link to be unreliable. | 108 | the other hand, cause the link to be unreliable. |
109 | 109 | ||
110 | When AER is enabled, a PCI Express device will automatically send an | 110 | When AER is enabled, a PCI Express device will automatically send an |
111 | error message to the PCIE root port above it when the device captures | 111 | error message to the PCIe root port above it when the device captures |
112 | an error. The Root Port, upon receiving an error reporting message, | 112 | an error. The Root Port, upon receiving an error reporting message, |
113 | internally processes and logs the error message in its PCI Express | 113 | internally processes and logs the error message in its PCI Express |
114 | capability structure. Error information being logged includes storing | 114 | capability structure. Error information being logged includes storing |
@@ -194,8 +194,9 @@ to reset link, AER port service driver is required to provide the | |||
194 | function to reset link. Firstly, kernel looks for if the upstream | 194 | function to reset link. Firstly, kernel looks for if the upstream |
195 | component has an aer driver. If it has, kernel uses the reset_link | 195 | component has an aer driver. If it has, kernel uses the reset_link |
196 | callback of the aer driver. If the upstream component has no aer driver | 196 | callback of the aer driver. If the upstream component has no aer driver |
197 | and the port is downstream port, we will use the aer driver of the | 197 | and the port is downstream port, we will perform a hot reset as the |
198 | root port who reports the AER error. As for upstream ports, | 198 | default by setting the Secondary Bus Reset bit of the Bridge Control |
199 | register associated with the downstream port. As for upstream ports, | ||
199 | they should provide their own aer service drivers with reset_link | 200 | they should provide their own aer service drivers with reset_link |
200 | function. If error_detected returns PCI_ERS_RESULT_CAN_RECOVER and | 201 | function. If error_detected returns PCI_ERS_RESULT_CAN_RECOVER and |
201 | reset_link returns PCI_ERS_RESULT_RECOVERED, the error handling goes | 202 | reset_link returns PCI_ERS_RESULT_RECOVERED, the error handling goes |
@@ -249,11 +250,11 @@ cleanup uncorrectable status register. Pls. refer to section 3.3. | |||
249 | 250 | ||
250 | 4. Software error injection | 251 | 4. Software error injection |
251 | 252 | ||
252 | Debugging PCIE AER error recovery code is quite difficult because it | 253 | Debugging PCIe AER error recovery code is quite difficult because it |
253 | is hard to trigger real hardware errors. Software based error | 254 | is hard to trigger real hardware errors. Software based error |
254 | injection can be used to fake various kinds of PCIE errors. | 255 | injection can be used to fake various kinds of PCIe errors. |
255 | 256 | ||
256 | First you should enable PCIE AER software error injection in kernel | 257 | First you should enable PCIe AER software error injection in kernel |
257 | configuration, that is, following item should be in your .config. | 258 | configuration, that is, following item should be in your .config. |
258 | 259 | ||
259 | CONFIG_PCIEAER_INJECT=y or CONFIG_PCIEAER_INJECT=m | 260 | CONFIG_PCIEAER_INJECT=y or CONFIG_PCIEAER_INJECT=m |