summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/whci/hw.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-17 09:28:13 +0100
committerTakashi Iwai <tiwai@suse.de>2009-03-17 09:28:13 +0100
commit37ba1b62836d2440980cf553c49556393b05c6cd (patch)
tree3bbd9b76117d484d5a624db1b2b9ec0181c7ff55 /drivers/usb/host/whci/hw.c
parentALSA: opl3sa2 fix irq releasing and short name of card (diff)
parentALSA: opl3sa2 - Fix NULL dereference when suspending snd_opl3sa2 (diff)
downloadlinux-37ba1b62836d2440980cf553c49556393b05c6cd.tar.xz
linux-37ba1b62836d2440980cf553c49556393b05c6cd.zip
Merge branch 'fix/opl3sa2-suspend' into topic/isa-misc
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);
+}