site  contact  subhomenews

Preferred module

July 14, 2008 — BarryK
Dougal raised the problem of rt2500usb and rt73usb, and the lack of any Udev rule capability to adequately deal with choosing the correct one.

The problem occurs on the Classmate laptop, where rt2500usb.ko an rt73usb.ko are both detected as eligible for the wireless network interface. If 'modinfo' is executed on each of these, and the 'alias' lines examined, it can be seen that at least two are the same.

Of course, Puppy does have a blacklist capability (see the BootManager) but that does require some knowledge on the part of the user, to know that rt2500usb needs to be blacklisted to allow only rt73usb to load.

Instead, I have implemented a 'PREFLIST', which is in /etc/rc.d/MODULESCONFIG. Here is what is currently in there:

#PREFLIST: sometimes there are two hits, that is, two modules match the same
#'modalias'. In such a case, here we can specify a preference. Each entry
#here is of the form 'module1:module2' where module2 is the preferred choice.
PREFLIST=' rt2500usb:rt73usb '


There is a script, /sbin/pup_event_backend_modprobe, that udevd calls when it has a modalias. This script does various pre-processing, mostly processing entries in /etc/rc.d/MODULESCONFIG, then loads the module.
I have now added code that reads the PREFLIST variable and if there is a matching entry, then finds out whether the candidate-replacement also matches the modalias, if so then uses it.

Comments

Good Fix



Tags: puppy