]> git.baikalelectronics.ru Git - kernel.git/commit
rt2x00: Place mutex around USB register access
authorAdam Baker <linux@baker-net.org.uk>
Sat, 27 Oct 2007 11:43:29 +0000 (13:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:03:03 +0000 (15:03 -0800)
commit9c0909e853961e1e3a14705cfcde4b29ae0dd78d
tree790b3fcc6ccee693d9ac343626d1296c736a7851
parent9e95300eeecdd72a9b36bb5a39e14bcfe14c7b52
rt2x00: Place mutex around USB register access

There is a buffer, csr_cache which is used to hold copies of data being passed
to the USB stack which can get corrupted if multiple threads attempt to access
CSR registers simultaneously. There is also the possibility if multiple
threads try to access BBP or RF registers for the multiple USB operations
needed to get interleaved leading to incorrect results. This patch introduces
a mutex to prevent such simultaneous access. The interleaved access problem
may also affect the PCI devices but if so that will be handled in a follow-up
patch.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00usb.c
drivers/net/wireless/rt2x00/rt2x00usb.h
drivers/net/wireless/rt2x00/rt73usb.c