DWL-650P and PCMCIA bridges

Pavel Roskin proski
Thu Jan 22 09:24:19 PST 2004


Hello!

It appears that the problems I see with DWL-650P are closely related to
the PCI-to-PCMCIA bridges.  DWL-650P works fine with hostap_cs in the PLX
adapter using the plx9052 driver
(http://www.red-bean.com/~proski/plx9052/)

As I wrote yesterday, DWL-650P also works with the hostap_plx driver with
minimal changes.  However, I still cannot get DWL-650P to work in TI and
Ricoh bridges.

I preload hostap_cs with no_primary=1 before the card is loaded.  That's
what I have with Ricoh RL5c476 (only kernel messages are shown):

# cardctl insert
hostap_cs: setting Vcc=33 (constant)
hostap_cs: CS_EVENT_CARD_INSERTION
hostap_cs: setting Vcc=50 (from config)
Checking CFTABLE_ENTRY 0x01 (default 0x01)
IO window settings: cfg->io.nwin=1 dflt.io.nwin=1
io->flags = 0x0047, io.base=0x0000, len=128
hostap_cs: Registered netdevice wifi0
hostap_cs: index 0x01: Vcc 5.0, irq 5, io 0x0200-0x027f
hostap_cs: assuming no Primary image in flash - card initialization not
completed
wifi0: test Genesis mode with HCR 0x1f
prism2_pccard_cor_sreset: original COR 41
prism2_pccard_genesis_reset: original COR 41
Readback test failed, HCR 0x1f write 00 e1 a1 ff read 00 ce a1 ce
wifi0: test Genesis mode with HCR 0x0f
prism2_pccard_cor_sreset: original COR 41
prism2_pccard_genesis_reset: original COR 41
Readback test succeeded, HCR 0x0f
prism2_pccard_genesis_reset: original COR 41
wifi0: registered netdevice wlan0
wlan0: could not set interface UP - no PRI f/w

# prism2_srec -gs wlan0 /usr/local/share/prism-fw/primary/pm010102.hex
prism2_download: dl_cmd=4 start_addr=0x003f0000 num_areas=3
  area 0: addr=0x007e0000 len=2352 ptr=0x08053378
  area 1: addr=0x007e0a00 len=2520 ptr=0x08053cb0
  area 2: addr=0x007e17fe len=2 ptr=0x08054690
wifi0: no PRI f/w - assuming Aux port is already enabled
wifi0: test Genesis mode with HCR 0x0f
prism2_pccard_cor_sreset: original COR 41
prism2_pccard_genesis_reset: original COR 41
Readback test succeeded, HCR 0x0f
wifi0: Writing 2352 bytes at 0x007e0000
wifi0: Writing 2520 bytes at 0x007e0a00
wifi0: Writing 2 bytes at 0x007e17fe
Disable genesis mode
prism2_pccard_genesis_reset: original COR 41
Trying to initialize card
wifi0: init command completed too quickly - retrying
prism2_hw_init: initialized in 4 ms
Card initialized - running PRI only
hostap_cs: assuming no Primary image in flash - card initialization not
completed
Initialization failed

In other words, the card cannot be initialized after the firmware is
loaded.  The primary firmware doesn't respond.

Texas Instruments PCI1410 exhibits a different problem:

# cardctl insert
hostap_cs: setting Vcc=33 (constant)
hostap_cs: CS_EVENT_CARD_INSERTION
hostap_cs: setting Vcc=50 (from config)
Checking CFTABLE_ENTRY 0x01 (default 0x01)
IO window settings: cfg->io.nwin=1 dflt.io.nwin=1
io->flags = 0x0047, io.base=0x0000, len=128
hostap_cs: Registered netdevice wifi0
hostap_cs: index 0x01: Vcc 5.0, irq 5, io 0x0200-0x027f
hostap_cs: assuming no Primary image in flash - card initialization not
completed
wifi0: test Genesis mode with HCR 0x1f
prism2_pccard_cor_sreset: original COR 41
prism2_pccard_genesis_reset: original COR 41
Readback test failed, HCR 0x1f write 00 e1 a1 ff read 00 ce a1 ce
wifi0: test Genesis mode with HCR 0x0f
prism2_pccard_cor_sreset: original COR 41
prism2_pccard_genesis_reset: original COR 41
Readback test succeeded, HCR 0x0f
prism2_pccard_genesis_reset: original COR 41
wifi0: registered netdevice wlan0
wlan0: could not set interface UP - no PRI f/w

# prism2_srec -gs wlan0 /usr/local/share/prism-fw/primary/pm010102.hex
prism2_download: dl_cmd=4 start_addr=0x003f0000 num_areas=3
  area 0: addr=0x007e0000 len=2352 ptr=0x08053378
  area 1: addr=0x007e0a00 len=2520 ptr=0x08053cb0
  area 2: addr=0x007e17fe len=2 ptr=0x08054690
wifi0: no PRI f/w - assuming Aux port is already enabled
wifi0: test Genesis mode with HCR 0x0f
prism2_pccard_cor_sreset: original COR 41
prism2_pccard_genesis_reset: original COR 41
Readback test succeeded, HCR 0x0f
wifi0: Writing 2352 bytes at 0x007e0000
wifi0: Writing 2520 bytes at 0x007e0a00
wifi0: Writing 2 bytes at 0x007e17fe
Disable genesis mode
prism2_pccard_genesis_reset: original COR 41
Trying to initialize card
wifi0: init command completed too quickly - retrying
prism2_hw_init: initialized in 1 ms
Card initialized - running PRI only
wifi0: init command completed too quickly - retrying
prism2_hw_init: initialized in 1 ms
prism2_enable_aux_port(1) timed out
wifi0: trying to read PDA from 0x007f0000: failed
wifi0: trying to read PDA from 0x003f0000: failed
wifi0: trying to read PDA from 0x00390000: failed
wifi0: trying to read PDA from 0x007f0002: OK
prism2_enable_aux_port: was not enabled!?
wifi0: hfa384x_cmd_issue: cmd reg was busy for 2 usec
wifi0: NIC: id=0x8000 v0.0.1
wifi0: hfa384x_cmd_issue: cmd reg was busy for 13 usec
wifi0: PRI: id=0x15 v1.1.2
wifi0: hfa384x_cmd_issue: cmd reg was busy for 62 usec
Could not get RID for component STA
wifi0: Failed to read STA f/w version - only Primary f/w present

# prism2_srec -gip wlan0 /usr/local/share/prism-fw/primary/pm010102.hex
wifi0: hfa384x_cmd_issue: cmd reg was busy for 3 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 7 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 3 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 87 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 3 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 9 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 19 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 11 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 9 usec
wifi0: hfa384x_cmd_issue: cmd reg was busy for 3 usec

In this case, the firmware actually works (initially at least) and reports
its version.  However, something strange is going on.  I mean following
lines:

init command completed too quickly - retrying
prism2_enable_aux_port(1) timed out
wifi0: hfa384x_cmd_issue: cmd reg was busy for 62 usec

Also, PDA is read incorrectly.  When using the PLX adapter, it's found
at 0x007f0000, not at 0x007f0002.  When loading the primary firmware
again, PDA cannot be read at all.  All I see is timeouts.  prism2_srec
reports "PDA checksum incorrect".

I'm using CVS HostAP with two changes:

1) prism2_pccard_cor_sreset() uses 10ms delays, not 1ms.  Otherwise the
card freezes the system in the Ricoh adapter after printing this:

prism2_pccard_cor_sreset: original COR 20

2) prism2_interrupt() has been changes to return IRQ_HANDLED always.
Otherwise the IRQ is disabled when the Ricoh bridge is used.

All this was observed on a Pentium-III system with serial console running
Linux 2.6.2-rc1.

My best guess at the moment is that some other PDRs need to be plugged to
make the card compatible with the true PCMCIA interfaces.  It would be
great to have support for reading PDA from file in prism2_srec and saving
it as a file, ideally in the same format as prism2dl.

-- 
Regards,
Pavel Roskin




More information about the Hostap mailing list