svn commit: r279280 - stable/9/sys/dev/usb/controller
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Feb 25 12:26:46 UTC 2015
Author: hselasky
Date: Wed Feb 25 12:26:45 2015
New Revision: 279280
URL: https://svnweb.freebsd.org/changeset/base/279280
Log:
MFC r278850:
Handle VBUS error interrupts.
PR: 190471
Modified:
stable/9/sys/dev/usb/controller/musb_otg.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/usb/controller/musb_otg.c
==============================================================================
--- stable/9/sys/dev/usb/controller/musb_otg.c Wed Feb 25 12:24:24 2015 (r279279)
+++ stable/9/sys/dev/usb/controller/musb_otg.c Wed Feb 25 12:26:45 2015 (r279280)
@@ -2242,7 +2242,8 @@ repeat:
if (usb_status & (MUSB2_MASK_IRESET |
MUSB2_MASK_IRESUME | MUSB2_MASK_ISUSP |
- MUSB2_MASK_ICONN | MUSB2_MASK_IDISC)) {
+ MUSB2_MASK_ICONN | MUSB2_MASK_IDISC |
+ MUSB2_MASK_IVBUSERR)) {
DPRINTFN(4, "real bus interrupt 0x%08x\n", usb_status);
@@ -2314,6 +2315,12 @@ repeat:
* always in reset state once device is connected.
*/
if (sc->sc_mode == MUSB2_HOST_MODE) {
+ /* check for VBUS error in USB host mode */
+ if (usb_status & MUSB2_MASK_IVBUSERR) {
+ temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL);
+ temp |= MUSB2_MASK_SESS;
+ MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp);
+ }
if (usb_status & MUSB2_MASK_ICONN)
sc->sc_flags.status_bus_reset = 1;
if (usb_status & MUSB2_MASK_IDISC)
More information about the svn-src-stable-9
mailing list