[PATCH 8/13]: PCI Err: Event delivery utility
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Jun 29 11:59:47 EST 2005
On Tue, 2005-06-28 at 18:59 -0500, Linas Vepstas wrote:
> pci-err-8-pci-err-event.patch
>
> [RFC]
>
> PCI Error distribution utility routine. This patch defines
> a utility routine that hasn't yet been discussed much on
> the mailing list; I've made this architecture independent
> with the idea that various architectures may find it handy,
> but its not directly required, or relevant, to the overall
> EEH error recovery mechanism. (It could be buried in
> arch-dependent code or implemented differently.)
>
> The current design has the arch dependent code detect
> a PCI bus error. That code uses this utility to generate
> a detection event. This event is then caught by PCI
> hotplug code, which drives the slot recovery. If the
> affected device drivers have recovery callbacks, these
> are used; all other devices are hotplugged.
>
> There are certainly other (simpler) ways to attach the
> arch-specific error detection code to the hot-plug mediated
> recovery code; this routine is rather left-over from
> earlier email discussions. Should this stay, or not?
Certainly needs to be in a separate .h at least ... Also, you have some
lifetime issues. You probably want to do a get() on pci_dev when you put
it in your struct and put() it after the notifier... Oh wait, you are
doing pci_dev_put() ... but no pci_dev_get() ... The later must be
missing from peh_send_failure_event().
I'd keep that in arch code for now.
Ben.
More information about the Linuxppc64-dev
mailing list