FreeBSD Bugzilla – Attachment 206399 Details for
Bug 237666
repeated messages of "uhub_reattach_port: giving up port reset - device vanished"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for XHCI
xhci_portsc.diff (text/plain), 1.64 KB, created by
Hans Petter Selasky
on 2019-08-09 16:49:00 UTC
(
hide
)
Description:
Patch for XHCI
Filename:
MIME Type:
Creator:
Hans Petter Selasky
Created:
2019-08-09 16:49:00 UTC
Size:
1.64 KB
patch
obsolete
>Index: sys/dev/usb/controller/xhci.c >=================================================================== >--- sys/dev/usb/controller/xhci.c (revision 350625) >+++ sys/dev/usb/controller/xhci.c (working copy) >@@ -3034,6 +3034,21 @@ > return (0); > } > >+static uint32_t >+xhci_read_portsc(struct xhci_softc *sc, uint16_t i) >+{ >+ uint32_t value; >+ uint32_t timeout = 16; >+ >+ do { >+ value = XREAD4(sc, oper, XHCI_PORTSC(i)); >+ if (value != -1U) >+ break; >+ } while (timeout--); >+ >+ return (value); >+} >+ > static void > xhci_root_intr(struct xhci_softc *sc) > { >@@ -3046,7 +3061,7 @@ > > for (i = 1; i <= sc->sc_noport; i++) { > /* pick out CHANGE bits from the status register */ >- if (XREAD4(sc, oper, XHCI_PORTSC(i)) & ( >+ if (xhci_read_portsc(sc, i) & ( > XHCI_PS_CSC | XHCI_PS_PEC | > XHCI_PS_OCC | XHCI_PS_WRC | > XHCI_PS_PRC | XHCI_PS_PLC | >@@ -3444,8 +3459,8 @@ > goto done; > } > port = XHCI_PORTSC(index); >+ v = xhci_read_portsc(sc, index); > >- v = XREAD4(sc, oper, port); > i = XHCI_PS_PLS_GET(v); > v &= ~XHCI_PS_CLEAR; > >@@ -3531,7 +3546,7 @@ > > for (j = 1; j <= sc->sc_noport; j++) { > >- v = XREAD4(sc, oper, XHCI_PORTSC(j)); >+ v = xhci_read_portsc(sc, j); > if (v & XHCI_PS_DR) { > sc->sc_hub_desc.hubd. > DeviceRemovable[j / 8] |= 1U << (j % 8); >@@ -3554,7 +3569,7 @@ > goto done; > } > >- v = XREAD4(sc, oper, XHCI_PORTSC(index)); >+ v = xhci_read_portsc(sc, index); > > DPRINTFN(9, "port status=0x%08x\n", v); > >@@ -3631,7 +3646,7 @@ > } > > port = XHCI_PORTSC(index); >- v = XREAD4(sc, oper, port) & ~XHCI_PS_CLEAR; >+ v = xhci_read_portsc(sc, index) & ~XHCI_PS_CLEAR; > > switch (value) { > case UHF_PORT_U1_TIMEOUT:
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 237666
:
204107
|
204110
|
204111
|
204382
|
204388
|
206324
| 206399 |
206443
|
209346
|
209793
|
210170
|
213055
|
213822
|
220423
|
224756
|
242272