PCMCIA Client Drivers for accessing CF Storage Card
linux at dominikbrodowski.net
Tue Jun 24 09:57:38 EDT 2008
On Tue, Jun 24, 2008 at 09:41:01AM -0400, kiran vedere wrote:
> The pata_pcmcia.c uses the MODULE_DEVICE_TABLE to provide a
> comprehensive list of the Manufacturer ID/Card ID's for various
> Storage Cards. I assume the list is used to load the appropriate
> Client driver based on the inserted card. If the driver is running on
> a production device and if someone plug's in a brand new CF Storage
> Card (which is not present in the pcmcia_devices list) do you know
> how this is supported? Please correct me if I am wrong.
Basically, there are three options:
1) by matching the function ID "4".
As function IDs are quite general, we do not match only based on the
function ID at first. Only if userspace told the kernel to accept the
function ID match, the newly-added device is bound to the pata_pcmcia.c
For this to work, you need udev (or some sort of replacement) to work:
(check pcmciautils/udev/rules.base )
2) by using new_id:
Author: Bernhard Walle <bwalle at suse.de>
Date: Sun May 6 14:48:44 2007 -0700
add new_id to PCMCIA drivers
PCI drivers have the new_id file in sysfs which allows new IDs to be added
at runtime. The advantage is to avoid re-compilation of a driver that
works for a new device, but it's ID table doesn't contain the new device.
This mechanism is only meant for testing, after the driver has been tested
successfully, the ID should be added in source code so that new revisions
of the kernel automatically detect the device.
The implementation follows the PCI implementation. The interface is documented
in Documentation/pcmcia/driver.txt. Computations should be done in userspace,
so the sysfs string contains the raw structure members for matching.
3) by re-compiling the module ;)
More information about the linux-pcmcia