[PATCH 5/7] more CardServices() removals (drivers/net/wireless)

Arjan van de Ven arjanv at redhat.com
Wed Dec 24 10:29:44 GMT 2003

> Ummm...  there are many changes to the pcmcia net drivers in my 
> net-drivers-2.5-exp queue.  All can be classified as fixes, to a greater 
> or lesser degree, and I would put those at a higher priority than API 
> cleanups and such. 

This set is not so much about API cleanup as about fixing a REAL bug:
CardServices() has a very broken prototype that miscompiles on amd64 on
possibly others (even x86 with the right gcc flags).

Basically the function is implemented like this:

int CardServices(int func, void *a1, void *a2, void *a3)

however the prototype that drivers see is using varargs like this:

extern int CardServices(int func, ...);

varargs functions on amd64 have a different calling convention than
"normal" functions so this mismatches the actual implementation's
calling convention and goes west quite spectacular. The same might be
true for other architectures, and is true for x86 when you use

You could argue we should just fix CardServices() instead, but well once
you do that you might as well kill it; even in 2.4 it's an optional API
which abstracts the real API.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20031224/3d03a61a/attachment.bin

More information about the linux-pcmcia mailing list