XHCI: Turn failure to stop the endpoint into a TRACE_ERROR.
This commit is contained in:
@@ -867,9 +867,6 @@ XHCI::SubmitNormalRequest(Transfer *transfer)
|
|||||||
status_t
|
status_t
|
||||||
XHCI::CancelQueuedTransfers(Pipe *pipe, bool force)
|
XHCI::CancelQueuedTransfers(Pipe *pipe, bool force)
|
||||||
{
|
{
|
||||||
TRACE_ALWAYS("cancel queued transfers for pipe %p (%d)\n", pipe,
|
|
||||||
pipe->EndpointAddress());
|
|
||||||
|
|
||||||
xhci_endpoint *endpoint = (xhci_endpoint *)pipe->ControllerCookie();
|
xhci_endpoint *endpoint = (xhci_endpoint *)pipe->ControllerCookie();
|
||||||
if (endpoint == NULL || endpoint->trbs == NULL) {
|
if (endpoint == NULL || endpoint->trbs == NULL) {
|
||||||
// Someone's de-allocated this pipe or endpoint in the meantime.
|
// Someone's de-allocated this pipe or endpoint in the meantime.
|
||||||
@@ -877,6 +874,9 @@ XHCI::CancelQueuedTransfers(Pipe *pipe, bool force)
|
|||||||
return B_NO_INIT;
|
return B_NO_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACE_ALWAYS("cancel queued transfers (%" B_PRId8 ") for pipe %p (%d)\n",
|
||||||
|
endpoint->used, pipe, pipe->EndpointAddress());
|
||||||
|
|
||||||
MutexLocker endpointLocker(endpoint->lock);
|
MutexLocker endpointLocker(endpoint->lock);
|
||||||
|
|
||||||
if (endpoint->td_head == NULL) {
|
if (endpoint->td_head == NULL) {
|
||||||
@@ -890,7 +890,9 @@ XHCI::CancelQueuedTransfers(Pipe *pipe, bool force)
|
|||||||
xhci_td* td_head = endpoint->td_head;
|
xhci_td* td_head = endpoint->td_head;
|
||||||
endpoint->td_head = NULL;
|
endpoint->td_head = NULL;
|
||||||
|
|
||||||
if (StopEndpoint(false, endpoint->id + 1, endpoint->device->slot) == B_OK) {
|
status_t status = StopEndpoint(false, endpoint->id + 1,
|
||||||
|
endpoint->device->slot);
|
||||||
|
if (status == B_OK) {
|
||||||
// Clear the endpoint's TRBs.
|
// Clear the endpoint's TRBs.
|
||||||
memset(endpoint->trbs, 0, sizeof(xhci_trb) * XHCI_ENDPOINT_RING_SIZE);
|
memset(endpoint->trbs, 0, sizeof(xhci_trb) * XHCI_ENDPOINT_RING_SIZE);
|
||||||
endpoint->used = 0;
|
endpoint->used = 0;
|
||||||
@@ -905,7 +907,8 @@ XHCI::CancelQueuedTransfers(Pipe *pipe, bool force)
|
|||||||
} else {
|
} else {
|
||||||
// We couldn't stop the endpoint. Most likely the device has been
|
// We couldn't stop the endpoint. Most likely the device has been
|
||||||
// removed and the endpoint was stopped by the hardware.
|
// removed and the endpoint was stopped by the hardware.
|
||||||
TRACE("CancelQueuedTransfers: could not stop endpoint\n");
|
TRACE_ERROR("cancel queued transfers: could not stop endpoint: %s!\n",
|
||||||
|
strerror(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
endpointLocker.Unlock();
|
endpointLocker.Unlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user