On Mon, Apr 18, 2005 at 08:55:24AM -0700, Greg KH wrote: > On Mon, Apr 18, 2005 at 07:40:25PM +0400, Roman Kagan wrote: > > On Mon, Apr 18, 2005 at 08:02:25AM -0700, Greg KH wrote: > > > And your patch modified the map file which is created, right? > > > > By no means. It only modifies the aliases which are hardcoded in the > > module.ko. The map files are created by depmod and remain the way they > > are (and BTW bcdDevice ranges are handled correctly there, with awk's > > help). > > Ok, I'm confused then.
Let me try to clarify a bit the situation. The drivers list the devices they want to handle in MODULE_DEVICE_TABLE. The "old" way to use it is to run depmod on the modules after modules_install, which creates a set of modules.*map files. Then at hotplug time these files are parsed with some awk machinery and a matching module is modprobed. The "new" way is to run modpost on the modules as part of the kernel build, which generates *.mod.c files with, among other stuff, a few MODULE_ALIAS definitions, which are then included in the *.ko files. At hotplug time the parameters of the particular device are used to construct a name, and modprobe fnmatch()-es it against the aliases in the modules. Now the problem with usb is that the generated patterns contain both bcdDevice_lo and bcdDevice_hi, dlXXXXdhXXXX, so the actual bcdDevice can't match against the two simultaneously for any nontrivial limits. What I propose is to change the generated set of MODULE_ALIAS definitions, so that one usb_device_id can produce several (at most 7) MODULE_ALIAS lines, each of which could be fnmatch()-ed against $MODALIAS. This doesn't interfere in any way with the "old" method. The "new" method has never been widely used, in part due to the above problem, so there should be no compatibility problems. > Care to resend the patch, against 2.6.12-rc2? Sure I will. But, thanks to Felix Möller's message which reminded me that bcdDevice is BCD (binary-coded decimal), I need to update it to consider only decimal digits rather than hex as I did initially, so I'll get to it tomorrow. Cheers, Roman. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel