Changeset 8fe29a7c in mainline for uspace/drv/bus/usb/xhci/transfers.c


Ignore:
Timestamp:
2018-01-18T17:12:53Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
41abf3c
Parents:
fb28cde
Message:

xhci: clear endpoint halted condition

File:
1 edited

Legend:

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

    rfb28cde r8fe29a7c  
    358358
    359359                case XHCI_TRBC_BABBLE_DETECTED_ERROR:
    360                         usb_log_warning("Babble detected during the transfer. Resetting endpoint.");
     360                        usb_log_warning("Babble detected during the transfer.");
    361361                        batch->error = EAGAIN;
    362362                        batch->transfered_size = 0;
    363                         hc_reset_endpoint(hc, slot_id, ep_dci);
    364363                        break;
    365364
    366365                case XHCI_TRBC_USB_TRANSACTION_ERROR:
    367                         usb_log_warning("USB Transaction error. Resetting endpoint.");
     366                        usb_log_warning("USB Transaction error.");
    368367                        batch->error = ESTALL;
    369368                        batch->transfered_size = 0;
    370                         hc_reset_endpoint(hc, slot_id, ep_dci);
    371369                        break;
    372370
     
    392390                        usb_log_warning("Transfer not successfull: %u", completion_code);
    393391                        batch->error = EIO;
     392        }
     393
     394       
     395        if (xhci_endpoint_get_state(ep) == EP_STATE_HALTED) {
     396                usb_log_debug("Endpoint halted, resetting endpoint.");
     397                xhci_endpoint_clear_halt(ep, batch->target.stream);
     398               
    394399        }
    395400
Note: See TracChangeset for help on using the changeset viewer.