From owner-freebsd-current@FreeBSD.ORG Mon Jul 18 11:16: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 23ADC16A41C for ; Mon, 18 Jul 2005 11:16:12 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD1F343D46 for ; Mon, 18 Jul 2005 11:16:11 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 24660 invoked from network); 18 Jul 2005 11:16:11 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender ) by mail28.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 18 Jul 2005 11:16:10 -0000 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j6IBG6UH035576; Mon, 18 Jul 2005 07:16:06 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Nate Lawson Date: Mon, 18 Jul 2005 07:15:40 -0400 User-Agent: KMail/1.8 References: <20050716.113059.82101301.imp@bsdimp.com> <20050716.131701.124866666.imp@bsdimp.com> <42D9DA05.1020806@root.org> In-Reply-To: <42D9DA05.1020806@root.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200507180715.41974.jhb@FreeBSD.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx Cc: freebsd-current@FreeBSD.org, harrycoin@qconline.com, "M. Warner Losh" 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: Mon, 18 Jul 2005 11:16:12 -0000 On Sunday 17 July 2005 12:09 am, Nate Lawson wrote: > 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? Actually, drivers also use isa_get_logicalid() to get real actual PnP ID as= =20 well (see usage in the pnpmss driver in the same file). I think that any=20 drivers that actually need to interface with ACPI do need to just use=20 ISA_PNP_PROBE(). I think that drivers that don't implement devices ACPI=20 enumerates should stop attaching to ACPI as well. Finally, it may be that= =20 ISA_PNP_PROBE() needs to return a string version of the PNP ID that was=20 actually probed so that drivers can do extra tests. First though, we shoul= d=20 go through removing extra acpi attachments for drivers for ISA PNP cards=20 since ACPI enumerates the equivalent of PNP BIOS, not ISA PNP. =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org