diff options
Diffstat (limited to 'drivers/usb/host/whci/asl.c')
-rw-r--r-- | drivers/usb/host/whci/asl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/host/whci/asl.c b/drivers/usb/host/whci/asl.c index 577c0d29849d..958751ccea43 100644 --- a/drivers/usb/host/whci/asl.c +++ b/drivers/usb/host/whci/asl.c | |||
@@ -170,12 +170,17 @@ void asl_stop(struct whc *whc) | |||
170 | void asl_update(struct whc *whc, uint32_t wusbcmd) | 170 | void asl_update(struct whc *whc, uint32_t wusbcmd) |
171 | { | 171 | { |
172 | struct wusbhc *wusbhc = &whc->wusbhc; | 172 | struct wusbhc *wusbhc = &whc->wusbhc; |
173 | long t; | ||
173 | 174 | ||
174 | mutex_lock(&wusbhc->mutex); | 175 | mutex_lock(&wusbhc->mutex); |
175 | if (wusbhc->active) { | 176 | if (wusbhc->active) { |
176 | whc_write_wusbcmd(whc, wusbcmd, wusbcmd); | 177 | whc_write_wusbcmd(whc, wusbcmd, wusbcmd); |
177 | wait_event(whc->async_list_wq, | 178 | t = wait_event_timeout( |
178 | (le_readl(whc->base + WUSBCMD) & WUSBCMD_ASYNC_UPDATED) == 0); | 179 | whc->async_list_wq, |
180 | (le_readl(whc->base + WUSBCMD) & WUSBCMD_ASYNC_UPDATED) == 0, | ||
181 | msecs_to_jiffies(1000)); | ||
182 | if (t == 0) | ||
183 | whc_hw_error(whc, "ASL update timeout"); | ||
179 | } | 184 | } |
180 | mutex_unlock(&wusbhc->mutex); | 185 | mutex_unlock(&wusbhc->mutex); |
181 | } | 186 | } |
@@ -222,13 +227,13 @@ void scan_async_work(struct work_struct *work) | |||
222 | * Now that the ASL is updated, complete the removal of any | 227 | * Now that the ASL is updated, complete the removal of any |
223 | * removed qsets. | 228 | * removed qsets. |
224 | */ | 229 | */ |
225 | spin_lock(&whc->lock); | 230 | spin_lock_irq(&whc->lock); |
226 | 231 | ||
227 | list_for_each_entry_safe(qset, t, &whc->async_removed_list, list_node) { | 232 | list_for_each_entry_safe(qset, t, &whc->async_removed_list, list_node) { |
228 | qset_remove_complete(whc, qset); | 233 | qset_remove_complete(whc, qset); |
229 | } | 234 | } |
230 | 235 | ||
231 | spin_unlock(&whc->lock); | 236 | spin_unlock_irq(&whc->lock); |
232 | } | 237 | } |
233 | 238 | ||
234 | /** | 239 | /** |