Changes in uspace/lib/usbdev/src/pipesinit.c [79ae36dd:160b75e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/pipesinit.c
r79ae36dd r160b75e 358 358 fibril_mutex_initialize(&pipe->guard); 359 359 pipe->wire = connection; 360 pipe->hc_ sess = NULL;361 fibril_mutex_initialize(&pipe->hc_ sess_mutex);360 pipe->hc_phone = -1; 361 fibril_mutex_initialize(&pipe->hc_phone_mutex); 362 362 pipe->endpoint_no = endpoint_no; 363 363 pipe->transfer_type = transfer_type; … … 482 482 assert(pipe); 483 483 assert(hc_connection); 484 485 if (!usb_hc_connection_is_opened(hc_connection)) 484 485 if (!usb_hc_connection_is_opened(hc_connection)) { 486 486 return EBADF; 487 487 } 488 488 489 #define _PACK2(high, low) (((high) << 16) + (low)) 489 490 #define _PACK3(high, middle, low) (((((high) << 8) + (middle)) << 8) + (low)) 490 491 async_exch_t *exch = async_exchange_begin(hc_connection->hc_sess); 492 int rc = async_req_4_0(exch, DEV_IFACE_ID(USBHC_DEV_IFACE), 493 IPC_M_USBHC_REGISTER_ENDPOINT, 491 492 return async_req_4_0(hc_connection->hc_phone, 493 DEV_IFACE_ID(USBHC_DEV_IFACE), IPC_M_USBHC_REGISTER_ENDPOINT, 494 494 _PACK2(pipe->wire->address, pipe->endpoint_no), 495 495 _PACK3(speed, pipe->transfer_type, pipe->direction), 496 496 _PACK2(pipe->max_packet_size, interval)); 497 async_exchange_end(exch); 498 497 499 498 #undef _PACK2 500 499 #undef _PACK3 501 502 return rc;503 500 } 504 501 … … 514 511 assert(pipe); 515 512 assert(hc_connection); 516 517 if (!usb_hc_connection_is_opened(hc_connection)) 513 514 if (!usb_hc_connection_is_opened(hc_connection)) { 518 515 return EBADF; 519 520 async_exch_t *exch = async_exchange_begin(hc_connection->hc_sess); 521 int rc = async_req_4_0(exch, DEV_IFACE_ID(USBHC_DEV_IFACE),522 IPC_M_USBHC_UNREGISTER_ENDPOINT,516 } 517 518 return async_req_4_0(hc_connection->hc_phone, 519 DEV_IFACE_ID(USBHC_DEV_IFACE), IPC_M_USBHC_UNREGISTER_ENDPOINT, 523 520 pipe->wire->address, pipe->endpoint_no, pipe->direction); 524 async_exchange_end(exch);525 526 return rc;527 521 } 528 522
Note:
See TracChangeset
for help on using the changeset viewer.