Re: file2alias - incorrect? aliases for USB

From: Andrey Borzenkov
Date: Mon Nov 17 2003 - 13:18:04 EST


On Monday 10 November 2003 12:37, Greg KH wrote:
> 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
> >
[...]
>
> 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 :)
>

the obvious point that this leaves unneeded modules in kernel aside ...

that won't work that easy. You have to build name to match line from
modules.alias. But to match you have to put exact values for `dl' and `dh'.
Those values are simply not available when hotplug agent is called.

i.e. for the above line to match you have to supply exact values for vendor,
product, device low, device high. Any other values are not important but
these must be exact. But neither device low nor device high are known.

apparently the only way is to remove them and hope that usually the same
vendor/product combination is handled by single driver.

> So for your example, you would just:
> modprobe usb:v04E6p0006dl*dh*dc*dsc*dp*ic*isc*ip*
>

that won't match, sorry. wildcards can be in aliases; they can't be in module
names.

-andrey

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/