summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/whci/hw.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-02-02 19:20:17 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-02 19:20:17 -0800
commit17294ab2ca8e8c46f2e4825c55541b2b88e52bf4 (patch)
treec44fd3cf1c20c5724e719a3339a5734f2eae7e58 /drivers/usb/host/whci/hw.c
parent86adf8adfcb3d3f4b6c30aeb40da480da02de1d1 (diff)
parent8f04915532485d81e7f6c580a396ea7b01094221 (diff)
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: uwb: lock rc->rsvs_lock with spin_lock_bh() wusb: timeout when waiting for ASL/PZL updates in whci-hcd uwb: remove unused #include <version.h>'s wusb: return -ENOTCONN when resetting a port with no connected device uwb: safely remove all reservations
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 d498e720321..6afa2e37916 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);
+}