PCI Error Recovery API Proposal (updated)

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Apr 12 09:56:40 EST 2005

On Mon, 2005-04-11 at 11:25 -0700, long wrote:

> Consider a system without FW support for link/bus reset and is using a
> full native OS solution.  In this situation a port bus driver or a PCI
> bridge driver would need to execute the bus/link reset when we get an
> error from a device.  Therefore an interface is required to request a
> bus/link reset from a bus driver.   Specifically, in PCI Express the
> port bus driver owns execution of a downstream link reset for a link
> attached to a root port or downstream switch port.  The port bus driver
> can perform a link reset by setting the SBR bit in the configuration
> registers.  This results in a down stream hot-reset.
> Is there some method the current interface supplies to support a full
> native OS solution that I am not seeing?  The error handling interfaces,
> in my view, should be flexible enough to support a full native OS
> solution with no FW assistance.

Oh, and I'm not saying the contrary. But again, the API I propose define
the various step that "happen" to a device. Asking a port driver to do a
link reset doesn't fit in that category. On the same way, the API
doesn't define a way to ask the port driver or whatever to do a full
card reset. It only defines a way for a card to request it, and to be
notified that it happened.

The actual code doing things like card resets, slot isolation, link
reset, etc... is part of the implementation specific core. The ppc64 one
will use the firmware, I expect your "generic" PCI Express
implementation to do it differently. In your case, you have already
defined a specific model for port drivers, which can be added a function
to request a link reset, that your PCI Express error recovery port will
then call.

I would appreciate if other people following this discussion could give
their opinion here, just to make sure I'm not following the wrong track.
But it seems to me that issuing the request for a link reset doesn't fit
in the leaf driver recovery API, but rather in the private API that you
will define between the PCI Express error recovery core and the PCI
Express port drivers...


More information about the Linuxppc64-dev mailing list