mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-04 15:13:58 +01:00
Merge remote-tracking branch 'freebsd/stable/12' into hardened/12-stable/master
This commit is contained in:
commit
3d30733b3c
@ -3932,9 +3932,16 @@ xhci_configure_reset_endpoint(struct usb_xfer *xfer)
|
||||
|
||||
mask = (1U << epno);
|
||||
|
||||
if (epno != 1 && drop != 0) {
|
||||
/*
|
||||
* So-called control and isochronous transfer types have
|
||||
* predefined data toggles (USB 2.0) or sequence numbers (USB
|
||||
* 3.0) and does not need to be dropped.
|
||||
*/
|
||||
if (drop != 0 &&
|
||||
(edesc->bmAttributes & UE_XFERTYPE) != UE_CONTROL &&
|
||||
(edesc->bmAttributes & UE_XFERTYPE) != UE_ISOCHRONOUS) {
|
||||
/* drop endpoint context to reset data toggle value, if any. */
|
||||
xhci_configure_mask(udev, mask, 1);
|
||||
xhci_configure_mask(udev, mask, 1);
|
||||
err = xhci_cmd_configure_ep(sc, buf_inp.physaddr, 0, index);
|
||||
if (err != 0) {
|
||||
DPRINTF("Could not drop "
|
||||
@ -3944,7 +3951,11 @@ xhci_configure_reset_endpoint(struct usb_xfer *xfer)
|
||||
}
|
||||
}
|
||||
|
||||
xhci_configure_mask(udev, mask, 0);
|
||||
/*
|
||||
* Always need to evaluate the slot context, because the maximum
|
||||
* number of endpoint contexts is stored there.
|
||||
*/
|
||||
xhci_configure_mask(udev, mask | 1U, 0);
|
||||
|
||||
if (!(sc->sc_hw.devs[index].ep_configured & mask)) {
|
||||
err = xhci_cmd_configure_ep(sc, buf_inp.physaddr, 0, index);
|
||||
|
Loading…
Reference in New Issue
Block a user