Changeset 78d4e1f in mainline
- Timestamp:
- 2011-04-10T21:03:36Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eaf1e3d
- Parents:
- 0ede0c3
- Location:
- uspace/drv/ohci
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/batch.c
r0ede0c3 r78d4e1f 134 134 assert(data); 135 135 size_t tds = data->td_count - 1; 136 usb_log_debug 2("Batch(%p) checking %d td(s) for completion.\n",136 usb_log_debug("Batch(%p) checking %d td(s) for completion.\n", 137 137 instance, tds); 138 usb_log_debug("ED: %x:%x:%x:%x.\n", 139 data->ed->status, data->ed->td_head, data->ed->td_tail, 140 data->ed->next); 138 141 size_t i = 0; 139 142 for (; i < tds; ++i) { 143 usb_log_debug("TD %d: %x:%x:%x:%x.\n", i, 144 data->tds[i].status, data->tds[i].cbp, data->tds[i].next, 145 data->tds[i].be); 140 146 if (!td_is_finished(&data->tds[i])) 141 147 return false; -
uspace/drv/ohci/hc.c
r0ede0c3 r78d4e1f 135 135 } 136 136 137 transfer_list_add_batch(138 instance->transfers[batch->transfer_type], batch);139 140 137 switch (batch->transfer_type) { 141 138 case USB_TRANSFER_CONTROL: 142 139 instance->registers->control &= ~C_CLE; 140 transfer_list_add_batch( 141 instance->transfers[batch->transfer_type], batch); 143 142 instance->registers->command_status |= CS_CLF; 144 usb_log_debug2("Set control transfer filled: %x.\n",143 usb_log_debug2("Set CS control transfer filled: %x.\n", 145 144 instance->registers->command_status); 145 instance->registers->control_current = 0; 146 146 instance->registers->control |= C_CLE; 147 147 break; … … 160 160 { 161 161 assert(instance); 162 if ((status & ~IS_SF) == 0) /* ignore sof status */163 return;162 // if ((status & ~IS_SF) == 0) /* ignore sof status */ 163 // return; 164 164 if (status & IS_RHSC) 165 165 rh_interrupt(&instance->rh); 166 166 167 usb_log_ info("OHCI interrupt: %x.\n", status);167 usb_log_fatal("OHCI interrupt: %x.\n", status); 168 168 169 169 … … 191 191 instance->registers->interrupt_status = status; 192 192 hc_interrupt(instance, status); 193 async_usleep( 1000);193 async_usleep(2000000); 194 194 } 195 195 return EOK; … … 267 267 instance->registers->control); 268 268 269 /* Use HCCA */ 270 instance->registers->hcca = addr_to_phys(instance->hcca); 271 272 /* Use queues */ 273 instance->registers->bulk_head = instance->transfers_bulk.list_head_pa; 274 usb_log_debug2("Bulk HEAD set to: %p(%p).\n", 275 instance->transfers_bulk.list_head, 276 instance->transfers_bulk.list_head_pa); 277 278 instance->registers->control_head = 279 instance->transfers_control.list_head_pa; 280 usb_log_debug2("Control HEAD set to: %p(%p).\n", 281 instance->transfers_control.list_head, 282 instance->transfers_control.list_head_pa); 283 269 284 /* Enable queues */ 270 285 instance->registers->control |= (C_PLE | C_IE | C_CLE | C_BLE); … … 342 357 return ENOMEM; 343 358 bzero(instance->hcca, sizeof(hcca_t)); 344 instance->registers->hcca = addr_to_phys(instance->hcca); 345 usb_log_debug2("OHCI HCCA initialized at %p(%p).\n", 346 instance->hcca, instance->registers->hcca); 347 348 /* Use queues */ 349 instance->registers->bulk_head = instance->transfers_bulk.list_head_pa; 350 usb_log_debug2("Bulk HEAD set to: %p(%p).\n", 351 instance->transfers_bulk.list_head, 352 instance->transfers_bulk.list_head_pa); 353 354 instance->registers->control_head = 355 instance->transfers_control.list_head_pa; 356 usb_log_debug2("Control HEAD set to: %p(%p).\n", 357 instance->transfers_control.list_head, 358 instance->transfers_control.list_head_pa); 359 usb_log_debug2("OHCI HCCA initialized at %p.\n", instance->hcca); 359 360 360 361 unsigned i = 0; -
uspace/drv/ohci/main.c
r0ede0c3 r78d4e1f 92 92 int main(int argc, char *argv[]) 93 93 { 94 usb_log_enable(USB_LOG_LEVEL_DE FAULT, NAME);94 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 95 95 sleep(5); 96 96 return ddf_driver_main(&ohci_driver); -
uspace/drv/ohci/transfer_list.c
r0ede0c3 r78d4e1f 143 143 144 144 fibril_mutex_lock(&instance->guard); 145 usb_log_debug2("Checking list %s for completed batches(%d).\n", 146 instance->name, list_count(&instance->batch_list)); 145 147 link_t *current = instance->batch_list.next; 146 148 while (current != &instance->batch_list) {
Note:
See TracChangeset
for help on using the changeset viewer.