Changeset 6d91888 in mainline
- Timestamp:
- 2017-11-21T12:51:37Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6283cefb
- Parents:
- 375211d2
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hw_struct/trb.h
r375211d2 r6d91888 211 211 } 212 212 213 enum xhci_trb_completion_code {213 typedef enum xhci_trb_completion_code { 214 214 XHCI_TRBC_INVALID = 0, 215 215 XHCI_TRBC_SUCCESS, … … 255 255 * 224 - 255 vendor defined info 256 256 */ 257 } ;257 } xhci_trb_completion_code_t; 258 258 259 259 #endif -
uspace/drv/bus/usb/xhci/transfers.c
r375211d2 r6d91888 444 444 } 445 445 446 batch->error = (TRB_COMPLETION_CODE(*trb) == XHCI_TRBC_SUCCESS) ? EOK : ENAK; 447 batch->transfered_size = batch->buffer_size - TRB_TRANSFER_LENGTH(*trb); 446 const xhci_trb_completion_code_t completion_code = TRB_COMPLETION_CODE(*trb); 447 switch (completion_code) { 448 case XHCI_TRBC_SHORT_PACKET: 449 usb_log_debug("Short transfer."); 450 /* fallthrough */ 451 case XHCI_TRBC_SUCCESS: 452 batch->error = EOK; 453 batch->transfered_size = batch->buffer_size - TRB_TRANSFER_LENGTH(*trb); 454 break; 455 456 default: 457 usb_log_warning("Transfer not successfull: %u", completion_code); 458 batch->error = EIO; 459 } 460 448 461 usb_transfer_batch_reset_toggle(batch); 449 462 endpoint_deactivate_locked(&ep->base);
Note:
See TracChangeset
for help on using the changeset viewer.