Changeset 8c877b2 in mainline for uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.c
- Timestamp:
- 2011-03-04T13:05:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d49728c
- Parents:
- dff940f8 (diff), 9a422574 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.c
rdff940f8 r8c877b2 39 39 40 40 void transfer_descriptor_init(transfer_descriptor_t *instance, 41 int error_count, size_t size, bool toggle, bool isochronous, 41 int error_count, size_t size, bool toggle, bool isochronous, bool low_speed, 42 42 usb_target_t target, int pid, void *buffer, transfer_descriptor_t *next) 43 43 { … … 50 50 instance->status = 0 51 51 | ((error_count & TD_STATUS_ERROR_COUNT_MASK) << TD_STATUS_ERROR_COUNT_POS) 52 | (low_speed ? TD_STATUS_LOW_SPEED_FLAG : 0) 52 53 | TD_STATUS_ERROR_ACTIVE; 53 54 … … 66 67 } 67 68 68 usb_log_ info("Created TD: %X:%X:%X:%X(%p).\n",69 usb_log_debug2("Created TD: %X:%X:%X:%X(%p).\n", 69 70 instance->next, instance->status, instance->device, 70 71 instance->buffer_ptr, buffer); 71 #if 072 if (size) {73 unsigned char * buff = buffer;74 uhci_print_verbose("TD Buffer dump(%p-%dB): ", buffer, size);75 unsigned i = 0;76 /* TODO: Verbose? */77 for (; i < size; ++i) {78 printf((i & 1) ? "%x " : "%x", buff[i]);79 }80 printf("\n");81 }82 #endif83 72 } 84 73 /*----------------------------------------------------------------------------*/ … … 88 77 89 78 if ((instance->status & TD_STATUS_ERROR_STALLED) != 0) 90 return E IO;79 return ESTALL; 91 80 92 81 if ((instance->status & TD_STATUS_ERROR_CRC) != 0) 93 return E AGAIN;82 return EBADCHECKSUM; 94 83 95 84 if ((instance->status & TD_STATUS_ERROR_BUFFER) != 0)
Note:
See TracChangeset
for help on using the changeset viewer.