Changeset 113aef8 in mainline for uspace/drv/uhci/uhci_struct/transfer_descriptor.c
- Timestamp:
- 2011-01-29T08:58:46Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d956aa5
- Parents:
- 245b56b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/uhci_struct/transfer_descriptor.c
r245b56b5 r113aef8 10 10 0 | LINK_POINTER_TERMINATE_FLAG; 11 11 12 uhci_print_verbose("Creating link field: %x.\n", instance->next);13 12 14 13 assert(size < 1024); … … 16 15 | ((error_count & TD_STATUS_ERROR_COUNT_MASK) << TD_STATUS_ERROR_COUNT_POS) 17 16 | TD_STATUS_ERROR_ACTIVE; 18 19 uhci_print_verbose("Creating status field: %x.\n", instance->status);20 17 21 18 instance->device = 0 … … 25 22 | ((pid & TD_DEVICE_PID_MASK) << TD_DEVICE_PID_POS); 26 23 27 uhci_print_verbose("Creating device field: %x.\n", instance->device); 24 instance->buffer_ptr = 0; 25 26 instance->next_va = NULL; 27 instance->callback = NULL; 28 28 29 29 if (size) { 30 30 instance->buffer_ptr = (uintptr_t)addr_to_phys(buffer); 31 32 uhci_print_verbose("Creating buffer field: %p(%p).\n",33 buffer, instance->buffer_ptr);34 35 if (size >= 8) {36 char * buff = buffer;37 38 uhci_print_verbose("Buffer dump(8B): %x %x %x %x %x %x %x %x.\n",39 buff[0], buff[1], buff[2], buff[3], buff[4], buff[5], buff[6], buff[7]);40 }41 } else {42 instance->buffer_ptr = 0;43 31 } 44 32 45 instance->next_va = NULL; 46 instance->callback = NULL; 47 uhci_print_info("Created a new TD.\n"); 33 uhci_print_info("Created TD: %X:%X:%X:%X(%p).\n", 34 instance->next, instance->status, instance->device, 35 instance->buffer_ptr, buffer); 36 37 if (size) { 38 unsigned char * buff = buffer; 39 uhci_print_verbose("TD Buffer dump(%p-%dB): ", buffer, size); 40 unsigned i = 0; 41 /* TODO: Verbose? */ 42 for (; i < size; ++i) { 43 printf((i & 1) ? "%x " : "%x", buff[i]); 44 } 45 printf("\n"); 46 } 48 47 } 49 48
Note:
See TracChangeset
for help on using the changeset viewer.