tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ehci: fix error handling?
Hi all,
> attach always 'succeeds' in the sense that after attach has been called,
> detach will always be called. The detach routine should tear down
> everything that needs tearing down and not do things that will fail.
> Perhaps the init could simply be done before the attach routine gets the
> chance to fail?
Some drivers mark the progress through attach so that detach will work
correctly in all cases. Can we do the same here? For example, see
sc->sc_att_stage in:
https://nxr.netbsd.org/xref/src/sys/dev/ic/gem.c
and also how gem_partial_detach() is called when the attach fails part way
through.
Regards,
Julian
Home |
Main Index |
Thread Index |
Old Index