summaryrefslogtreecommitdiff
path: root/drivers/usb/host/whci/hw.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-01-07 13:54:22 +0300
committerDavid Vrabel <david.vrabel@csr.com>2009-01-07 13:54:22 +0300
commita5e6ced58d423cb09c4fc0087dcfdb0b5deb5e1c (patch)
tree56ab507e1df59cae1f57c2f5883bc676f1147441 /drivers/usb/host/whci/hw.c
parenta23e66f3b8cfdedec14541e71ef29a754870a20c (diff)
downloadlinux-a5e6ced58d423cb09c4fc0087dcfdb0b5deb5e1c.tar.xz
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>
Diffstat (limited to 'drivers/usb/host/whci/hw.c')
-rw-r--r--drivers/usb/host/whci/hw.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/host/whci/hw.c b/drivers/usb/host/whci/hw.c
index d498e7203217..6afa2e379160 100644
--- a/drivers/usb/host/whci/hw.c
+++ b/drivers/usb/host/whci/hw.c
@@ -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);
+}