Changeset 4db49344 in mainline for uspace/drv/bus/usb/xhci/transfers.c
- Timestamp:
- 2018-01-23T21:52:28Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3dd80f8
- Parents:
- a6afb4c
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-23 20:49:35)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-23 21:52:28)
- File:
-
- 1 edited
-
uspace/drv/bus/usb/xhci/transfers.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/transfers.c
ra6afb4c r4db49344 300 300 301 301 if (TRB_EVENT_DATA(*trb)) { 302 assert(ep->base.transfer_type != USB_TRANSFER_ISOCHRONOUS); 302 /* We schedule those only when streams are involved */ 303 assert(ep->primary_stream_ctx_array != NULL); 304 303 305 /* We are received transfer pointer instead - work with that */ 304 306 transfer = (xhci_transfer_t *) addr; … … 306 308 transfer->interrupt_trb_phys); 307 309 batch = &transfer->batch; 308 309 fibril_mutex_lock(&ep->base.guard);310 endpoint_deactivate_locked(&ep->base);311 fibril_mutex_unlock(&ep->base.guard);312 310 } 313 311 else { … … 321 319 } 322 320 323 fibril_mutex_lock(&ep-> base.guard);321 fibril_mutex_lock(&ep->guard); 324 322 batch = ep->base.active_batch; 323 endpoint_deactivate_locked(&ep->base); 324 fibril_mutex_unlock(&ep->guard); 325 325 326 if (!batch) { 326 fibril_mutex_unlock(&ep->base.guard);327 327 /* Dropping temporary reference */ 328 328 endpoint_del_ref(&ep->base); … … 331 331 332 332 transfer = xhci_transfer_from_batch(batch); 333 334 endpoint_deactivate_locked(&ep->base);335 fibril_mutex_unlock(&ep->base.guard);336 333 } 337 334 … … 482 479 483 480 484 fibril_mutex_lock(&ep->guard); 485 endpoint_activate_locked(ep, batch); 486 const int err = transfer_handlers[batch->ep->transfer_type](hc, transfer); 487 488 if (err) { 481 int err; 482 fibril_mutex_lock(&xhci_ep->guard); 483 484 if ((err = endpoint_activate_locked(ep, batch))) { 485 fibril_mutex_unlock(&xhci_ep->guard); 486 return err; 487 } 488 489 if ((err = transfer_handlers[batch->ep->transfer_type](hc, transfer))) { 489 490 endpoint_deactivate_locked(ep); 490 fibril_mutex_unlock(& ep->guard);491 fibril_mutex_unlock(&xhci_ep->guard); 491 492 return err; 492 493 } 493 494 494 495 hc_ring_ep_doorbell(xhci_ep, batch->target.stream); 495 fibril_mutex_unlock(& ep->guard);496 fibril_mutex_unlock(&xhci_ep->guard); 496 497 return EOK; 497 498 }
Note:
See TracChangeset
for help on using the changeset viewer.
