From owner-cvs-all Tue Dec 11 10:23:18 2001 Delivered-To: cvs-all@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 7FBEC37B416; Tue, 11 Dec 2001 10:23:08 -0800 (PST) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.5/8.11.5) with ESMTP id fBBIMxg69086; Tue, 11 Dec 2001 11:22:59 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200112111822.fBBIMxg69086@aslan.scsiguy.com> To: Warner Losh Cc: "Erik H. Bakke" , "Sheldon Hearn" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/usb usbdevs.h usbdevs_data.h In-Reply-To: Your message of "Tue, 11 Dec 2001 11:12:06 MST." <200112111812.fBBIC6M29085@harmony.village.org> Date: Tue, 11 Dec 2001 11:22:59 -0700 From: "Justin T. Gibbs" 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 >But it is embedded in the device drivers. The devs stuff does is >give a nice, convenient, uniform way to do that. Matching pccard and >usb devices is more complex than pci. All that this central database does is prevent you from shipping a binary module for a new device and have it be properly announced unless you have a new usb core module too. Just put these entries into the individual drivers and have them call a common routine in the USB code to export the entry on attach. Matchin usb devices certainly looks to be as simple as PCI. From if_aue.c: /* * Probe for a Pegasus chip. */ USB_MATCH(aue) { USB_MATCH_START(aue, uaa); struct aue_type *t; if (!uaa->iface) return(UMATCH_NONE); t = aue_devs; while(t->aue_vid) { if (uaa->vendor == t->aue_vid && uaa->product == t->aue_did) { return(UMATCH_VENDOR_PRODUCT); } t++; } return(UMATCH_NONE); } -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message