FreeBSD Bugzilla – Attachment 172056 Details for
Bug 210736
Disconnecting USB cable in device/gadget mode breaks usbconfig(8)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
DWC OTG patch
dwc_otg.diff (text/plain), 1.71 KB, created by
Hans Petter Selasky
on 2016-07-03 11:48:58 UTC
(
hide
)
Description:
DWC OTG patch
Filename:
MIME Type:
Creator:
Hans Petter Selasky
Created:
2016-07-03 11:48:58 UTC
Size:
1.71 KB
patch
obsolete
>Index: sys/dev/usb/controller/dwc_otg.c >=================================================================== >--- sys/dev/usb/controller/dwc_otg.c (revision 302306) >+++ sys/dev/usb/controller/dwc_otg.c (working copy) >@@ -93,17 +93,6 @@ > #define DWC_OTG_PC2UDEV(pc) \ > (USB_DMATAG_TO_XROOT((pc)->tag_parent)->udev) > >-#define DWC_OTG_MSK_GINT_ENABLED \ >- (GINTMSK_ENUMDONEMSK | \ >- GINTMSK_USBRSTMSK | \ >- GINTMSK_USBSUSPMSK | \ >- GINTMSK_IEPINTMSK | \ >- GINTMSK_SESSREQINTMSK | \ >- GINTMSK_RXFLVLMSK | \ >- GINTMSK_HCHINTMSK | \ >- GINTMSK_OTGINTMSK | \ >- GINTMSK_PRTINTMSK) >- > #define DWC_OTG_MSK_GINT_THREAD_IRQ \ > (GINTSTS_USBRST | GINTSTS_ENUMDONE | GINTSTS_PRTINT | \ > GINTSTS_WKUPINT | GINTSTS_USBSUSP | GINTMSK_OTGINTMSK | \ >@@ -376,6 +365,11 @@ > /* enable all host channel interrupts */ > DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, > (1U << sc->sc_host_ch_max) - 1U); >+ >+ /* enable proper host channel interrupts */ >+ sc->sc_irq_mask |= GINTMSK_HCHINTMSK; >+ sc->sc_irq_mask &= ~GINTMSK_IEPINTMSK; >+ DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); > } > > if (mode == DWC_MODE_DEVICE) { >@@ -436,6 +430,11 @@ > pf->usb.max_in_frame_size, > pf->usb.max_out_frame_size); > } >+ >+ /* enable proper device channel interrupts */ >+ sc->sc_irq_mask &= ~GINTMSK_HCHINTMSK; >+ sc->sc_irq_mask |= GINTMSK_IEPINTMSK; >+ DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); > } > > /* reset RX FIFO */ >@@ -3980,7 +3979,7 @@ > } > > /* enable interrupts */ >- sc->sc_irq_mask = DWC_OTG_MSK_GINT_ENABLED; >+ sc->sc_irq_mask |= DWC_OTG_MSK_GINT_THREAD_IRQ; > DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask); > > if (sc->sc_mode == DWC_MODE_OTG || sc->sc_mode == DWC_MODE_DEVICE) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210736
:
172054
|
172056
|
172095