From owner-freebsd-current@FreeBSD.ORG Sun Jul 17 04:18:12 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D55516A484; Sun, 17 Jul 2005 04:18:12 +0000 (GMT) (envelope-from nate@root.org) Received: from mta1.srv.hcvlny.cv.net (mta1.srv.hcvlny.cv.net [167.206.4.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4469843D4C; Sun, 17 Jul 2005 04:18:11 +0000 (GMT) (envelope-from nate@root.org) Received: from [192.168.1.107] (ool-44c2c69b.dyn.optonline.net [68.194.198.155]) by mta1.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-2.06 (built May 11 2005)) with ESMTP id <0IJR00GKN7XOWI04@mta1.srv.hcvlny.cv.net>; Sun, 17 Jul 2005 00:17:48 -0400 (EDT) Date: Sat, 16 Jul 2005 21:09:41 -0700 From: Nate Lawson In-reply-to: <20050716.131701.124866666.imp@bsdimp.com> To: "M. Warner Losh" Message-id: <42D9DA05.1020806@root.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en References: <20050716.113059.82101301.imp@bsdimp.com> <4.3.2.7.2.20050716124022.01f08460@mail.qconline.com> <20050716.125824.48530425.imp@bsdimp.com> <20050716.131701.124866666.imp@bsdimp.com> User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050416) Cc: freebsd-current@freebsd.org, harrycoin@qconline.com Subject: Re: mss.c pcm fix to ' attach returned 6 ' load failure for v5.x acpi and up X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jul 2005 04:18:13 -0000 M. Warner Losh wrote: > > Nate writes: > >>I really think the driver is broken and the API is fine for this. I >>don't like the hack of returning a random CID for checks against the >>HID. Drivers down the road may come to rely on this and then every BIOS >>that has a different order for CIDs becomes a potential breakage point. > > > They alredy do rely on this. When they support pnp, they call the > ISA_PNP_PROBE routine. When they don't then your observation doesn't > matter because the order of the IDs doesn't matter: their non-zeroness > does. > > >>Drivers should not rely on isa_get_logicalid() to determine a boolean >>"is PNP?" > > > Actually, that's the interface. We have to follow it, even if you > think it is stupid. It is how we do things. When we don't have a > logicalid, we return 0. When drivers don't support pnp devices, it > uses the existance of a non-zero pnpid to know the device isn't for > them. It has been this way since 3.0. > > Warner Rather than John's addition of returning an arbitrary CID, can we return ~0 or some other obviously invalid HID so that drivers don't start depending on the order of CIDs? -- Nate