summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-05-05 19:56:23 +0000
committerhselasky <hselasky@FreeBSD.org>2015-05-05 19:56:23 +0000
commit2b8eaf33d746f4e85b4f42166545bc219c61813d (patch)
tree0281ccf59c8048426a9942f9867704e5a673d5e5
parentfd490e69dbf220fab9c71fba978bb85fd794ee36 (diff)
downloadFreeBSD-src-2b8eaf33d746f4e85b4f42166545bc219c61813d.zip
FreeBSD-src-2b8eaf33d746f4e85b4f42166545bc219c61813d.tar.gz
MFC r281881:
Disable multi process interrupts, because the current code doesn't use them. Else we can end up in an infinite interrupt loop in USB device mode.
-rw-r--r--sys/dev/usb/controller/dwc_otg.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/usb/controller/dwc_otg.c b/sys/dev/usb/controller/dwc_otg.c
index 2e27110..d195b7f 100644
--- a/sys/dev/usb/controller/dwc_otg.c
+++ b/sys/dev/usb/controller/dwc_otg.c
@@ -3872,20 +3872,18 @@ dwc_otg_init(struct dwc_otg_softc *sc)
if (temp & GHWCFG2_MPI) {
uint8_t x;
- DPRINTF("Multi Process Interrupts\n");
+ DPRINTF("Disable Multi Process Interrupts\n");
for (x = 0; x != sc->sc_dev_in_ep_max; x++) {
- DWC_OTG_WRITE_4(sc, DOTG_DIEPEACHINTMSK(x),
- DIEPMSK_XFERCOMPLMSK);
+ DWC_OTG_WRITE_4(sc, DOTG_DIEPEACHINTMSK(x), 0);
DWC_OTG_WRITE_4(sc, DOTG_DOEPEACHINTMSK(x), 0);
}
- DWC_OTG_WRITE_4(sc, DOTG_DEACHINTMSK, 0xFFFF);
- } else {
- DWC_OTG_WRITE_4(sc, DOTG_DIEPMSK,
- DIEPMSK_XFERCOMPLMSK);
- DWC_OTG_WRITE_4(sc, DOTG_DOEPMSK, 0);
- DWC_OTG_WRITE_4(sc, DOTG_DAINTMSK, 0xFFFF);
+ DWC_OTG_WRITE_4(sc, DOTG_DEACHINTMSK, 0);
}
+ DWC_OTG_WRITE_4(sc, DOTG_DIEPMSK,
+ DIEPMSK_XFERCOMPLMSK);
+ DWC_OTG_WRITE_4(sc, DOTG_DOEPMSK, 0);
+ DWC_OTG_WRITE_4(sc, DOTG_DAINTMSK, 0xFFFF);
}
if (sc->sc_mode == DWC_MODE_OTG || sc->sc_mode == DWC_MODE_HOST) {
OpenPOWER on IntegriCloud