Changeset e0df6c2 in mainline
- Timestamp:
- 2011-02-12T03:04:40Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67b6fc5
- Parents:
- d6115e5
- Location:
- uspace/drv/uhci-hcd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/main.c
rd6115e5 re0df6c2 134 134 */ 135 135 sleep(5); 136 usb_log_enable(USB_LOG_LEVEL_ DEBUG2, NAME);136 usb_log_enable(USB_LOG_LEVEL_INFO, NAME); 137 137 138 138 return driver_main(&uhci_driver); -
uspace/drv/uhci-hcd/transfer_list.c
rd6115e5 re0df6c2 52 52 queue_head_init(instance->queue_head); 53 53 list_initialize(&instance->batch_list); 54 fibril_mutex_initialize(&instance->guard); 54 55 return EOK; 55 56 } … … 76 77 batch->qh->next_queue = instance->queue_head->next_queue; 77 78 79 fibril_mutex_lock(&instance->guard); 80 78 81 if (instance->queue_head->element == instance->queue_head->next_queue) { 79 82 /* there is nothing scheduled */ … … 82 85 usb_log_debug2("Added batch(%p) to queue %s first.\n", 83 86 batch, instance->name); 87 fibril_mutex_unlock(&instance->guard); 84 88 return; 85 89 } … … 94 98 usb_log_debug2("Added batch(%p) to queue %s last, first is %p.\n", 95 99 batch, instance->name, first ); 100 fibril_mutex_unlock(&instance->guard); 96 101 } 97 102 /*----------------------------------------------------------------------------*/ … … 105 110 106 111 /* I'm the first one here */ 107 if (batch->link. next== &instance->batch_list) {112 if (batch->link.prev == &instance->batch_list) { 108 113 usb_log_debug("Removing tracer %p was first, next element %x.\n", 109 114 batch, batch->qh->next_queue); … … 121 126 { 122 127 assert(instance); 128 fibril_mutex_lock(&instance->guard); 123 129 link_t *current = instance->batch_list.next; 124 130 while (current != &instance->batch_list) { … … 132 138 current = next; 133 139 } 140 fibril_mutex_unlock(&instance->guard); 134 141 } 135 142 /** -
uspace/drv/uhci-hcd/transfer_list.h
rd6115e5 re0df6c2 35 35 #define DRV_UHCI_TRANSFER_LIST_H 36 36 37 #include <fibril_synch.h> 38 37 39 #include "uhci_struct/queue_head.h" 38 40 … … 41 43 typedef struct transfer_list 42 44 { 45 fibril_mutex_t guard; 43 46 queue_head_t *queue_head; 44 47 uint32_t queue_head_pa; … … 51 54 52 55 void transfer_list_set_next(transfer_list_t *instance, transfer_list_t *next); 53 54 56 55 57 static inline void transfer_list_fini(transfer_list_t *instance)
Note:
See TracChangeset
for help on using the changeset viewer.