Changeset e9c5bd9 in mainline
- Timestamp:
- 2014-01-25T07:10:04Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 44b9b44
- Parents:
- 23e5471
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hc.c
r23e5471 re9c5bd9 47 47 48 48 //#include "ehci_endpoint.h" 49 //#include "ehci_batch.h"49 #include "ehci_batch.h" 50 50 #include "utils/malloc32.h" 51 51 … … 280 280 /* Check for root hub communication */ 281 281 if (batch->ep->address == ehci_rh_get_address(&instance->rh)) { 282 usb_log_debug("EHCI root hub request.\n");283 282 return ehci_rh_schedule(&instance->rh, batch); 284 283 } 285 return ENOTSUP; 284 ehci_transfer_batch_t *ehci_batch = ehci_transfer_batch_get(batch); 285 if (!ehci_batch) 286 return ENOMEM; 287 288 fibril_mutex_lock(&instance->guard); 289 list_append(&ehci_batch->link, &instance->pending_batches); 290 ehci_transfer_batch_commit(ehci_batch); 291 292 fibril_mutex_unlock(&instance->guard); 293 return EOK; 286 294 } 287 295 … … 303 311 fibril_condvar_signal(&instance->async_doorbell); 304 312 } 313 if (status & (USB_STS_IRQ_FLAG | USB_STS_ERR_IRQ_FLAG)) { 314 fibril_mutex_lock(&instance->guard); 315 316 link_t *current = list_first(&instance->pending_batches); 317 while (current && current != &instance->pending_batches.head) { 318 link_t *next = current->next; 319 ehci_transfer_batch_t *batch = 320 ehci_transfer_batch_from_link(current); 321 322 if (ehci_transfer_batch_is_complete(batch)) { 323 list_remove(current); 324 ehci_transfer_batch_finish_dispose(batch); 325 } 326 current = next; 327 } 328 fibril_mutex_unlock(&instance->guard); 329 } 330 305 331 } 306 332
Note:
See TracChangeset
for help on using the changeset viewer.