New PCMCIA

Pavel Roskin proski at gnu.org
Tue Apr 8 20:07:42 BST 2003


Hello, David!

David Gibson (maintainer of orinoco_cs) told me that you are working on a
new PCMCIA implementation for Linux.  I think it's a very important
project.  I'd like to participate in the project.  At least I want to know
what is going on.

I tried to find the homepage of the project, but the closest thing I could
find is the empty archives of linux-pcmcia at lists.infradead.org.  This
message is also a test if this list is actually alive :-)

In my opinion, the problems with the current implementation are following:

1) Maintenance.  pcmcia-cs by David Hinds is supposed to be the old
version, but it's maintained better than kernel PCMCIA.  It's very hard to
get even a trivial PCMCIA patch into the kernel.  It seems that the kernel
PCMCIA is maintained by the main developers (Linus Torvalds, Alan Cox) who
are too busy with other things.  That's why some patches end up in
pcmcia-cs only or in the kernel only.  Ideally, there should be a PCMCIA
group working on the driver for both stable and development kernels, like
it's done for other drivers (including MTD).

2) Insufficient code reuse.  Client drivers are supposed to do many things
that are essentially the same for all drivers.  Fixes in some drivers are
not propagated to others.  For example, detach() calls release() in
pcnet_cs but not in xirc2ps_cs.  Both drivers are for very similar network
cards.  orinoco_cs got rid of timers, but other drivers still have them.

3) Race conditions.  Many drivers use timers for no particular reasons.
In some cases, the device fails to unregister because the user mode
scripts finish at a "wrong" time.

4) Resource allocation.  Some drivers allocate resources for the devices
instead of taking resources from the socket driver.  This is bad because
the resources ultimately belong to the socket, and it's the socket driver
that knows which resources it can provide.  In particular, most socket
driver remap memory and I/O windows to regions that a not reserved with
the OS.  Checks to make sure that other devices are not affected are
insufficient.  Socket drivers that don't provide remapping (e.g. my
plx9052 driver) don't work with the client drivers that expect to use
fixed addresses (e.g. pcnet_cs).

5) No dynamic registration of sockets.  Socket drivers inserted after ds
are not seen from cardmgr.  Ideally, pcmcia_core and ds should be merged,
and the socket drivers should be loaded on top of them.

6) No driver-assisted identification of cards.  It should be possible for
a client driver to check the card beyond its CIS data (e.g. check the
firmware) and ask cardmgr to try another driver with the card.

Please consider this message as public if you want to reply to it in
another mailing list or forward it to other persons.

-- 
Regards,
Pavel Roskin



More information about the linux-pcmcia mailing list