Date: Wed, 25 Feb 2015 12:26:45 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279280 - stable/9/sys/dev/usb/controller Message-ID: <201502251226.t1PCQjY1076985@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502251226.t1PCQjY1076985>