From: "Adam J. Richter" <adam@yggdrasil.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Bug in USB Generic Serial driver
Date: Tue, 09 Jan 2001 08:09:12 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-97902771827032@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-97902448220635@msgid-missing>
>From: Greg KH <greg@kroah.com>
[...]
>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
next prev parent reply other threads:[~2001-01-09 8:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-09 7:11 Bug in USB Generic Serial driver Greg KH
2001-01-09 8:09 ` Adam J. Richter [this message]
2001-01-09 15:37 ` Dunlap, Randy
2001-01-09 16:06 ` Matthew Dharm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-97902771827032@msgid-missing \
--to=adam@yggdrasil.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.