aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore/devconnect.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-11-25 09:23:40 -0500
committerDavid Vrabel <david.vrabel@csr.com>2008-11-25 09:23:40 -0500
commit56968d0c1a920eb165c06318f5c458724e1df0af (patch)
tree9516fdc8ef8bc67bf6a51a1e4940d3ae59008dfa /drivers/usb/wusbcore/devconnect.c
parent65d76f368295973a35d195c9b13053502a67b6bc (diff)
wusb: whci-hcd shouldn't do ASL/PZL updates while channel is inactive
ASL/PZL updates while the WUSB channel is inactive (i.e., the PZL and ASL are stopped) may not complete. This causes hangs when removing the whci-hcd module if a device is still connected (removing the device does an endpoint_disable which results in an ASL update to remove the qset). If the WUSB channel is inactive the update can simply be skipped as the WHC doesn't care about the state of the ASL/PZL. Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/usb/wusbcore/devconnect.c')
-rw-r--r--drivers/usb/wusbcore/devconnect.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c
index 08a1ec90386..26cbc89ea28 100644
--- a/drivers/usb/wusbcore/devconnect.c
+++ b/drivers/usb/wusbcore/devconnect.c
@@ -484,21 +484,15 @@ static void __wusbhc_keep_alive(struct wusbhc *wusbhc)
484 */ 484 */
485static void wusbhc_keep_alive_run(struct work_struct *ws) 485static void wusbhc_keep_alive_run(struct work_struct *ws)
486{ 486{
487 struct delayed_work *dw = 487 struct delayed_work *dw = container_of(ws, struct delayed_work, work);
488 container_of(ws, struct delayed_work, work); 488 struct wusbhc *wusbhc = container_of(dw, struct wusbhc, keep_alive_timer);
489 struct wusbhc *wusbhc = 489
490 container_of(dw, struct wusbhc, keep_alive_timer); 490 mutex_lock(&wusbhc->mutex);
491 491 __wusbhc_keep_alive(wusbhc);
492 d_fnstart(5, wusbhc->dev, "(wusbhc %p)\n", wusbhc); 492 mutex_unlock(&wusbhc->mutex);
493 if (wusbhc->active) { 493
494 mutex_lock(&wusbhc->mutex); 494 queue_delayed_work(wusbd, &wusbhc->keep_alive_timer,
495 __wusbhc_keep_alive(wusbhc); 495 msecs_to_jiffies(wusbhc->trust_timeout / 2));
496 mutex_unlock(&wusbhc->mutex);
497 queue_delayed_work(wusbd, &wusbhc->keep_alive_timer,
498 (wusbhc->trust_timeout * CONFIG_HZ)/1000/2);
499 }
500 d_fnend(5, wusbhc->dev, "(wusbhc %p) = void\n", wusbhc);
501 return;
502} 496}
503 497
504/* 498/*