Problem with the pcmciamtd driver

Florent Hamiaux florent.hamiaux at wanadoo.fr
Mon Mar 19 05:58:15 EDT 2007


Hi,

I use a pcmcia card with the pcmciamtd driver. This driver worked fine until the 2.6.10 version of the kernel (or maybe  a later version but I just tested it with the 2.6.10 verson). 
It's a 16 bits ram card, and when I try to use it with the 2.6.17 version of the kernel it doesn't work. 
So I looked a little at the pcmcciamtd driver and I found that to access the card it uses the memcpy_toio and memcpy_fromio functions to write and read on the card:
static void pcmcia_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len);
static void pcmcia_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len);
are the 2 functions of the pcmciamtd driver that are used.
So I replace the call of memcpy_froio and memcpy_toio  by a for loop of ioread16 (...) and iowrite16(...), and like that, the card works. 

And so my question is why? I am a newbie with the Linux kernel code and I didn't find any reason for that. Do you have some informations that can help me to understansd what happens. Is it an evolution of the kernel ? Is it bug? Is it because the card is not initialized correctly and there is a better solution to this problem? Or it's like that and there is no reason? 

Thank's a lot for your answers.

Florent Hamiaux.





More information about the linux-pcmcia mailing list