Re: [PATCH/RFC] I/O-check interface for driver's error handling

Benjamin Herrenschmidt
2005-03-02T22:43:48Z

> One issue with that is how to notify drivers that they need to make this call.
> In may cases, DMA completion will be signalled by an interrupt, but if the
> DMA failed, that interrupt may never happen, which means the call to
> pci_unmap or the above function from the interrupt handler may never occur.
>
> Some I/O errors are by nature asynchronous and unpredictable, so I think we
> need a separate thread and callback interface to deal with errors where the
> beginning of the transaction and the end of the transaction occur in
> different contexts, in addition to the PIO transaction interface already
> proposed.

Yup. As I wrote already. We need a new callback in pci_driver, that's
the cleanest way. It would take an "event" argument plus some still to
be defined flags to inform the driver about platform capabilities.

The driver based on the result code can then request a slot reset if
the platform supports it, or just try to recover, or just giveup.

Another callback would come once the slot has been reset & reconfigure,
etc...

I'm going to write something down real soon now (after I had breakfast
hopefully :)

Ben.