PCI: aerdrv: introduce default_downstream_reset_link
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Thu, 15 Apr 2010 04:21:27 +0000 (13:21 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 11 May 2010 19:01:38 +0000 (12:01 -0700)
commit89713422a768458a0d375f0c2f3586cd5ccde6a1
treec446440123602cdb5320617ac7a8c2dbf514ff41
parent517cae3829ae8cc3033c24f60e64eb251b2f0d14
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>
Documentation/PCI/pcieaer-howto.txt
drivers/pci/pcie/aer/aerdrv.c
drivers/pci/pcie/aer/aerdrv.h
drivers/pci/pcie/aer/aerdrv_core.c