mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Handle VBUS error interrupts.
Submitted by: SAITOU Toshihide <toshi@ruby.ocn.ne.jp> PR: 190471 MFC after: 1 week
This commit is contained in:
parent
7116636e6b
commit
2d759c8259
1 changed files with 8 additions and 1 deletions
|
|
@ -2258,7 +2258,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);
|
||||
|
||||
|
|
@ -2330,6 +2331,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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue