summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm73.c
diff options
context:
space:
mode:
authorCindy H Kao <cindy.h.kao@intel.com>2010-04-23 17:19:06 -0700
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-11 14:05:55 -0700
commitd94401742dc662747db5bb9e444d353a4feba018 (patch)
tree1fa229f7d23b09b7b4c4e0262ed8e4e232876c26 /drivers/hwmon/lm73.c
parent2354161dd33b204d36caa0bc48c95cc6c1a984fb (diff)
downloadblackbird-op-linux-d94401742dc662747db5bb9e444d353a4feba018.tar.gz
blackbird-op-linux-d94401742dc662747db5bb9e444d353a4feba018.zip
wimax/i2400m: Reset the TX FIFO indices when allocating the TX FIFO in tx_setup()
This patch makes sure whenever tx_setup() is invoked during driver initialization or device reset where TX FIFO is released and re-allocated, the indices tx_in, tx_out, tx_msg_size, tx_sequence, tx_msg are properly initialized. When a device reset happens and the TX FIFO is released/re-allocated, a new block of memory may be allocated for the TX FIFO, therefore tx_msg should be cleared so that no any TX threads (tx_worker, tx) would access to the out-of-date addresses. Also, the TX threads use tx_in and tx_out to decide where to put the new host-to-device messages and from where to copy them to the device HW FIFO, these indices have to be cleared so after the TX FIFO is re-allocated during the reset, the indices both refer to the head of the FIFO, ie. a new start. The same rational applies to tx_msg_size and tx_sequence. To protect the indices from being accessed by multiple threads simultaneously, the lock tx_lock has to be obtained before the initializations and released afterwards. Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
Diffstat (limited to 'drivers/hwmon/lm73.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud