Changeset 41abf3c in mainline for uspace/drv/bus/usb/xhci/transfers.c


Ignore:
Timestamp:
2018-01-18T19:08:51Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7138a78b
Parents:
8fe29a7c
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-18 19:06:36)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-18 19:08:51)
Message:

xhci: various debugging changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/transfers.c

    r8fe29a7c r41abf3c  
    297297        const usb_endpoint_t ep_num = ep_dci / 2;
    298298        const usb_endpoint_t dir = ep_dci % 2 ? USB_DIRECTION_IN : USB_DIRECTION_OUT;
     299        /* Creating temporary reference */
    299300        endpoint_t *ep_base = bus_find_endpoint(&dev->base, ep_num, dir);
    300301        if (!ep_base) {
     
    325326                if (ep->base.transfer_type == USB_TRANSFER_ISOCHRONOUS) {
    326327                        isoch_handle_transfer_event(hc, ep, trb);
     328                        /* Dropping temporary reference */
    327329                        endpoint_del_ref(&ep->base);
    328330                        return EOK;
     
    333335                if (!batch) {
    334336                        fibril_mutex_unlock(&ep->base.guard);
     337                        /* Dropping temporary reference */
    335338                        endpoint_del_ref(&ep->base);
    336339                        return ENOENT;
     
    395398        if (xhci_endpoint_get_state(ep) == EP_STATE_HALTED) {
    396399                usb_log_debug("Endpoint halted, resetting endpoint.");
    397                 xhci_endpoint_clear_halt(ep, batch->target.stream);
    398                
     400                const int err = xhci_endpoint_clear_halt(ep, batch->target.stream);
     401                if (err)
     402                        usb_log_error("Failed to clear halted condition on "
     403                            "endpoint " XHCI_EP_FMT ". Unexpected results "
     404                            "coming.", XHCI_EP_ARGS(*ep));
    399405        }
    400406
     
    406412
    407413        usb_transfer_batch_finish(batch);
     414        /* Dropping temporary reference */
    408415        endpoint_del_ref(&ep->base);
    409416        return EOK;
Note: See TracChangeset for help on using the changeset viewer.