Problems with pcmcia code

Russell King rmk+pcmcia at arm.linux.org.uk
Tue Oct 21 21:00:53 BST 2003


Hmm, this is interesting.

On Tue, Oct 21, 2003 at 01:22:51PM -0500, Larry W. Finger wrote:
> ds_ioctl(socket 0, 0x8004640b, 0xbfffeab0)
> cs: memory probe 0xa0000000-0xa0ffffff:yenta_set_mem_map: map 0 flags 21 speed 300 start a0000000 stop a007ffff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start a0000000 stop a007ffff card 00000000
...
> yenta_set_mem_map: map 0 flags 1 speed 300 start a0f80000 stop a0ffffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 300 start a0f80000 stop a0ffffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 300 start a0f80000 stop a0ffffff card 00000000

This lot is running through trying to validate the CIS between
0xa0000000 and 0xa1000000 (exclusive).  It looks like we fail
(which is consistent with what you're saying) because we then
run through the checksum test:

> yenta_set_mem_map: map 0 flags 1 speed 0 start a0000000 stop a007ffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a0000000 stop a007ffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 0 start a0080000 stop a00fffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a0080000 stop a00fffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 0 start a0100000 stop a017ffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a0100000 stop a017ffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 0 start a0180000 stop a01fffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a0180000 stop a01fffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 0 start a0100000 stop a017ffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a0100000 stop a017ffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 0 start a0180000 stop a01fffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a0180000 stop a01fffff card 00000000
...
> yenta_set_mem_map: map 0 flags 1 speed 0 start a0f00000 stop a0f7ffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a0f00000 stop a0f7ffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 0 start a0f80000 stop a0ffffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a0f80000 stop a0ffffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 0 start a1000000 stop a107ffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a1000000 stop a107ffff card 00000000
> yenta_set_mem_map: map 0 flags 1 speed 0 start a1080000 stop a10fffff card 00000000
> yenta_set_mem_map: map 0 flags 0 speed 0 start a1080000 stop a10fffff card 00000000
>  clean.

which appears to pass (and oops, we've gone over the end address
slightly.)

However, we don't check whether the low memory addresses are available,
but we go ahead and use them anyway:

> yenta_set_mem_map: map 0 flags 21 speed 300 start 000c0000 stop 000c0fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 000c0000 stop 000c0fff card 00000000
...
> ds_ioctl(socket 0, 0xc050643c, 0xbfffece0)
> bind_request(0, 'sram_mtd')
> ds_ioctl(socket 0, 0xc050643c, 0x80540c0)
> bind_request(0, 'memory_cs')
> ds_poll(socket 0)

and we are unable to read the CIS.

> ================================================================================
> When a 'kill -HUP' is issued, the following output is added:
> =================================================================================

You tell cardmgr to re-read its file and it rebuilds the PCMCIA resource
database.  This time we don't do the memory probe, and use use a different
resource instead:

> ds_ioctl(socket 0, 0x8004640b, 0xbfffeab0)
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000
> yenta_set_mem_map: map 0 flags 21 speed 300 start 60000000 stop 60000fff card 00000000

which appears to work.

> bind_request(0, 'aha152x_cs')

Hmm, what does your /etc/pcmcia/config.opts say about memory ranges
(feel free to send the file 8))

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core



More information about the linux-pcmcia mailing list