Help ! BindDevice rouine -
08-31-2006
, 06:23 AM
Hi,
We have developed Windows WDM driver for our PCMCIA 16 bit PC card.
Our card is working in all the wondows systems perfectly with our WDM
drivers.
Now we want to develop Linux device driver for the same card. I had
gone through Linux PCMCIA programmers guide.
From that I understood that.
The Linux kernel PCMCIA system has three main components. At the lowest
level are the socket drivers. Next is the Card Services module. Drivers
for specific cards are layered on top of Card Services. One special
Card Services client, called Driver Services, provides a link between
user level utility programs and the kernel facilities.
In my client driver, in init_module function I am using the following
funtion.
register_pccard_driver(dev_info_t *dev_info, dev_link_t
*(*attach)(void), void (*detach)(dev_link_t
*));
Before this function I called CardServies(GetCardServicesInfo,&serv);
This routine executed successfully.
But register_pccard_driver() is not calling the attach function.
I am getting the return value as zero for this
register_pccard_driver() function
In register_pccard_driver() function, first parameter is dev_info_t
*dev_info. for this parameter we have given "apoorva_cs" as our device
name.
Can we give any name or we should give product ID which we have given
in the product/version infromation tuple????
As per the documentation, register_pccard_driver informs Driver
Services that a client driver is present and ready to be bound to
sockets. When Driver Services receives a DS_BIND_REQUEST ioctl that
matches this driver's dev_info string, it will call the driver's
attach() entry point. When it gets a DS_UNBIND_REQUEST ioctl, it will
call detach().
My doubt is when and where should I call BindDevice funtion.
I had faced lot of confusion with the terminology in the Linux PCMCIA
programmer's Guide because of the terms Driver services and client
drivers
Both the terms have same meaning or what is the difference between
Driver services and Client drivers.
Please help me.
Thanks in Advance.
regards,
Mahender. |