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

From: Linas Vepstas <linas_at_austin.ibm.com>
Date: 2005-03-03 07:02:16
On Wed, Mar 02, 2005 at 09:27:27AM +1100, Benjamin Herrenschmidt was heard to remark:
> On Tue, 2005-03-01 at 12:33 -0600, Linas Vepstas wrote:
> 
> > The current proposal (and prototype) has a "master recovery thread"
> > to handle the coordinated reset of the pci controller.  This master
> > recovery thyread makes three calls in struct pci_driver:
> > 
> >    void (*frozen) (struct pci_dev *);  /* called when dev is first frozen */
> >    void (*thawed) (struct pci_dev *);  /* called after card is reset */
> >    void (*perm_failure) (struct pci_dev *);  /* called if card is dead */
> 
> See my other emails. I think only one callback is enough, and I think we
> need more parameters.

That's a style issue.  Propose an API, I'll code it.   We can have
the master recovery thread be a state machine, and so every device
driver gets notified of state changes:

typedef enum pci_bus_state {
     DEVICE_IO_FROZEN=1,
     DEVICE_IO_THAWED,
     DEVICE_PERM_FAILURE,
};

struct pci_driver {
   .... 
   void (*io_state_change) (struct pci_dev *dev, pci_bus_state);
};

would that work?

--linas
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Mar 2 15:03:37 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:36 EST