diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2011-01-31 13:47:08 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-04 16:29:48 -0500 |
commit | 78fc800f06a72c25842e585fd747fa6a98f3f0e5 (patch) | |
tree | 2c71d432229c54b0efb3103f04815c9f74e9ca1b /drivers/net/wireless/zd1211rw/zd_usb.h | |
parent | 681d119047761cc59a15c0bb86891f3a878997cf (diff) |
zd1211rw: use urb anchors for tx and fix tx-queue disabling
When stress testing AP-mode I hit OOPS when unpluging or rmmodding
driver.
It appears that when tx-queue is disabled, tx-urbs might be left pending.
These can cause ehci to call non-existing tx_urb_complete() (after rmmod)
or uninitialized/reseted private structure (after disconnect()). Add skb
queue for submitted packets and unlink pending urbs on zd_usb_disable_tx().
Part of the problem seems to be usb->free_urb_list that isn't always
working as it should, causing machine freeze when trying to free the list
in zd_usb_disable_tx(). Caching free urbs isn't what other drivers seem
to be doing (usbnet for example) so strip free_usb_list.
Patch makes tx-urb handling saner with use of urb anchors.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_usb.h')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.h b/drivers/net/wireless/zd1211rw/zd_usb.h index 1b1655cb7cb..233ce825b71 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.h +++ b/drivers/net/wireless/zd1211rw/zd_usb.h | |||
@@ -184,18 +184,18 @@ struct zd_usb_rx { | |||
184 | 184 | ||
185 | /** | 185 | /** |
186 | * struct zd_usb_tx - structure used for transmitting frames | 186 | * struct zd_usb_tx - structure used for transmitting frames |
187 | * @enabled: atomic enabled flag, indicates whether tx is enabled | ||
187 | * @lock: lock for transmission | 188 | * @lock: lock for transmission |
188 | * @free_urb_list: list of free URBs, contains all the URBs, which can be used | 189 | * @submitted: anchor for URBs sent to device |
189 | * @submitted_urbs: atomic integer that counts the URBs having sent to the | 190 | * @submitted_urbs: atomic integer that counts the URBs having sent to the |
190 | * device, which haven't been completed | 191 | * device, which haven't been completed |
191 | * @enabled: enabled flag, indicates whether tx is enabled | ||
192 | * @stopped: indicates whether higher level tx queues are stopped | 192 | * @stopped: indicates whether higher level tx queues are stopped |
193 | */ | 193 | */ |
194 | struct zd_usb_tx { | 194 | struct zd_usb_tx { |
195 | atomic_t enabled; | ||
195 | spinlock_t lock; | 196 | spinlock_t lock; |
196 | struct list_head free_urb_list; | 197 | struct usb_anchor submitted; |
197 | int submitted_urbs; | 198 | int submitted_urbs; |
198 | int enabled; | ||
199 | int stopped; | 199 | int stopped; |
200 | }; | 200 | }; |
201 | 201 | ||