Help with cs: unable to map card memory on a MIPS32 router

Larry Finger Larry.Finger at lwfinger.net
Tue Jun 9 12:59:29 EDT 2009


Roy wrote:
> There is a legacy data card "U630” (PCMCIA). When plugged in a router
> with Linux 2.6.x code, there is the error from CS (card service),
> "cs: unable to map card memory!" It means that daemon of Card Service
> can not get the mapping space from Kernel. However, this card works
> well with our Linux 2.4 code.
> 
> I see the followings in the two cases…
> 
> BRCM Linux 2.4:
> ---------------
> pcmcia_adjust_resource_info() --> adjust_memory() --> add_interval()
> can allocate memory successful and store it into a global variable
> named "mem_db".
> 
> Then the function find_mem_region() can use the memory address stored
> in "mem_db".
> 
> 
> BRCM Linux 2.6:
> ---------------
> pcmcia_adjust_resource_info() --> adjust_memory() --> add_interval()
> can allocate memory successful, too.
> 
> But the system store it into a socket structure named "pcmcia_socket".
> The function pci_find_parent_resource() return 0 (It means the bus
> resource can not be found). pcmcia_find_mem_region() will be called in
> linux kernel 2.6 but finally sends error message “cs: unable to map
> card memory!”.
> 
> The I/O Memory which is needed by card service (PCMCIA) can be
> accessible in Linux 2.4 but can not work in Linux 2.6. I am wondering
> that the PCI Yenta Socket data structure changed in Linux 2.6 caused
> the issue. Appreciate comment & any tip to debug this issue.

If possible, please install the attached patch. It will let us know
which place failed in the find_mem callback routine. There are three
places that might be the cause.

Larry

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pcmcia_test
URL: <http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20090609/69edc7ed/attachment.cc>


More information about the linux-pcmcia mailing list