Changeset 9c10e51 in mainline for uspace/drv/bus/usb/ohci/hc.c
- Timestamp:
- 2011-08-31T22:50:21Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4e9ecf4
- Parents:
- f18d82f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
rf18d82f0 r9c10e51 289 289 { 290 290 assert(hcd); 291 batch_init_ohci(batch);292 291 hc_t *instance = hcd->private_data; 293 292 assert(instance); … … 298 297 return EOK; 299 298 } 299 ohci_transfer_batch_t *ohci_batch = ohci_transfer_batch_get(batch); 300 if (!ohci_batch) 301 return ENOMEM; 300 302 301 303 fibril_mutex_lock(&instance->guard); 302 list_append(& batch->link, &instance->pending_batches);303 batch_commit(batch);304 list_append(&ohci_batch->link, &instance->pending_batches); 305 ohci_transfer_batch_commit(ohci_batch); 304 306 305 307 /* Control and bulk schedules need a kick to start working */ … … 341 343 instance->registers->periodic_current); 342 344 343 link_t *current = instance->pending_batches.head.next;344 while (current != &instance->pending_batches.head) {345 link_t *current = list_first(&instance->pending_batches); 346 while (current && current != &instance->pending_batches.head) { 345 347 link_t *next = current->next; 346 usb_transfer_batch_t *batch =347 usb_transfer_batch_from_link(current);348 349 if ( batch_is_complete(batch)) {348 ohci_transfer_batch_t *batch = 349 ohci_transfer_batch_from_link(current); 350 351 if (ohci_transfer_batch_is_complete(batch)) { 350 352 list_remove(current); 351 usb_transfer_batch_finish(batch);353 ohci_transfer_batch_finish_dispose(batch); 352 354 } 353 355
Note:
See TracChangeset
for help on using the changeset viewer.