]> git.baikalelectronics.ru Git - kernel.git/commit
wlcore: read FW logs from FW memory on watchdog recovery
authorIgal Chernobelsky <igalc@ti.com>
Mon, 18 Jun 2012 08:05:39 +0000 (11:05 +0300)
committerLuciano Coelho <coelho@ti.com>
Thu, 21 Jun 2012 13:48:19 +0000 (16:48 +0300)
commitdba353a83ccbd3047259eccb3c4f6f6476daf328
treeff42072e110cc10da42990579540e61a63a82258
parenta18a4bea8f4763cdc4e2f30e295e32d63477af0b
wlcore: read FW logs from FW memory on watchdog recovery

FW uses a few memory blocks as a buffer to accumulate FW logs before
transmitting them to the host over SDIO. When FW WatchDog recovery
occurs, the last FW traces are still pending in the buffer. Driver is
to read these FW traces whether log mode is continuous or on demand.

FW memory blocks allocated for the log buffer are handled as a link list:
the first 4 bytes in each memory block contain FW address to the next block.
The end of list condition depends on FW log mode:
- on demand: the list is cyclic, the next address is equal to the first address
- continuous: the address is  equal to 0x2000000

Log data resides inside FW memory block with offset depending on
logger mode:
- on demand:  4 bytes (address of the next memory block)
- continuous: 4 bytes and Rx Descriptor structure size

Described FW logger API is backward compatible with previous FW versions.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wlcore/main.c