diff options
Diffstat (limited to 'drivers/usb/host/whci/pzl.c')
-rw-r--r-- | drivers/usb/host/whci/pzl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/host/whci/pzl.c b/drivers/usb/host/whci/pzl.c index 2ae5abf69a6a..df8b85f07092 100644 --- a/drivers/usb/host/whci/pzl.c +++ b/drivers/usb/host/whci/pzl.c | |||
@@ -183,12 +183,17 @@ void pzl_stop(struct whc *whc) | |||
183 | void pzl_update(struct whc *whc, uint32_t wusbcmd) | 183 | void pzl_update(struct whc *whc, uint32_t wusbcmd) |
184 | { | 184 | { |
185 | struct wusbhc *wusbhc = &whc->wusbhc; | 185 | struct wusbhc *wusbhc = &whc->wusbhc; |
186 | long t; | ||
186 | 187 | ||
187 | mutex_lock(&wusbhc->mutex); | 188 | mutex_lock(&wusbhc->mutex); |
188 | if (wusbhc->active) { | 189 | if (wusbhc->active) { |
189 | whc_write_wusbcmd(whc, wusbcmd, wusbcmd); | 190 | whc_write_wusbcmd(whc, wusbcmd, wusbcmd); |
190 | wait_event(whc->periodic_list_wq, | 191 | t = wait_event_timeout( |
191 | (le_readl(whc->base + WUSBCMD) & WUSBCMD_PERIODIC_UPDATED) == 0); | 192 | whc->periodic_list_wq, |
193 | (le_readl(whc->base + WUSBCMD) & WUSBCMD_PERIODIC_UPDATED) == 0, | ||
194 | msecs_to_jiffies(1000)); | ||
195 | if (t == 0) | ||
196 | whc_hw_error(whc, "PZL update timeout"); | ||
192 | } | 197 | } |
193 | mutex_unlock(&wusbhc->mutex); | 198 | mutex_unlock(&wusbhc->mutex); |
194 | } | 199 | } |
@@ -250,13 +255,13 @@ void scan_periodic_work(struct work_struct *work) | |||
250 | * Now that the PZL is updated, complete the removal of any | 255 | * Now that the PZL is updated, complete the removal of any |
251 | * removed qsets. | 256 | * removed qsets. |
252 | */ | 257 | */ |
253 | spin_lock(&whc->lock); | 258 | spin_lock_irq(&whc->lock); |
254 | 259 | ||
255 | list_for_each_entry_safe(qset, t, &whc->periodic_removed_list, list_node) { | 260 | list_for_each_entry_safe(qset, t, &whc->periodic_removed_list, list_node) { |
256 | qset_remove_complete(whc, qset); | 261 | qset_remove_complete(whc, qset); |
257 | } | 262 | } |
258 | 263 | ||
259 | spin_unlock(&whc->lock); | 264 | spin_unlock_irq(&whc->lock); |
260 | } | 265 | } |
261 | 266 | ||
262 | /** | 267 | /** |