From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Adam J. Richter" Date: Tue, 09 Jan 2001 08:09:12 +0000 Subject: Re: Bug in USB Generic Serial driver Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org >From: Greg KH [...] >If you load (or compile in) the USB Generic Serial driver, it will >_always_ grab any device that it is offered, if the user does not >specify a product and vendor id for it on the 'insmod' command line. >This is because its vendor and product id are set to 0 initially, with >_no_ match_flags setting either. In the function, usb_match_id, a value >of 0 means accept any as a wild card. I have not tried this, but you should be able fix this problem by changing the declaration of generic_device_ids to something like this: static struct usb_device_id generic_device_ids[] = { { match_flags: USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT}, { } /* Terminating entry */ }; This will cause the device and vendor ID's always to be tested. >From /usr/share/usb.ids, it looks like vendor ID 0 is reserved, so it will not match unless the user sets it. I sympathize with your misgivings about the USB device ID helper macros. As I said a couple of days ago, if we shrink the USB_DEVICE_ID_MATCH_xxxx names to USB_MATCH_xxxx, we should not need so many helper macros to keep the code readable, and we should be able to have labelled initializers. Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104 adam@yggdrasil.com \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us." _______________________________________________ Linux-hotplug-devel mailing list Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel