Skip to contentSkip to conversation

pcmcia problem on pb1500

DISCUSSION Jan Pedersen 3 participants 9 messages Jun 6, 2003 – Jun 9, 2003 1 message not in the archive MIPS

lore
Share & tools
lore
#0 lore raw

Hi

I am having problems getting a pci-pcmcia card up and running with kernel 2.4.19 on my pb1500 board.

A am executing:
insmod pcmcia_core.o cis_speed=10
insmod yenta_socket.o
insmod ds.o
cardmgr -v

output:
Linux Kernel Card Services 3.1.22
options: [pci] [cardbus]
Yenta IRQ list 0000, PCI irq4
Socket status: 30000046
Yenta IRQ list 0000, PCI irq4
Socket status: 30000011
cardmgr[148]: watching 2 sockets
cardmgr[149]: starting, version is 3.2.4
Done.
cardmgr[cs: memory probe 0x80000000-0x80ffffff:149]: initializing socket 1
excluding 0x80000000-0x800fffff 0x80400000-0x80bfffff
cardmgr[149]: socket 1: 350 Series Wireless LAN Adapter
cardmgr[149]: product info: "Cisco Systems", "350 Series Wireless LAN
Adapter"
cardmgr[149]: manfid: 0x015f, 0x000a function: 6 (network)
cardmgr[149]: module airo_cs.o not available
cardmgr[149]: executing: 'modprobe airo_cs'

airo:  Probing for PCI adapters
airo:  Finished probing for PCI adapters
airo_cs: GetNextTuple: No more items

cardmgr[149]: get dev info on socket 1 failed: Resource temporarily unavailable

It seems like it has something to do with the io area. When digging into the airo_cs.c, it fails in the folowing line. CFG_CHECK(RequestIO, link->handle, &link->io);

When compiled for x86 everything works fine.

lspci -v shows:
00:0d.0 Class 0607: 104c:ac55 (rev 01)

        Flags: bus master, medium devsel, latency 168, IRQ 4
        Memory at 80000000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=01, subordinate=04, sec-latency=176
        Memory window 0: 80001000-80002000 (prefetchable)
        Memory window 1: 80400000-807ff000
        I/O window 0: 00000000-00000fff
        I/O window 1: 00000000-00000003
        16-bit legacy interface ports at 0001

00:0d.1 Class 0607: 104c:ac55 (rev 01)

        Flags: bus master, medium devsel, latency 168, IRQ 4
        Memory at 80004000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=05, subordinate=08, sec-latency=176
        Memory window 0: 80005000-80006000 (prefetchable)
        Memory window 1: 80800000-80bff000
        I/O window 0: 00000000-00000003
        I/O window 1: 00001000-00001fff
        16-bit legacy interface ports at 0001

/etc/pcmcia/config.opts:
include port 0x100-0x4ff, port 0xc00-0xcff
include memory 0x80000000-0x80ffffff

THEN, i saw in the linux-mips archives, that Jeff Baitis has succeeded in getting it working on 2.4. He had applied two patches:
Pete's 36bit_addr_2.4.21-pre4.patch
Pete's 64bit_pcmcia.patch

I've found and patched theese into my kernel, but now, nothing works!

output is now:
Linux Kernel Card Services 3.1.22
options: [pci] [cardbus]
Yenta IRQ list 0000, PCI irq4
Socket status: 30000046
Yenta IRQ list 0000, PCI irq4
Socket status: 30000011
cardmgr[153]: watching 2 sockets
cardmgr[153]: could not adjust resource: IO ports 0xc00-0xcff: Invalid argument
cardmgr[153]: could not adjust resource: IO ports 0x100-0x4ff: Invalid argument
cardmgr[153]: could not adjust resource: memory 0x80000000-0x80ffffff:
Invalid argument
cardmgr[154]: starting, version is 3.2.4
Done.
cardmgr[154]: initiacs: unable to map card memory!
lics: unable to map card memory!
zing socket 1
cardmgr[154]: socket 1: Anonymous Memory
cardmgr[154]: module memory_cs.o not available cardmgr[154]: executing: 'modprobe memory_cs'
cardmgr[154]: get dev info on socket 1 failed: Resource temporarily unavailable

I am really stock here. Any help would be greatful.

Thanks
Jan

#1 lore raw

Hi Jan,

Quoted 3 lines

/etc/pcmcia/config.opts:
include port 0x100-0x4ff, port 0xc00-0xcff
include memory 0x80000000-0x80ffffff

I think you need something like that for mips as well.

Quoted 6 lines

THEN, i saw in the linux-mips archives, that Jeff Baitis has succeeded in getting it working on 2.4. He had applied two patches:
Pete's 36bit_addr_2.4.21-pre4.patch
Pete's 64bit_pcmcia.patch

I've found and patched theese into my kernel, but now, nothing works!

Not surprising :) The 36bit_add_xxxx patch was applied to the tree so it's not integrated in the source tree. So this begs the question -- what version of linux-mips are you using? If you're using the latest cvs bits, applying the above 36bit patch should have failed miserably. You do need the 64bit_pcmcia.patch though.

Take a look at the archives again and see how Jeff setup config.opts on the target board. That was the key. The cardmgr is recognizing your card so it's reading the attribute memory successfully. You're almost there ;)

Pete

#2 lore raw
Quoted 13 lines · Pete Popov

Hi Jan,

Quoted 3 lines

/etc/pcmcia/config.opts:
include port 0x100-0x4ff, port 0xc00-0xcff
include memory 0x80000000-0x80ffffff

I think you need something like that for mips as well.

Quoted 4 lines

THEN, i saw in the linux-mips archives, that Jeff Baitis has succeeded in getting it working on 2.4. He had applied two patches:
Pete's 36bit_addr_2.4.21-pre4.patch
Pete's 64bit_pcmcia.patch

Quoted 4 lines
Quoted 1 line

I've found and patched theese into my kernel, but now, nothing works!

Not surprising :) The 36bit_add_xxxx patch was applied to the tree so it's not integrated in the source tree. So this begs the question --

Sorry, this should read "...it's now integrated in the source..."

Pete

Quoted 14 lines

what version of linux-mips are you using? If you're using the latest cvs bits, applying the above 36bit patch should have failed miserably. You do need the 64bit_pcmcia.patch though.

Take a look at the archives again and see how Jeff setup config.opts on the target board. That was the key. The cardmgr is recognizing your card so it's reading the attribute memory successfully. You're almost there ;)

Pete

#3 lore raw
In reply to Pete Popov
Quoted 5 lines

Not surprising :) The 36bit_add_xxxx patch was applied to the tree so it's not integrated in the source tree. So this begs the question -- what version of linux-mips are you using? If you're using the latest cvs bits, applying the above 36bit patch should have failed miserably. You do need the 64bit_pcmcia.patch though.

I am not using linux-mips. I am using 2.4.19 directly from kernel.org. Some files are patched from mips-linux (non-pcmcia stuff).

Tried latest cvs version from linux-mips.org this weekend. By some reason I can't get any output on the serial port. If this kernel should work, maybe getting the serial-port to work on this is an easier task :-)

On the other hand, everything else I need is currently working on 2.4.19 (including pci)

Tried to do the 64bit_pcmcia.patch alone. Same result:

Linux Kernel Card Services 3.1.22
options: [pci] [cardbus]
Yenta IRQ list 0000, PCI irq4
Socket status: 30000046
Yenta IRQ list 0000, PCI irq4
Socket status: 30000011
cardmgr[148]: watching 2 sockets
cardmgr[148]: could not adjust resource: IO ports 0xc00-0xcff: Invalid argument
cardmgr[148]: could not adjust resource: IO ports 0x100-0x4ff: Invalid argument
cardmgr[148]: could not adjust resource: memory 0x80000000-0x80ffffff:
Invalid argument
cardmgr[149]: starting, version is 3.2.4
Done.
cardmgr[cs: unable to map card memory!
14cs: unable to map card memory!
9]: initializing socket 1
cardmgr[149]: socket 1: Anonymous Memory
cardmgr[149]: module memory_cs.o not available cardmgr[149]: executing: 'modprobe memory_cs'
cardmgr[149]: get dev info on socket 1 failed: Resource temporarily unavailable

Best result is with no patches, where it finds my cisco card.

Quoted 5 lines

Take a look at the archives again and see how Jeff setup config.opts on the target board. That was the key. The cardmgr is recognizing your card so it's reading the attribute memory successfully. You're almost there ;)

My configuration is based on his.
yes, it seems like it can access the attribute memory, but not the io memory.

I was vondering about the io addresses shown with lspci -v. Are they valid?
00:0d.0 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000fff
I/O window 1: 00000000-00000003
00:0d.1 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000003
I/O window 1: 00001000-00001fff

anyway, thanks a lot for helping
Jan

#4 lore raw
Quoted 8 lines

I am not using linux-mips. I am using 2.4.19 directly from kernel.org. Some files are patched from mips-linux (non-pcmcia stuff).

Tried latest cvs version from linux-mips.org this weekend. By some reason I can't get any output on the serial port. If this kernel should work, maybe getting the serial-port to work on this is an easier task :-)

Take a look at the toplevel Makefile. I bet you got the head of linux-mips which is 2.5 and, yes, it's quite borked right now :) I've made some progress on the Pb1500 but until I get that board fully functioning, I won't update the rest. To get 2.4, do a "cvs update -rlinux_2_4".

Quoted 36 lines

On the other hand, everything else I need is currently working on 2.4.19 (including pci)

Tried to do the 64bit_pcmcia.patch alone. Same result:

Linux Kernel Card Services 3.1.22
options: [pci] [cardbus]
Yenta IRQ list 0000, PCI irq4
Socket status: 30000046
Yenta IRQ list 0000, PCI irq4
Socket status: 30000011
cardmgr[148]: watching 2 sockets
cardmgr[148]: could not adjust resource: IO ports 0xc00-0xcff: Invalid argument
cardmgr[148]: could not adjust resource: IO ports 0x100-0x4ff: Invalid argument
cardmgr[148]: could not adjust resource: memory 0x80000000-0x80ffffff:
Invalid argument
cardmgr[149]: starting, version is 3.2.4
Done.
cardmgr[cs: unable to map card memory!
14cs: unable to map card memory!
9]: initializing socket 1
cardmgr[149]: socket 1: Anonymous Memory
cardmgr[149]: module memory_cs.o not available cardmgr[149]: executing: 'modprobe memory_cs'
cardmgr[149]: get dev info on socket 1 failed: Resource temporarily unavailable

Best result is with no patches, where it finds my cisco card.

Quoted 5 lines

Take a look at the archives again and see how Jeff setup config.opts on the target board. That was the key. The cardmgr is recognizing your card so it's reading the attribute memory successfully. You're almost there ;)

Quoted 6 lines

My configuration is based on his.
yes, it seems like it can access the attribute memory, but not the io memory.

I was vondering about the io addresses shown with lspci -v. Are they valid?

I think so, yes.

Pete

Quoted 13 lines

00:0d.0 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000fff
I/O window 1: 00000000-00000003
00:0d.1 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000003
I/O window 1: 00001000-00001fff

anyway, thanks a lot for helping
Jan

#5 lore raw
Quoted 5 lines

Take a look at the toplevel Makefile. I bet you got the head of linux-mips which is 2.5 and, yes, it's quite borked right now :) I've made some progress on the Pb1500 but until I get that board fully functioning, I won't update the rest. To get 2.4, do a "cvs update -rlinux_2_4".

