Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 1998 21:00:32 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        archie@whistle.com (Archie Cobbs)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: PnP driver question
Message-ID:  <199804101900.VAA08849@labinfo.iet.unipi.it>
In-Reply-To: <199804101830.LAA05807@bubba.whistle.com> from "Archie Cobbs" at Apr 10, 98 11:30:00 am

next in thread | previous in thread | raw e-mail | index | archive | help
> >   - the attach routine does all the initialization. Unfortunately
> >     there is no check on the return code from the isa attach routine,
> >     so you cannot report up if the attach fails...
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> This is precisely the problem. 

The same thing was discussed in july (look from a thread in -hackers
titled "snd driver attach routine" around july 14th.)

>From what i remember (and the emails i archived):

In a perfect world, the attach routine should return a failure
code. The caller could then free resources, etc. and make them
available for the rest of the system.  However, at the moment our
code does not do anything of the above, and the driver knows what
to do incase of a failure, (e.g.  free resources, and mark the open
routine for the device to fail).  So, until there is a better
resource management structure (I am not saying it is useful), there
is no point in making the attach return a failure, since it would
not be handled. So it is still reasonable to let the driver handle
the failure, even if the caller is not notified.

	cheers
	luigi
-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804101900.VAA08849>