Skip to contentSkip to conversation

ATH6KL lockup during init

DISCUSSION Brent Taylor 4 participants 6 messages Jul 26, 2011 – Sep 13, 2011

lore
Share & tools
lore
#0 lore raw

I’m a developer working with the Atheros AR6003 Wireless LAN chip. I recently updated the Linux kernel on my custom board to 3.0.0 and pulled the latest snapshot of the ath6kl driver from
http://git.kernel.org/?p=linux/kernel/git/kvalo/ath6kl-cleanup.git;a=summary (as of 2011-07-25). I’m also using the latest firmware images from
http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ath6k.tar.gz as recommended by
http://wireless.kernel.org/en/users/Drivers/ath6kl?highlight=%28ar6003%29.

After running 'insmod ath6kl.ko', the command line hangs. I’ve narrowed down the execution path to the function ath6kl_bmi_get_rx_lkahd (called from ath6kl_bmi_exeute after loading the OPT firmware). The parameter value of "need_timeout" is set to false. Without this timeout the function never returns. The call to ath6kl_hif_read_write_sync always returns 0, and the value of rx_word is always 0.

My question is: What would cause the read from address RX_LOOKAHEAD_VALID_ADDRESS to always return a value of 0?

My custom board is using an atmel at91sam9g45 microprocessor using the SDIO bus on mci1. Any information would be greatly appreciated.

Thanks,
Brent Taylor
Senior Software Developer
Applied Technology Department of Motorola Solutions [email protected]

#1 lore raw
Quoted 9 lines · Brent Taylor

I’m a developer working with the Atheros AR6003 Wireless LAN chip. I recently updated the Linux kernel on my custom board to 3.0.0 and pulled the latest snapshot of the ath6kl driver from
http://git.kernel.org/?p=linux/kernel/git/kvalo/ath6kl-cleanup.git;a=summary (as of 2011-07-25). I’m also using the latest firmware images from
http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ath6k.tar.gz as recommended by
http://wireless.kernel.org/en/users/Drivers/ath6kl?highlight=%28ar6003%29.

These are fine.

Quoted 9 lines

After running 'insmod ath6kl.ko', the command line hangs. I’ve narrowed down the execution path to the function ath6kl_bmi_get_rx_lkahd (called from ath6kl_bmi_exeute after loading the OPT firmware). The parameter value of "need_timeout" is set to false. Without this timeout the function never returns. The call to ath6kl_hif_read_write_sync always returns 0, and the value of rx_word is always 0.

My question is: What would cause the read from address RX_LOOKAHEAD_VALID_ADDRESS to always return a value of 0?

Odd, we have never seen this sort of issues. Can you please give the kernel debug output with BMI debug enabled (debug_mask=0x10).

Vasanth

#3 lore raw
Quoted 2 lines · Brent Taylor

Fixed ... realized that I was using the wrong firmware images. I was using an older image from AR6K_FW.3.0_RC.233.

Good that your issue was solved and thanks for letting us now. But nevertheless the driver should not lockup in there's a problem with firmware, ath6kl is definitely buggy here.

Signature · 1 line
Kalle Valo
#4 lore raw
Quoted 10 lines · Kalle Valo
Quoted 2 lines · Brent Taylor

Fixed ... realized that I was using the wrong firmware images. I was using an older image from AR6K_FW.3.0_RC.233.

Good that your issue was solved and thanks for letting us now. But nevertheless the driver should not lockup in there's a problem with firmware, ath6kl is definitely buggy here.

My lockup (due to wrong firmware) was caused by the function ath6kl_bmi_get_lkahd in bmi.c. The function was called with the parameter "need_timeout = false". This causes the while loop to wait for a response from the chip. Since the wrong firmware image was used, the chip will never respond.

Is it possible for the ath6kl driver to somehow read the firmware version from the firmware file before sending it to the chip?

-- Brent

#5 lore raw

Hi Brent,

Quoted 8 lines · Brent Taylor
Quoted 6 lines · Kalle Valo
Quoted 2 lines · Brent Taylor

Fixed ... realized that I was using the wrong firmware images. I was using an older image from AR6K_FW.3.0_RC.233.

Quoted 8 lines
Quoted 3 lines

Good that your issue was solved and thanks for letting us now. But nevertheless the driver should not lockup in there's a problem with firmware, ath6kl is definitely buggy here.

My lockup (due to wrong firmware) was caused by the function ath6kl_bmi_get_lkahd in bmi.c. The function was called with the parameter "need_timeout = false". This causes the while loop to wait for a response from the chip. Since the wrong firmware image was used, the chip will never respond.

Thanks for the analysis. Yesterday I submitted a patch for review which will fix this.

Quoted 2 lines

Is it possible for the ath6kl driver to somehow read the firmware version from the firmware file before sending it to the chip?

Not right now. But in the new firmware image format (for which I also sent patches yesterday) we can do that. You can even check the firmware just with the strings command.

Thank you for the feedback, I appreciate it.

Kalle