[PATCH/RFC] PCI Error Recovery
Linas Vepstas
linas at austin.ibm.com
Tue Mar 15 05:14:20 EST 2005
On Mon, Mar 14, 2005 at 09:33:03PM +0900, Hidetoshi Seto was heard to remark:
> Linas Vepstas wrote:
> >+enum pci_device_io_state {
>
> ... but I think it's of value to have the list of states.
> (Even it seems that the list what originally you want isn't "state list"
> but "event list".)
Sorry, you are right, I confused the concept of "state transition" with
the concept of "state", I will try to clarify the difference in the next
patch.
> would be realized by:
> event(STATE_CHANGED,ISOLATED) + event(TRY_RECOVER,*data)
> event(STATE_CHANGED,NORMAL)
> event(STATE_CHANGED,DEAD)
> I think the latter style is more generic.
Hmm, are you suggesting that there **shouldn't** be a callback
function in struct pci_driver, and that instead, all state changes
should be delivered as events? (i.e. by means of the notifier_chain
mechanism?) Hmm ... thats possible, I'd have to rearrange the code a
bit.
Is there a long-term philosphy for the Linux kernel on a question like
this? That is, when should changes add callbacks to structures,
as opposed to notifier-chain based events? The callback is a bit
simpler, and maybe a tiny bit faster, but its less flexible in the
long run (e.g. anyone can listen for the events, but only device
drivers can get callbacks). Comments, please?
--linas
More information about the Linuxppc64-dev
mailing list