Re: [2.6.14.2] port smartcard driver to new pcmcia infrastructure?

From: Dominik Brodowski
Date: Wed Dec 07 2005 - 06:02:00 EST


Hi!

> I'm currently looking into getting my smartcard driver to work. O2Micro was
> nice enough to opensource the driver [1]. The driver compiles without
> problems, and can be insmod' without triggering any problem. The main problem
> lies that it doesn't seem to be calling the ozscrx_attach function, which
> sets up the irq's and everything, thus causing the subsequent open of the
> device to fail with -ENODEV.
>
> Does anyone have any idea how i can continue debugging this?

The problem is that one, possibly two of the required changes haven't yet
propagated to their driver.

* event handler initialization in struct pcmcia_driver (as of 2.6.13)
The event handler is notified of all events, and must be initialized
as the event() callback in the driver's struct pcmcia_driver.
Example patch:
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1e212f3645a6b355de8c43a23376bc0e2ac49a63

and

* in-kernel device<->driver matching (as of 2.6.13)
PCMCIA devices and their correct drivers can now be matched in
kernelspace. See 'devicetable.txt' for details.
Example patch:
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;h=cdcc46e1f11d6dfbf4e741d7c77ec83a4b7c09ac;hp=f3ea4a9f2bf196a0b884cde3d44a2cec27f9db13;hb=ce8a0037e110c1f4ec2fac7a3d791043e4e38cfc;f=drivers/net/pcmcia/pcnet_cs.c
the correct ID is, AFAICS:
PCMCIA_DEVICE_PROD_ID123("O2Micro", "SmartCardBus Reader", "V1.0", 0x97299583, 0xb8501ba9, 0xe611e659);


For -mm (and for 2.6.16, not .15) there are quite more changes necessary,
which are also described in Documentation/pcmcia/driver-changes.txt.


Dominik
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/