aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/whci/pzl.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-06-24 13:26:40 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:21 -0400
commit831baa4915de465357b25c471bbb9b36472024df (patch)
treeb28e8365e77defb84ba1437993b64be753274ead /drivers/usb/host/whci/pzl.c
parent586dfc8cafc25cf785332fdfe9530f392e26f30d (diff)
USB: whci-hcd: make endpoint_reset method async
usb_hcd_endpoint_reset() may be called in atomic context and must not sleep. So make whci-hcd's endpoint_reset() asynchronous. URBs submitted while the reset is in progress will be queued (on the std list) and transfers will resume once the reset is complete. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/whci/pzl.c')
-rw-r--r--drivers/usb/host/whci/pzl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/usb/host/whci/pzl.c b/drivers/usb/host/whci/pzl.c
index ff4ef9e910d9..a9e05bac6646 100644
--- a/drivers/usb/host/whci/pzl.c
+++ b/drivers/usb/host/whci/pzl.c
@@ -255,11 +255,21 @@ void scan_periodic_work(struct work_struct *work)
255 /* 255 /*
256 * Now that the PZL is updated, complete the removal of any 256 * Now that the PZL is updated, complete the removal of any
257 * removed qsets. 257 * removed qsets.
258 *
259 * If the qset was to be reset, do so and reinsert it into the
260 * PZL if it has pending transfers.
258 */ 261 */
259 spin_lock_irq(&whc->lock); 262 spin_lock_irq(&whc->lock);
260 263
261 list_for_each_entry_safe(qset, t, &whc->periodic_removed_list, list_node) { 264 list_for_each_entry_safe(qset, t, &whc->periodic_removed_list, list_node) {
262 qset_remove_complete(whc, qset); 265 qset_remove_complete(whc, qset);
266 if (qset->reset) {
267 qset_reset(whc, qset);
268 if (!list_empty(&qset->stds)) {
269 qset_insert_in_sw_list(whc, qset);
270 queue_work(whc->workqueue, &whc->periodic_work);
271 }
272 }
263 } 273 }
264 274
265 spin_unlock_irq(&whc->lock); 275 spin_unlock_irq(&whc->lock);
@@ -295,7 +305,7 @@ int pzl_urb_enqueue(struct whc *whc, struct urb *urb, gfp_t mem_flags)
295 else 305 else
296 err = qset_add_urb(whc, qset, urb, GFP_ATOMIC); 306 err = qset_add_urb(whc, qset, urb, GFP_ATOMIC);
297 if (!err) { 307 if (!err) {
298 if (!qset->in_sw_list) 308 if (!qset->in_sw_list && !qset->remove)
299 qset_insert_in_sw_list(whc, qset); 309 qset_insert_in_sw_list(whc, qset);
300 } else 310 } else
301 usb_hcd_unlink_urb_from_ep(&whc->wusbhc.usb_hcd, urb); 311 usb_hcd_unlink_urb_from_ep(&whc->wusbhc.usb_hcd, urb);