From owner-freebsd-current Thu Dec 9 2:33:15 1999 Delivered-To: freebsd-current@freebsd.org Received: from gatekeeper.radio-do.de (gatekeeper.Radio-do.de [193.101.164.1]) by hub.freebsd.org (Postfix) with ESMTP id 203A61531C; Thu, 9 Dec 1999 02:33:12 -0800 (PST) (envelope-from fn@gatekeeper.radio-do.de) Received: from trinity.radio-do.de (trinity.Radio-do.de [193.101.164.3]) by gatekeeper.radio-do.de (Postfix) with ESMTP id 36A82A124; Thu, 9 Dec 1999 11:33:09 +0100 (MET) Received: (from fn@localhost) by trinity.radio-do.de (8.9.3/8.9.3) id LAA29041; Thu, 9 Dec 1999 11:33:09 +0100 (CET) (envelope-from fn@gatekeeper.radio-do.de) Date: Thu, 9 Dec 1999 11:33:09 +0100 From: Frank Nobis To: Seigo Tanimura Cc: caa@columbus.rr.com, msmith@FreeBSD.ORG, schuerge@wjpserver.CS.Uni-SB.DE, freebsd-current@FreeBSD.ORG Subject: Re: AWE64 problems Message-ID: <19991209113308.A28987@radio-do.de> References: <19991208000746.A1622@midgard.dhs.org> <199912080513.VAA07525@mass.cdrom.com> <19991208085415.A534@midgard.dhs.org> <14415.8493.971538.78435L@rina.r.dl.itc.u-tokyo.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <14415.8493.971538.78435L@rina.r.dl.itc.u-tokyo.ac.jp> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Dec 09, 1999 at 12:25:33PM +0900, Seigo Tanimura wrote: > [snipped some part] > >> > > On Tue, 7 Dec 1999 23:00:02 +0100 (MET), > >> > > Thomas Schuerger said: > >> > > > >> > > >> --- sbc.c.orig Mon Dec 6 19:26:31 1999 > >> > > >> +++ sbc.c Tue Dec 7 22:15:25 1999 > >> > > >> @@ -110,7 +110,7 @@ > >> > > >> if (error) > >> > > >> return error; > >> > > >> else > >> > > >> - return -100; > >> > > >> + return -1; > >> > > >> } > >> > > >> > >> > > >> static int > > On Wed, 8 Dec 1999 08:54:15 -0500, > "Charles Anderson" said: > > Charles> So then what is -1 and why does it work when -100 doesn't? (I tried it) > > > sys/kern/subr_bus.c:device_probe_child() receives the value returned > by DEVICE_PROBE(child dev). If the value is zero, no further probes > occur. The device then gets attached in sys/kern/subr_bus.c: > device_probe_and_attach(). > Ahh, now it makes sense to me. In case of an unknown device, error = ISA_PNP_PROBE(...) set error to a value larger than 0. In case of a successfull match error is set to 0. IMHO the correct probe should be: sbc_probe(device_t dev) { int error; /* Check pnp ids */ error = ISA_PNP_PROBE(device_get_parent(dev), dev, sbc_ids); if (error >= 0) return error; else return -100; } Is it possible that error gets a value below 0 ? In that case the probe should arrange for this case. Any comments ? Frank -- ~/.signature not found: wellknown error 42 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message