From owner-cvs-all Thu Oct 4 4:49:51 2001 Delivered-To: cvs-all@freebsd.org Received: from nasu.utsunomiya-u.ac.jp (nasu.utsunomiya-u.ac.jp [160.12.128.3]) by hub.freebsd.org (Postfix) with ESMTP id D419137B405; Thu, 4 Oct 2001 04:49:44 -0700 (PDT) Received: from nantai.utsunomiya-u.ac.jp by nasu.utsunomiya-u.ac.jp (8.11.2/1.1.29.3/26Jan01-1134AM) id f94Bng550896; Thu, 4 Oct 2001 20:49:42 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp by nantai.utsunomiya-u.ac.jp (8.11.2/1.1.29.3/30Jan01-0241PM) id f94BngQ517976; Thu, 4 Oct 2001 20:49:42 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:/510kdvi6cm9CGwZkx1KI9+ZrRkQFIFp@zodiac.mech.utsunomiya-u.ac.jp [160.12.43.7]) by zodiac.mech.utsunomiya-u.ac.jp (8.9.3+3.2W/3.7W/zodiac-May2000) with ESMTP id UAA24572; Thu, 4 Oct 2001 20:59:38 +0900 (JST) Message-Id: <200110041159.UAA24572@zodiac.mech.utsunomiya-u.ac.jp> To: Doug Rabson Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: cvs commit: src/sys/dev/acpica acpi.c In-reply-to: Your message of "Thu, 04 Oct 2001 01:31:17 MST." <200110040831.f948VHu13310@freefall.freebsd.org> References: <200110040831.f948VHu13310@freefall.freebsd.org> Date: Thu, 04 Oct 2001 20:59:37 +0900 From: Kazutaka YOKOTA Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >dfr 2001/10/04 01:31:17 PDT > > Modified files: > sys/dev/acpica acpi.c > Log: > Check the compatible ID as well as the hardware ID in acpi_MatchHid. > > Revision Changes Path > 1.41 +6 -1 src/sys/dev/acpica/acpi.c I think we had better be careful when matching against compatible IDs. We should distinguish the case when the hardware ID matches, and the case when the compatible ID matches. If we don't distinguish the hardware ID match and the compatible ID match, the following will happen. The device X has a hardware PnP ID of XXXYYYY and a compatible ID of PNPWWWW. The device driver A supports PNPWWWW device. The device driver B supports XXXYYYY device. When the driver A gets at the device X before the device B does, we will have the driver A installed for this device, instead of the driver B, which offers specific support for PNPWWWW. We need to make the probe routine in the device drivers return 0 (exact match) when the hardware ID exactly matches, and return a negative value (lower priority) when the compatible ID matches. Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message