Subject: Re: Allowing ether_ifattach() to fail
To: John Hawkinson <jhawk@mit.edu>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-net
Date: 05/24/2000 11:29:47
John Hawkinson wrote:
> I'd like to allow ether_ifattach() to fail (and return failure).
> Careful examination of a bunch of drivers shows that they don't deal
> very well with the case of *_attach() failing.
I would like to see a change in the config machinery so that *_attach()
can fail, which would then stop the device from being accessible.
As it is each driver (where attach can fail) needs to have a flag indicating
if it is really working. Ideally, an attach should never fail, but unfortunately
that's now how the world works. A device can stop working at any time,
even during attach.
My proposed change is rather large. Each device driver needs to be modified,
but in a very simple way. Just change the return type to `int' and add a `return 0'.
--
-- Lennart