Atheros AR6003 SDIO WiFi Integration: Difference between revisions

m
Line 476: Line 476:
ar6000_target_failure: target asserted
ar6000_target_failure: target asserted
</pre>
</pre>
=== task kmmcd blocked for more than 120 seconds ===
From the backtrace below, you find:
[<c02388d8>] (sdio_memcpy_toio+0x0/0x30) from [<bf001c00>] (async_task+0x444/0x78c [ar6000])
Using arm-none-linux-gnueabi-objdump you can identify where in the ar6k driver the call is being made to sdio_memcpy_toio() that is waiting for the interrupt that never occurs:
arm-none-linux-gnueabi-objdump -d -S $DEVDIR/proprietary/ar6k/src/host/os/linux/ar6000.o | less -p sdio_memcpy_toio
You will find something like
    1bfc:      ebfffffe        bl      0 <sdio_memcpy_toio>
a similar search for async_task turns up
000017bc <async_task>:
where 0x17bc + 0x444 = 0x1bfa which is 4 greater than the call to sdio_memcpy_toio(), thus being the return address that is used after the call.
Looking in the source code (around line 263), we find only $DEVDIR/proprietary/ar6k/src/host/hif/sdio/linux_sdio/src/hif.c contains a call to sdio_memcpy_toio():
<pre>
            if (opcode == CMD53_FIXED_ADDRESS) {
                ret = sdio_writesb(device->func, address, tbuffer, length);
                AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: writesb ret=%d address: 0x%X, len: %d, 0x%X\n",
  ret, address, length, *(int *)tbuffer));
            } else {
                ret = sdio_memcpy_toio(device->func, address, tbuffer, length);
                AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: writeio ret=%d address: 0x%X, len: %d, 0x%X\n",
  ret, address, length, *(int *)tbuffer));
            }
</pre>
with the backtrace that started all of this analysis being:
<pre>
ar6000_init() WMI is ready
INFO: task kmmcd:194 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kmmcd        D c02ec9e8    0  194      2 0x00000000
Backtrace:
[<c02ec6f8>] (schedule+0x0/0x380) from [<c02331f0>] (__mmc_claim_host+0xc8/0x190)
[<c0233128>] (__mmc_claim_host+0x0/0x190) from [<c02374dc>] (mmc_sdio_detect+0x30/0x74)
[<c02374ac>] (mmc_sdio_detect+0x0/0x74) from [<c023386c>] (mmc_rescan+0x8c/0x314)
r5:60000013 r4:c5116800
[<c02337e0>] (mmc_rescan+0x0/0x314) from [<c0053cc8>] (worker_thread+0x134/0x1f0)
r6:c50639a0 r5:c5116938 r4:c511693c
[<c0053b94>] (worker_thread+0x0/0x1f0) from [<c0057770>] (kthread+0x88/0x90)
[<c00576e8>] (kthread+0x0/0x90) from [<c0044cfc>] (do_exit+0x0/0x640)
r7:00000000 r6:00000000 r5:00000000 r4:00000000
INFO: task AR6K Async:1100 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
AR6K Async    D c02ec9e8    0  1100      2 0x00000000
Backtrace:
[<c02ec6f8>] (schedule+0x0/0x380) from [<c02ed0a0>] (schedule_timeout+0x20/0x1f4)
[<c02ed080>] (schedule_timeout+0x0/0x1f4) from [<c02ecefc>] (wait_for_common+0xf4/0x1bc)
r7:7fffffff r6:c548be54 r5:c509f5e0 r4:c548be10
[<c02ece08>] (wait_for_common+0x0/0x1bc) from [<c02ed054>] (wait_for_completion+0x18/0x1c)
[<c02ed03c>] (wait_for_completion+0x0/0x1c) from [<c0233bfc>] (mmc_wait_for_req+0x108/0x118)
[<c0233af4>] (mmc_wait_for_req+0x0/0x118) from [<c023769c>] (mmc_io_rw_extended+0x17c/0x1e4)
r5:c548be7c r4:c548bed4
[<c0237520>] (mmc_io_rw_extended+0x0/0x1e4) from [<c0238848>] (sdio_io_rw_ext_helper+0x154/0x18c)
[<c02386f4>] (sdio_io_rw_ext_helper+0x0/0x18c) from [<c0238900>] (sdio_memcpy_toio+0x28/0x30)
[<c02388d8>] (sdio_memcpy_toio+0x0/0x30) from [<bf001c00>] (async_task+0x444/0x78c [ar6000])
[<bf0017bc>] (async_task+0x0/0x78c [ar6000]) from [<c0057770>] (kthread+0x88/0x90)
[<c00576e8>] (kthread+0x0/0x90) from [<c0044cfc>] (do_exit+0x0/0x640)
r7:00000000 r6:00000000 r5:00000000 r4:00000000
<pre>