Subject: Re: CVS commit: syssrc
To: Frank van der Linden <fvdl@wasabisystems.com>
From: Lennart Augustsson <lennart@mail.augustsson.net>
List: port-i386
Date: 12/20/2000 10:13:51
Frank van der Linden wrote:

> On Wed, Dec 20, 2000 at 09:54:06AM -0500, jchacon@genuity.net wrote:
> > There's 2 ways to really look at this:
> >
> > 1. wssattach() looks at already assigned irq's and doesn't try to attach if
> >    it's irq is taken. (Ok, yuck..violates some abstraction and gets very bad
> >    very quick).
> >
> > 2. Have isa_intr_establish return NULL on conflict cases and all drivers that
> >    use it start checking return values. (Not horrible, but would require some
> >    fairly wide code changes).
>
> 2) is the best way. I've always considered isa_intr_establish' behaviour
> of "oh my god, I can't get an irq, let's panic" rather suboptimal.
>
> I vaguely remember looking into this, and another problem is that
> a driver's attach function returns void, and thus errors can not
> be signaled. But I think it's ok for them to just return (some drivers
> do this already) on some failure.

Yes, we should change the attach routines to return a value to indicate
failure.  Many drivers need it.  But in the mean time, it's all right to
just print some message and return.

    -- Lennart