]> git.baikalelectronics.ru Git - kernel.git/commit
cw1200: Prevent a lock-related hang in the cw1200_spi driver
authorSolomon Peachy <pizza@shaftnet.org>
Wed, 28 Aug 2013 00:29:47 +0000 (20:29 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Sep 2013 18:40:54 +0000 (14:40 -0400)
commit1907c4ac08b830c90ea300175709ba305dbee0ad
treebb22dd1b9f6e5b442d3c6c2bad87476baa4b9e0f
parent6f195fdbc7639f143a5adb28b5fd7f362b2e8fc7
cw1200: Prevent a lock-related hang in the cw1200_spi driver

The cw1200_spi driver tries to mirror the cw1200_sdio driver's lock
API, which relies on sdio_claim_host/sdio_release_host to serialize
hardware operations across multiple threads.

Unfortunately the implementation was flawed, as it lacked a way to wake
up the lock requestor when there was contention, often resulting in a
hang.

This problem was uncovered while trying to fix the
spi-transfers-in-interrupt-context BUG() corrected in the previous
patch.  Many thanks to Dave Sizeburns for his assistance in fixing this.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/cw1200/cw1200_spi.c