Using the "best available" driver

Jean Tourrilhes jt at hpl.hp.com
Mon Dec 5 18:40:18 EST 2005


	Hi guys,

	Sorry to intrude in the conversation.

Dominik Brodowski wrote :
> > Either the userspace should control binding specific devices to specific
> > drivers, or it should at least be able to adjust the kernel matching
> > policy without telling the kernel what to do with individual devices.
> 
> echo -n "0.0" > /sys/bus/pcmcia/devices/0.0/driver/unbind
> echo -n "0.0" > /sys/bus/pcmcia/drivers/hostap_cs/bind

	A few years ago, probably on this mailing list, I told you
that driver selection was an essential feature of the old Pcmcia
subsystem. I'm glad that you have implemented the framework to do
that, and thank you for all your work on Pcmcia.
	Now, I want to start brainstorming about the next step : how
do we offer this functionality in a friendly form to our users.

	The sysfs commands are fine, but they are rather obscure, and
are not persistent. What would be nice is to have a list associating
cards IDs with the driver needed. Not an axhaustive list, but just the
user override. Then, each time the card is loaded, the hotplug script
would do the necessary magic to get the right driver binded (and
potentially unload the uncessary driver).
	Personally, I'm not totally happy with the present solution
where all the policy (driver binding) is done in kernel space out of
control of the user. We really want to polish that stuff so that it's
usable by common mortals.

	Note that this situation will happen much more than you can
think. A lot of wireless cards have multiple drivers that support
them, each with different features, and you can always predict which
the user will need.
	For example, the BlueTooth Pcmcia cards can usually be driven
by serial_cs (more standard), but also by a specific BT driver (higher
speeds). The Aironet can be used by the GPL driver (better wireless
extensions) or by the Cisco driver (better support for Cisco ACU
tool). The official Atmel driver have some nifty config tools, whereas
the alternate Atmel driver has better wireless extensions. Same story
for the ADMtel and Realtek driver. The fully open source Atheros
driver has limited HW support, those cards are supported by the
MadWifi driver which can not be included in the kernel.
	Yes, maybe like in the case of Orinoco/HostAP the dual driver
situation for those hardware might get solved. But, looking at the
history for Orinoco/HostAP, this will take a very long time. And
meanwhile, the list above will only get longer.

> The same (unbind, bind) is possible for PCI devices. Soon you will also be
> able to
> 	rmmod orinoco_cs
> 	modprobe hostap_cs
> but that depends on the ioctl removal.

	Could you clarify ? You are talking about removing the old
cardmgr ioctl ? What's the plan there ?
	Personally, unless you "fix" the above problem, I would not do
it.

	Have fun...

	Jean



More information about the linux-pcmcia mailing list