Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/controller/xhci.c
Context not available. | |||||
SYSCTL_INT(_hw_usb_xhci, OID_AUTO, ctlquirk, CTLFLAG_RWTUN, | SYSCTL_INT(_hw_usb_xhci, OID_AUTO, ctlquirk, CTLFLAG_RWTUN, | ||||
&xhcictlquirk, 0, "Set to enable control endpoint quirk"); | &xhcictlquirk, 0, "Set to enable control endpoint quirk"); | ||||
static int xhcipre356545 = 0; | |||||
SYSCTL_INT(_hw_usb_xhci, OID_AUTO, pre356545, CTLFLAG_RWTUN, &xhcipre356545, 0, | |||||
"Set to allow endpoints to be configured twice (default before r356545)."); | |||||
#ifdef USB_DEBUG | #ifdef USB_DEBUG | ||||
static int xhcidebug; | static int xhcidebug; | ||||
static int xhciroute; | static int xhciroute; | ||||
Context not available. | |||||
mask = (1U << epno); | mask = (1U << epno); | ||||
xhci_configure_mask(udev, mask | 1U, 0); | xhci_configure_mask(udev, mask | 1U, 0); | ||||
if (!(sc->sc_hw.devs[index].ep_configured & mask) || | |||||
if (!(sc->sc_hw.devs[index].ep_configured & mask)) { | (epno > 1 && xhcipre356545)) { | ||||
sc->sc_hw.devs[index].ep_configured |= mask; | sc->sc_hw.devs[index].ep_configured |= mask; | ||||
err = xhci_cmd_configure_ep(sc, buf_inp.physaddr, 0, index); | err = xhci_cmd_configure_ep(sc, buf_inp.physaddr, 0, index); | ||||
} else { | } else { | ||||
Context not available. | |||||
case USB_STATE_CONFIGURED: | case USB_STATE_CONFIGURED: | ||||
if (sc->sc_hw.devs[index].state == XHCI_ST_CONFIGURED) { | if (sc->sc_hw.devs[index].state == XHCI_ST_CONFIGURED) { | ||||
if (xhcipre356545) | |||||
break; | |||||
/* deconfigure all endpoints, except EP0 */ | /* deconfigure all endpoints, except EP0 */ | ||||
err = xhci_cmd_configure_ep(sc, 0, 1, index); | err = xhci_cmd_configure_ep(sc, 0, 1, index); | ||||
Context not available. |