From 5fd80233126b2e7373b5fb7d2af20a57c7a56fe0 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 20 Feb 2019 16:31:45 -0500 Subject: [PATCH] XHCI: Disable Stop/SetTRD/Reset again. They don't seem to particularly help, and there are reports that this broke XHCI completely on some devices. This reverts commit a21f7b525b2c030a07592354bc51eb186206392b. --- src/add-ons/kernel/busses/usb/xhci.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/xhci.cpp b/src/add-ons/kernel/busses/usb/xhci.cpp index 6ed2727799..c739f5532e 100644 --- a/src/add-ons/kernel/busses/usb/xhci.cpp +++ b/src/add-ons/kernel/busses/usb/xhci.cpp @@ -1496,6 +1496,16 @@ XHCI::_InsertEndpointForPipe(Pipe *pipe) return status; } +#if 0 + /* These commands error with "Context state" on some devices, + * and on others break transfers altogether. So just disable them + * for now. */ + StopEndpoint(false, endpoint, device->slot); + SetTRDequeue(device->endpoints[id].trb_addr, 0, endpoint, + device->slot); + ResetEndpoint(false, endpoint, device->slot); +#endif + _WriteContext(&device->input_ctx->input.dropFlags, 0); _WriteContext(&device->input_ctx->input.addFlags, (1 << endpoint) | (1 << 0)); @@ -1505,11 +1515,6 @@ XHCI::_InsertEndpointForPipe(Pipe *pipe) else EvaluateContext(device->input_ctx_addr, device->slot); - StopEndpoint(false, endpoint, device->slot); - SetTRDequeue(device->endpoints[id].trb_addr, 0, endpoint, - device->slot); - ResetEndpoint(false, endpoint, device->slot); - TRACE("device: address 0x%x state 0x%08" B_PRIx32 "\n", device->address, SLOT_3_SLOT_STATE_GET(_ReadContext( &device->device_ctx->slot.dwslot3)));