From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: file2alias - incorrect? aliases for USB
Date: Mon, 10 Nov 2003 09:37:03 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106845710025996@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-106840503223499@msgid-missing>
On Sun, Nov 09, 2003 at 09:55:19PM +0300, Andrey Borzenkov wrote:
> file2aliases puts in alias device ID high and low numbers directly from match
> specifications. E.g. for this match table entry:
>
> usb-storage 0x000f 0x04e6 0x0006 0x0100 0x0205 ...
>
> it generates alias
>
> alias usb:v04E6p0006dl0100dh0205dc*dsc*dp*ic*isc*ip* usb_storage
>
> unfortunately real device attribute does not include high and low - rather it
> has single device ID (as part of PRODUCT) that should be contained in these
> bounds:
>
> length += snprintf (scratch, buffer_size - length, "PRODUCT=%x/%x/%x",
> usb_dev->descriptor.idVendor,
> usb_dev->descriptor.idProduct,
> usb_dev->descriptor.bcdDevice);
>
> or bcdDevice file in sysfs.
>
> This makes those aliases rather useless for the purpose of matching reported
> device. It may take the same route as PCI and reject all device ID table
> entries that have High != Low but there are quite a few of them available.
>
> I am rather confused because I do not see how this condition (low <= bcdDevice
> <= high) can be expressed using simple glob pattern (unless we are going to
> take glob library from Zsh :)
I would suggest just ignoring the bcdDevice value, and loading all
modules that match the idVendor and idProduct values, and let the kernel
sort it out :)
So for your example, you would just:
modprobe usb:v04E6p0006dl*dh*dc*dsc*dp*ic*isc*ip*
Hm, but that's no good either, because the visor driver trips over that
with its entry:
MODULE_ALIAS("usb:v*p*dl*dh*dc*dsc*dp*ic*isc*ip*");
and the improper module is loaded. That needs to be fixed up...
Rusty, any reason why the module alias code is turning an empty
MODULE_PARAM structure, as is declared in drivers/usb/serial/visor.c
with the line:
{ }, /* optional parameter entry */
Into the above MODULE_ALIAS? I don't think that's correct.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2003-11-10 9:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-09 18:55 file2alias - incorrect? aliases for USB Andrey Borzenkov
2003-11-10 9:37 ` Greg KH [this message]
2003-11-14 1:02 ` Greg KH
2003-11-17 3:09 ` Rusty Russell
2003-11-17 18:11 ` Andrey Borzenkov
2003-12-11 9:29 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-11-17 6:24 "Andrey Borzenkov"
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-106845710025996@msgid-missing \
--to=greg@kroah.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).