Alternate module not sought for blacklisted module

Please post any bugs you have found
Post Reply
Message
Author
User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

Alternate module not sought for blacklisted module

#1 Post by rerwin »

Although the Boot Manager suggests you can blacklist a driver module in order to use another, this does not happen. Once initialization script rc.modules finds a module to be blacklisted, it moves on to the next device, instead of continuing to look for another possible driver for the same device. This capability has been promoted as a way to manage certain Ralink (i think) drivers, but it has been reported to be unsuccessful.

In addition, the pupscan system utility does not check for blacklisting or overrides when building its "PCI Interfaces" listing. So the listing could be incorrect. Its technique is to replicate the logic used to load the modules, but lacks the code for the blacklist and overrides.

Even though Barry has announced he is rewriting rc.modules for 4.01, there might be value in correcting 4.00 through a service pack, for eventual retrofitting to 3.02, to provide the fix for those remaining with 4.00 or 3.02.

I am attaching the two corrected scripts and a separate attachment with the difference listings. Could anyone still having trouble with the Ralink drivers try this out, if you need the blacklist solution for forcing driver selection? Although there may no longer be a need for that technique, the fix to pupscan should be useful.
Richard
Attachments
module-loading+pupscan_fixes.tar.gz
Two corrected scripts.
Extract /etc and /usr directories to /, so the scripts go to their correct locations.
(6.19 KiB) Downloaded 598 times
module-loading+pupscan_diffs.tar.gz
Difference listings
(1.14 KiB) Downloaded 588 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

The new code in 4.1 is like this (in rc.modules):

PCIALIASES="`cat /sys/bus/pci/devices/*/modalias | grep '^pci:'`"
PCIALIASMODS="`for ONEALIAS in $PCIALIASES
do
modprobe.bin --config /dev/null --show-depends $ONEALIAS 2>/dev/null | tail -n 1 | rev | cut -f 1 -d '/' | rev | cut -f 1 -d '.' | sed -e "s/^/${ONEALIAS}|/"
done`"

That is, this is how the PCI-related modules are found.
For each PCI interface, there is a modalias file, which the kernel creates automatically. The 'modprobe.bn --show-depends' line finds the actual module.

The thing is though, what if there is more than one "hit"? We have a few situations where two modules are claiming to work for the same PCI interface.
Perhaps the above code will need to be modified to handle that. I don't know what 'modprobe.bin --show-depends' does in that situation -- perhaps it only returns the first one found? -- if so, we need to somehow tell it to return the next one also.
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#3 Post by BarryK »

Oh yes, one more thing. I don't know if this is supported with the 2.6.21.7 kernel, but it is in the 2.6.25 kernel:

/etc/modprobe.conf can now have entries like:

blacklist rt73

which tells modprobe to ignore that module totally.

In 4.1 I will make the blacklisting code in BootManager write to modprobe.conf, rather than have a list as before.
[url]https://bkhome.org/news/[/url]

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#4 Post by James186282 »

Hi Barry I'm trying to revert to madwifi (from ath5k) and am not sure how to go about this. is the modprob.conf file in /etc still the way to go about this? Also can you direct me to which file contains the script to initial wifi. I can do it from the CLI of course but...

modprobe ath_pci

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#5 Post by James186282 »

I wanted to update what I ended up doing which maybe of value. I started with a 4.21 distro of puppy called Crypto Puppy. I then loaded the latest official version updating that. I didn't then know how locked down ath5k was and used that with my WAG511 card. When I understood the limitations of ath5k I tried to revert to madwifi by compiling the latest source and doing a clean install. This ended up giving me a weird mix of ath5k and ath_pci. I then used boot manager to put ath_pci ahead of ath5k and blacklisted ath5k. This didn't change anything. And btw I got lots of missing symbol messages in dmesg.

I then pulled my wifi card. Reformatted the Hard Disc and started with a clean install of crypto 4.20 puppy. I went to the "connect" program and loaded the ath_pci driver without the card being plugged in. Then I powered down. Installed the card. And restarted the machine. This worked 100%. No ath5k, no missing symbols in dmesg, no combo of ath5k and ath_pci when I tried doing lsmod | grp ath

I think there is still a bug of some type that allows ath5k to load even partially when you have blacklisted it and given priority to another program.

Thanks for caring enough to ponder my Noob posts!

- James186282
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#6 Post by James186282 »

In my post I incorrectly said 4.21 Crypto. Its 4.20 Crypto Puppy.
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#7 Post by rjbrewer »

Actually it's Puppy Crypt.

Based on 4.2 it already included ath_pci.

This problem probably didn't belong in "bugs" section.

When in doubt...reboot.

Double doubt...power off-power on.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#8 Post by James186282 »

Thanks! your right of course. Crypt sounds more halloween to me but....
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

Post Reply