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>
This commit is contained in:
David Vrabel
2008-11-25 14:23:40 +00:00
parent 65d76f3682
commit 56968d0c1a
4 changed files with 71 additions and 30 deletions

View File

@@ -484,21 +484,15 @@ static void __wusbhc_keep_alive(struct wusbhc *wusbhc)
*/
static void wusbhc_keep_alive_run(struct work_struct *ws)
{
struct delayed_work *dw =
container_of(ws, struct delayed_work, work);
struct wusbhc *wusbhc =
container_of(dw, struct wusbhc, keep_alive_timer);
struct delayed_work *dw = container_of(ws, struct delayed_work, work);
struct wusbhc *wusbhc = container_of(dw, struct wusbhc, keep_alive_timer);
d_fnstart(5, wusbhc->dev, "(wusbhc %p)\n", wusbhc);
if (wusbhc->active) {
mutex_lock(&wusbhc->mutex);
__wusbhc_keep_alive(wusbhc);
mutex_unlock(&wusbhc->mutex);
queue_delayed_work(wusbd, &wusbhc->keep_alive_timer,
(wusbhc->trust_timeout * CONFIG_HZ)/1000/2);
}
d_fnend(5, wusbhc->dev, "(wusbhc %p) = void\n", wusbhc);
return;
mutex_lock(&wusbhc->mutex);
__wusbhc_keep_alive(wusbhc);
mutex_unlock(&wusbhc->mutex);
queue_delayed_work(wusbd, &wusbhc->keep_alive_timer,
msecs_to_jiffies(wusbhc->trust_timeout / 2));
}
/*