No luck :-(

Tried 2.4.21-pre3 from linux-mips.org with both patches. This should be the configuration Jeff got to work.
<cardmgr[159]: watching 2 sockets
<cardmgr[159]: could not adjust resource: IO ports 0-0x1fff: Invalid argument
<cardmgr[159]: could not adjust resource: IO ports 0xc00-0xcff: Invalid argument
<cardmgr[159]: could not adjust resource: IO ports 0x100-0x4ff: Invalid argument
<cardmgr[159]: could not adjust resource: memory 0x40000000-0x41ffffff:
Invalid argument
<cardmgr[160]: starting, version is 3.2.4
<Done.
<cardmgr[1cs: unable to map card memory!
<60cs: unable to map card memory!

tried 2.4 from linux-mips.org
<Linux Kernel Card Services 3.1.22
< options: [pci] [cardbus]
<yenta 00:0d.1: Preassigned resource 0 busy, reconfiguring... <yenta 00:0d.1: Preassigned resource 1 busy, reconfiguring... <yenta 00:0d.1: Preassigned resource 2 busy, reconfiguring... <Yenta IRQ list 0000, PCI irq1
<Socket status: 30000046
<Yenta IRQ list 0000, PCI irq1
<Socket status: 30000011
<cardmgr[159]: watching 2 sockets
<cardmgr[159]: could not adjust resource: IO ports 0-0x1fff: Invalid argument
<cardmgr[159]: could not adjust resource: IO ports 0xc00-0xcff: Invalid argument
<cardmgr[159]: could not adjust resource: IO ports 0x100-0x4ff: Invalid argument
<cardmgr[159]: could not adjust resource: memory 0x40000000-0x41ffffff:
<Invalid argument
<cardmgr[160]: starting, version is 3.2.4
<Done.
<cardmgrcs: unable to map card memory!
<[1cs: unable to map card memory!

tried same with 64bit_pcmcia.patch
same result. I guess that the 36bit patch is included in this kernel?

Tried 2.4.21 & 2.4.21-pre7 from kernel.org
They die when initializing pci.

Are there different versions of the 36bit-patch? Mine is named 36bit_addr_121302.patch

regards
Jan

Quoted 62 lines
Quoted 37 lines

On the other hand, everything else I need is currently working on 2.4.19 (including pci)

Tried to do the 64bit_pcmcia.patch alone. Same result:

Linux Kernel Card Services 3.1.22
options: [pci] [cardbus]
Yenta IRQ list 0000, PCI irq4
Socket status: 30000046
Yenta IRQ list 0000, PCI irq4
Socket status: 30000011
cardmgr[148]: watching 2 sockets
cardmgr[148]: could not adjust resource: IO ports 0xc00-0xcff: Invalid argument
cardmgr[148]: could not adjust resource: IO ports 0x100-0x4ff: Invalid argument
cardmgr[148]: could not adjust resource: memory 0x80000000-0x80ffffff:
Invalid argument
cardmgr[149]: starting, version is 3.2.4
Done.
cardmgr[cs: unable to map card memory!
14cs: unable to map card memory!
9]: initializing socket 1
cardmgr[149]: socket 1: Anonymous Memory
cardmgr[149]: module memory_cs.o not available cardmgr[149]: executing: 'modprobe memory_cs'
cardmgr[149]: get dev info on socket 1 failed: Resource temporarily unavailable

Best result is with no patches, where it finds my cisco card.

Quoted 5 lines

Take a look at the archives again and see how Jeff setup config.opts on the target board. That was the key. The cardmgr is recognizing your card so it's reading the attribute memory successfully. You're almost there ;)

Quoted 6 lines

My configuration is based on his.
yes, it seems like it can access the attribute memory, but not the io memory.

I was vondering about the io addresses shown with lspci -v. Are they valid?

I think so, yes.

Pete

Quoted 13 lines

00:0d.0 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000fff
I/O window 1: 00000000-00000003
00:0d.1 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000003
I/O window 1: 00001000-00001fff

anyway, thanks a lot for helping
Jan

#6 lore raw
Quoted 3 lines

tried same with 64bit_pcmcia.patch
same result. I guess that the 36bit patch is included in this kernel?

I think so. I don't remember the date when Ralf applied the patch.

Quoted 5 lines

Tried 2.4.21 & 2.4.21-pre7 from kernel.org
They die when initializing pci.

Are there different versions of the 36bit-patch? Mine is named 36bit_addr_121302.patch

Well, I kept updating the patch and always put the latest one in my directory. But the updates were always minor -- just so the patch would apply cleanly. After Ralf checked it in, I removed it from my directory.

Pete

A message that is not in the archive (sent off-list or not yet received): 1055152798.17834.28.camel@jp

#8 lore raw
Quoted 4 lines · Jan Pedersen

found it!

the cardmgr has local cs_types.h & ss.h. Theese has to be patched as well...

Argh, I forgot about that. One of more of the ioctls sent to the driver are based on the actual data type. So after you apply the 64 bit pcmcia patch (which you do need), you also need to patch the cardmgr. Thanks for the reminder :) I have to update the README.

Pete

Quoted 82 lines

thanks for the help :-)

