wusb: timeout when waiting for ASL/PZL updates in whci-hcd

Timeout if an ASL or PZL update doesn't not complete and reset the
hardware.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
This commit is contained in:
David Vrabel
2009-01-07 10:54:22 +00:00
parent a23e66f3b8
commit a5e6ced58d
4 changed files with 30 additions and 4 deletions

View File

@@ -87,3 +87,18 @@ out:
return ret;
}
/**
* whc_hw_error - recover from a hardware error
* @whc: the WHCI HC that broke.
* @reason: a description of the failure.
*
* Recover from broken hardware with a full reset.
*/
void whc_hw_error(struct whc *whc, const char *reason)
{
struct wusbhc *wusbhc = &whc->wusbhc;
dev_err(&whc->umc->dev, "hardware error: %s\n", reason);
wusbhc_reset_all(wusbhc);
}