]> git.baikalelectronics.ru Git - kernel.git/commit
ath6kl: Use mutex to protect dma buffer in sync read write
authorRaja Mani <rmani@qca.qualcomm.com>
Mon, 21 Nov 2011 06:56:51 +0000 (12:26 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 21 Nov 2011 17:47:09 +0000 (19:47 +0200)
commit9ba85aa629fd2636a7a392033c7fac39324c6f0d
treed4ba939df1f47b62d1bb251c66e0c10da771d0f0
parent84a26909fb5019cf60fbfebcd1b09d495266b0c6
ath6kl: Use mutex to protect dma buffer in sync read write

Firmware crashes while starting Soft AP in 32 bit x86 platform.
The reason is that the single dma buffer (ar_sdio->dma_buffer)
is used in ath6kl_sdio_read_write_sync() for unaligned buffer
handling and this function is called in the multiple context
at the same time. So, finally hits dma buffer corruption and
firmware crash.

Mutex is used to protect dma buffer to avoid data corruption.
Spin lock can not used to fix this issue since mmc stack
read/write calls may for sleep.

Observed this issue with recently commited patch
"ath6kl: Claim sdio function only at appropriate places"
1c7457a4fe4731bd93636f763ea083ac29ab247a

kvalo: change name of mutex to more descriptive and add a comment
about what it protects

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/sdio.c