Quoted 76 lines · Pete Popov
Quoted 8 lines

I am not using linux-mips. I am using 2.4.19 directly from kernel.org. Some files are patched from mips-linux (non-pcmcia stuff).

Tried latest cvs version from linux-mips.org this weekend. By some reason I can't get any output on the serial port. If this kernel should work, maybe getting the serial-port to work on this is an easier task :-)

Take a look at the toplevel Makefile. I bet you got the head of linux-mips which is 2.5 and, yes, it's quite borked right now :) I've made some progress on the Pb1500 but until I get that board fully functioning, I won't update the rest. To get 2.4, do a "cvs update -rlinux_2_4".

Quoted 36 lines

On the other hand, everything else I need is currently working on 2.4.19 (including pci)

Tried to do the 64bit_pcmcia.patch alone. Same result:

Linux Kernel Card Services 3.1.22
options: [pci] [cardbus]
Yenta IRQ list 0000, PCI irq4
Socket status: 30000046
Yenta IRQ list 0000, PCI irq4
Socket status: 30000011
cardmgr[148]: watching 2 sockets
cardmgr[148]: could not adjust resource: IO ports 0xc00-0xcff: Invalid argument
cardmgr[148]: could not adjust resource: IO ports 0x100-0x4ff: Invalid argument
cardmgr[148]: could not adjust resource: memory 0x80000000-0x80ffffff:
Invalid argument
cardmgr[149]: starting, version is 3.2.4
Done.
cardmgr[cs: unable to map card memory!
14cs: unable to map card memory!
9]: initializing socket 1
cardmgr[149]: socket 1: Anonymous Memory
cardmgr[149]: module memory_cs.o not available cardmgr[149]: executing: 'modprobe memory_cs'
cardmgr[149]: get dev info on socket 1 failed: Resource temporarily unavailable

Best result is with no patches, where it finds my cisco card.

Quoted 5 lines

Take a look at the archives again and see how Jeff setup config.opts on the target board. That was the key. The cardmgr is recognizing your card so it's reading the attribute memory successfully. You're almost there ;)

Quoted 6 lines

My configuration is based on his.
yes, it seems like it can access the attribute memory, but not the io memory.

I was vondering about the io addresses shown with lspci -v. Are they valid?

I think so, yes.

Pete

Quoted 13 lines

00:0d.0 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000fff
I/O window 1: 00000000-00000003
00:0d.1 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000003
I/O window 1: 00001000-00001fff

anyway, thanks a lot for helping
Jan

#9 lore raw

You also should be careful about the way that your kernel is configured. For some reason, I remember that I was running into trouble with kernel configuration at some point.

