Changeset 41e645c in mainline for uspace/lib/drv/generic/remote_usbhc.c
- Timestamp:
- 2011-02-20T21:43:50Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 070f11e, ace12560
- Parents:
- 423e8c81 (diff), 063ead6f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usbhc.c
r423e8c81 r41e645c 43 43 #define HACK_MAX_PACKET_SIZE_INTERRUPT_IN 4 44 44 45 static void remote_usbhc_get_address(device_t *, void *, ipc_callid_t, ipc_call_t *);46 45 static void remote_usbhc_interrupt_out(device_t *, void *, ipc_callid_t, ipc_call_t *); 47 46 static void remote_usbhc_interrupt_in(device_t *, void *, ipc_callid_t, ipc_call_t *); 47 static void remote_usbhc_bulk_out(device_t *, void *, ipc_callid_t, ipc_call_t *); 48 static void remote_usbhc_bulk_in(device_t *, void *, ipc_callid_t, ipc_call_t *); 48 49 static void remote_usbhc_control_write(device_t *, void *, ipc_callid_t, ipc_call_t *); 49 50 static void remote_usbhc_control_read(device_t *, void *, ipc_callid_t, ipc_call_t *); … … 57 58 /** Remote USB host controller interface operations. */ 58 59 static remote_iface_func_ptr_t remote_usbhc_iface_ops [] = { 59 remote_usbhc_get_address,60 61 60 remote_usbhc_reserve_default_address, 62 61 remote_usbhc_release_default_address, … … 68 67 remote_usbhc_interrupt_out, 69 68 remote_usbhc_interrupt_in, 69 70 remote_usbhc_bulk_out, 71 remote_usbhc_bulk_in, 70 72 71 73 remote_usbhc_control_write, … … 121 123 } 122 124 123 void remote_usbhc_get_address(device_t *device, void *iface,124 ipc_callid_t callid, ipc_call_t *call)125 {126 usbhc_iface_t *usb_iface = (usbhc_iface_t *) iface;127 128 if (!usb_iface->tell_address) {129 async_answer_0(callid, ENOTSUP);130 return;131 }132 133 devman_handle_t handle = DEV_IPC_GET_ARG1(*call);134 135 usb_address_t address;136 int rc = usb_iface->tell_address(device, handle, &address);137 if (rc != EOK) {138 async_answer_0(callid, rc);139 } else {140 async_answer_1(callid, EOK, address);141 }142 }143 144 125 void remote_usbhc_reserve_default_address(device_t *device, void *iface, 145 126 ipc_callid_t callid, ipc_call_t *call) … … 389 370 return remote_usbhc_in_transfer(device, callid, call, 390 371 usb_iface->interrupt_in); 372 } 373 374 void remote_usbhc_bulk_out(device_t *device, void *iface, 375 ipc_callid_t callid, ipc_call_t *call) 376 { 377 usbhc_iface_t *usb_iface = (usbhc_iface_t *) iface; 378 assert(usb_iface != NULL); 379 380 return remote_usbhc_out_transfer(device, callid, call, 381 usb_iface->bulk_out); 382 } 383 384 void remote_usbhc_bulk_in(device_t *device, void *iface, 385 ipc_callid_t callid, ipc_call_t *call) 386 { 387 usbhc_iface_t *usb_iface = (usbhc_iface_t *) iface; 388 assert(usb_iface != NULL); 389 390 return remote_usbhc_in_transfer(device, callid, call, 391 usb_iface->bulk_in); 391 392 } 392 393
Note:
See TracChangeset
for help on using the changeset viewer.