From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dominik Brodowski Date: Wed, 07 Dec 2005 21:37:21 +0000 Subject: grey- and blacklisting drivers [Was: Re: Using the "best available" driver] Message-Id: <20051207213721.GC21844@isilmar.linta.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi, For various reasons, it might be necessary to switch to a better driver for a device -- Jean can tell of many examples, if needed. Currently, that's possible using modprobe's blacklisting capability (in module-init-tools-3.2.1, at least) -- but that's for monolithic kernels only. While a blacklisting feature might also come useful in the kernel driver core level, udev may offer the chance to fix some broken "bindings" if there's need to. We'd need a simple shell script like #/bin/bash # # needs 4 arguments: devpath bus wrong_driver right_driver # $drivername = basename $(readlink /sys/$1/driver) $device = basename $1 $bus = $2 $wrong_driver = $3 $right_driver = $4 if [ $drivername = $wrong_driver ]; then echo -n "$device" > /sys/$devpath/driver/unbind echo -n "$device" > /sys/bus/$2/$right_driver/driver/bind fi; Then adding udev rules like ACTION="add", BUS="pci", RUN+="/bin/sh -c /sbin/check_blacklist $devpath $bus hostap_pci orinoco_pci'" is very easy, and such rules could even be generated by yet another tool which then echos into all relevant "uevent" files to run this script.. Or is all this already implemented? But differently? Should it be done at the kernel driver core level? Thanks, Dominik ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ 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