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