summaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/i2400m-sdio.h
diff options
context:
space:
mode:
authorCindy H Kao <cindy.h.kao@intel.com>2010-01-30 01:26:54 -0800
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-11 14:04:46 -0700
commitf22cf689a6353f072bca15d0a26f870e62dfacf8 (patch)
tree5a6a4907184bfa09aac6727030a501c3b8447a38 /drivers/net/wimax/i2400m/i2400m-sdio.h
parent570eb0ea65db625e0b11ca97f4ae857bc1193250 (diff)
downloadblackbird-op-linux-f22cf689a6353f072bca15d0a26f870e62dfacf8.tar.gz
blackbird-op-linux-f22cf689a6353f072bca15d0a26f870e62dfacf8.zip
wimax/i2400m: fix the race condition for accessing TX queue
The race condition happens when the TX queue is accessed by the TX work while the same TX queue is being destroyed because a bus reset is triggered either by debugfs entry or simply by failing waking up the device from WiMAX IDLE mode. This fix is to prevent the TX queue from being accessed by multiple threads Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/i2400m-sdio.h')
-rw-r--r--drivers/net/wimax/i2400m/i2400m-sdio.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/i2400m-sdio.h b/drivers/net/wimax/i2400m/i2400m-sdio.h
index b9c4bed3b457..360d4fb195f4 100644
--- a/drivers/net/wimax/i2400m/i2400m-sdio.h
+++ b/drivers/net/wimax/i2400m/i2400m-sdio.h
@@ -99,7 +99,10 @@ enum {
*
* @tx_workqueue: workqeueue used for data TX; we don't use the
* system's workqueue as that might cause deadlocks with code in
- * the bus-generic driver.
+ * the bus-generic driver. The read/write operation to the queue
+ * is protected with spinlock (tx_lock in struct i2400m) to avoid
+ * the queue being destroyed in the middle of a the queue read/write
+ * operation.
*
* @debugfs_dentry: dentry for the SDIO specific debugfs files
*
OpenPOWER on IntegriCloud