Porting a device drive to use device id

Alex Holeczy alex at wmi.com
Thu Apr 14 15:23:51 EDT 2005



On Thu, 14 Apr 2005, David Hinds wrote:

> On Thu, Apr 14, 2005 at 01:18:45PM -0400, Alex Holeczy wrote:
>>
>> When I load the updated device driver with the PCMCIA card inserted, the
>> device driver gets loaded correctly and I can access the card.  But if I
>> insert the card after I have loaded the device driver, I get the following
>> error message from cardmgr.
>>
>> cardmgr[31431]: error in file './cacdsp.conf' line 18: module name
>> 'bullet33_cs' not found
>
> Actually, no, you don't.  You get this error message when cardmgr
> reads your conf file, regardless of when you insert your card...
>
>> The following is my configuration file:
>>
>> module "bullet33_cs" opts "xx=1"
>
> What do you intend this line to do?


I found the syntax for this line in pcmciautils-002/config/config.opts.

Here comes my lack of understanding of have things really work...

My thinking was that the pcmcia_device_id struct notifies the kernel that 
my device driver will manage PCMCIA cards which match the PCMCIA device 
product id 1 and 2.  The line in my configuration file (cacdsp.conf) was 
to tell 'cardmgr' that my device driver exists.

When a PCMCIA card gets inserted into the system, 'cardmgr' would scan the 
*.conf files in the /etc/pcmcia directory informing the kernel of possible 
loadable modules which handle PCMCIA cards.  Since the kernel knows which 
drivers manage which devices, the kernel would load the appropriate module 
to handle the inserted PCMCIA card.

If I need to tell 'cardmgr' which driver to load like I did under the 
kernel 2.4, then I am missing the purpose of telling the kernel through 
the .id_table element what PCMCIA cards the module handle.

Could you explain the sequence of events that happen when a PCMCIA card 
gets inserted into the system?


TIA
Alex

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alex Holeczy (alex at wmi.com)

Communication Automation Corporation (CAC)      www.cacdsp.com www.wmi.com
1180 McDermott Drive, West Chester, PA  19380

800-367-6735 Ext. 122 or 610-692-9526 Ext. 122 (Voice)
610-436-8258 (Fax) 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the linux-pcmcia mailing list