From owner-freebsd-hackers Fri Apr 10 13:32:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA03419 for freebsd-hackers-outgoing; Fri, 10 Apr 1998 13:32:02 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id NAA03306 for ; Fri, 10 Apr 1998 13:31:29 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id VAA08849; Fri, 10 Apr 1998 21:00:33 +0200 From: Luigi Rizzo Message-Id: <199804101900.VAA08849@labinfo.iet.unipi.it> Subject: Re: PnP driver question To: archie@whistle.com (Archie Cobbs) Date: Fri, 10 Apr 1998 21:00:32 +0200 (MET DST) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <199804101830.LAA05807@bubba.whistle.com> from "Archie Cobbs" at Apr 10, 98 11:30:00 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > - 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