I remember that the defconfig-pb1500 has some specific CPU options set that are required. I can't remember the dependency exactly, but it had something with MIPS32 CPU type, support for 64-bit phy addrs, and not overriding CPU instructions... anyway, here's what I have set in my 'CPU selection' section:

CONFIG_CPU_MIPS32=y
CONFIG_CPU_HAS_PREFETCH=y
CONFIG_64BIT_PHYS_ADDR=y
CONFIG_CPU_HAS_LLSC=y
CONFIG_CPU_HAS_SYNC=y

I don't know if this helps.

Good luck,

-Jeff

Quoted 97 lines · Pete Popov
Quoted 4 lines · Jan Pedersen

found it!

the cardmgr has local cs_types.h & ss.h. Theese has to be patched as well...

Argh, I forgot about that. One of more of the ioctls sent to the driver are based on the actual data type. So after you apply the 64 bit pcmcia patch (which you do need), you also need to patch the cardmgr. Thanks for the reminder :) I have to update the README.

Pete

Quoted 82 lines

thanks for the help :-)

Quoted 76 lines · Pete Popov
Quoted 8 lines

I am not using linux-mips. I am using 2.4.19 directly from kernel.org. Some files are patched from mips-linux (non-pcmcia stuff).

Tried latest cvs version from linux-mips.org this weekend. By some reason I can't get any output on the serial port. If this kernel should work, maybe getting the serial-port to work on this is an easier task :-)

Take a look at the toplevel Makefile. I bet you got the head of linux-mips which is 2.5 and, yes, it's quite borked right now :) I've made some progress on the Pb1500 but until I get that board fully functioning, I won't update the rest. To get 2.4, do a "cvs update -rlinux_2_4".

Quoted 36 lines

On the other hand, everything else I need is currently working on 2.4.19 (including pci)

Tried to do the 64bit_pcmcia.patch alone. Same result:

Linux Kernel Card Services 3.1.22
options: [pci] [cardbus]
Yenta IRQ list 0000, PCI irq4
Socket status: 30000046
Yenta IRQ list 0000, PCI irq4
Socket status: 30000011
cardmgr[148]: watching 2 sockets
cardmgr[148]: could not adjust resource: IO ports 0xc00-0xcff: Invalid argument
cardmgr[148]: could not adjust resource: IO ports 0x100-0x4ff: Invalid argument
cardmgr[148]: could not adjust resource: memory 0x80000000-0x80ffffff:
Invalid argument
cardmgr[149]: starting, version is 3.2.4
Done.
cardmgr[cs: unable to map card memory!
14cs: unable to map card memory!
9]: initializing socket 1
cardmgr[149]: socket 1: Anonymous Memory
cardmgr[149]: module memory_cs.o not available cardmgr[149]: executing: 'modprobe memory_cs'
cardmgr[149]: get dev info on socket 1 failed: Resource temporarily unavailable

Best result is with no patches, where it finds my cisco card.

Quoted 5 lines

Take a look at the archives again and see how Jeff setup config.opts on the target board. That was the key. The cardmgr is recognizing your card so it's reading the attribute memory successfully. You're almost there ;)

Quoted 6 lines

My configuration is based on his.
yes, it seems like it can access the attribute memory, but not the io memory.

I was vondering about the io addresses shown with lspci -v. Are they valid?

I think so, yes.

Pete

Quoted 13 lines

00:0d.0 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000fff
I/O window 1: 00000000-00000003
00:0d.1 Class 0607: 104c:ac55 (rev 01)
I/O window 0: 00000000-00000003
I/O window 1: 00001000-00001fff

anyway, thanks a lot for helping
Jan

Signature · 7 lines
         Jeffrey Baitis - Associate Software Engineer

                    Evolution Robotics, Inc.
                     130 West Union Street
                       Pasadena CA 91103

 tel: 626.535.2776  |  fax: 626.535.2777  |  [email protected]