BeagleBone Black musb_otg doesn't respond after booting if the USB peripheral isn't attached at boot time. At this time, MUSB2_MASK_IVBUSERR is detected then it doesn't respond. Environment: FreeBSD bbb 11.0-CURRENT FreeBSD 11.0-CURRENT #74 r266644M: Thu May 29 08:53:09 JST 2014 toshi@fbsd:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE arm How-To-Repeat: Boot without any USB periphel, after booting, connect USB peripheral. Fix: I don't know the correct way to fix this problem, but the patch below solve this problem. 2241,2248d2240 < if (usb_status & MUSB2_MASK_IVBUSERR && < sc->sc_mode == MUSB2_HOST_MODE) { < temp = MUSB2_READ_1(sc, MUSB2_REG_DEVCTL); < temp |= MUSB2_MASK_SESS; < MUSB2_WRITE_1(sc, MUSB2_REG_DEVCTL, temp); < goto done; < } < 2347d2338 < done:
Created attachment 152996 [details] path for musb_otg.c It still need for some usb devices. Without this patch and attach the usb device, musb_otg does not respond any more. I don't know the correct way to fix.
Hi, Patch look good. Can you explain why you need to the "goto"? --HPS
Created attachment 153010 [details] MUSB OTG
Hi, Can you test my patch instead of yours and see if it works? --HPS
(In reply to Hans Petter Selasky from comment #4) Your patch worked. Thank you for your continuous support.
A commit references this bug: Author: hselasky Date: Mon Feb 16 15:34:11 UTC 2015 New revision: 278850 URL: https://svnweb.freebsd.org/changeset/base/278850 Log: Handle VBUS error interrupts. Submitted by: SAITOU Toshihide <toshi@ruby.ocn.ne.jp> PR: 190471 MFC after: 1 week Changes: head/sys/dev/usb/controller/musb_otg.c
MFC to 10- and 9-stable in a weeks time or so. Thanks for your patch! --HPS
A commit references this bug: Author: hselasky Date: Wed Feb 25 12:24:25 UTC 2015 New revision: 279279 URL: https://svnweb.freebsd.org/changeset/base/279279 Log: MFC r278850: Handle VBUS error interrupts. PR: 190471 Changes: _U stable/10/ stable/10/sys/dev/usb/controller/musb_otg.c
A commit references this bug: Author: hselasky Date: Wed Feb 25 12:26:45 UTC 2015 New revision: 279280 URL: https://svnweb.freebsd.org/changeset/base/279280 Log: MFC r278850: Handle VBUS error interrupts. PR: 190471 Changes: _U stable/9/sys/ _U stable/9/sys/dev/ stable/9/sys/dev/usb/controller/musb_otg.c