Changeset eea3e39 in mainline
- Timestamp:
- 2011-10-31T09:46:52Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3562cd18
- Parents:
- cae002c
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmid/usbmid.c
rcae002c reea3e39 63 63 static usb_iface_t child_usb_iface = { 64 64 .get_hc_handle = usb_iface_get_hc_handle_hub_child_impl, 65 .get_address = usb_iface_get_address_ hub_impl,65 .get_address = usb_iface_get_address_forward_impl, 66 66 .get_interface = usb_iface_get_interface_impl 67 67 }; -
uspace/lib/usb/include/usb/ddfiface.h
rcae002c reea3e39 40 40 41 41 int usb_iface_get_hc_handle_hub_impl(ddf_fun_t *, devman_handle_t *); 42 int usb_iface_get_address_ hub_impl(ddf_fun_t *, devman_handle_t,42 int usb_iface_get_address_forward_impl(ddf_fun_t *, devman_handle_t, 43 43 usb_address_t *); 44 44 extern usb_iface_t usb_iface_hub_impl; 45 45 46 46 int usb_iface_get_hc_handle_hub_child_impl(ddf_fun_t *, devman_handle_t *); 47 int usb_iface_get_address_ hub_child_impl(ddf_fun_t *, devman_handle_t,47 int usb_iface_get_address_set_my_handle_impl(ddf_fun_t *, devman_handle_t, 48 48 usb_address_t *); 49 49 extern usb_iface_t usb_iface_hub_child_impl; -
uspace/lib/usb/src/ddfiface.c
rcae002c reea3e39 45 45 usb_iface_t usb_iface_hub_impl = { 46 46 .get_hc_handle = usb_iface_get_hc_handle_hub_impl, 47 .get_address = usb_iface_get_address_ hub_impl47 .get_address = usb_iface_get_address_forward_impl, 48 48 }; 49 49 … … 51 51 usb_iface_t usb_iface_hub_child_impl = { 52 52 .get_hc_handle = usb_iface_get_hc_handle_hub_child_impl, 53 .get_address = usb_iface_get_address_ hub_child_impl53 .get_address = usb_iface_get_address_set_my_handle_impl 54 54 }; 55 55 … … 125 125 * @return Error code. 126 126 */ 127 int usb_iface_get_address_ hub_impl(ddf_fun_t *fun, devman_handle_t handle,127 int usb_iface_get_address_forward_impl(ddf_fun_t *fun, devman_handle_t handle, 128 128 usb_address_t *address) 129 129 { 130 130 assert(fun); 131 131 132 132 async_sess_t *parent_sess = 133 133 devman_parent_device_connect(EXCHANGE_SERIALIZE, fun->handle, … … 135 135 if (!parent_sess) 136 136 return ENOMEM; 137 137 138 138 async_exch_t *exch = async_exchange_begin(parent_sess); 139 139 140 140 sysarg_t addr; 141 141 int rc = async_req_2_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), 142 142 IPC_M_USB_GET_ADDRESS, handle, &addr); 143 143 144 144 async_exchange_end(exch); 145 145 async_hangup(parent_sess); 146 146 147 147 if (rc != EOK) 148 148 return rc; 149 149 150 150 if (address != NULL) 151 151 *address = (usb_address_t) addr; 152 152 153 153 return EOK; 154 154 } … … 157 157 * a hub driver. 158 158 * 159 * This implementation eccepts 0 as valid handle and replaces it with fun's 160 * handle. 161 * 159 162 * @param[in] fun Device function the operation is running on. 160 163 * @param[in] handle Devman handle of USB device we want address of. … … 162 165 * @return Error code. 163 166 */ 164 int usb_iface_get_address_ hub_child_impl(ddf_fun_t *fun,167 int usb_iface_get_address_set_my_handle_impl(ddf_fun_t *fun, 165 168 devman_handle_t handle, usb_address_t *address) 166 169 { … … 168 171 handle = fun->handle; 169 172 } 170 return usb_iface_get_address_ hub_impl(fun, handle, address);173 return usb_iface_get_address_forward_impl(fun, handle, address); 171 174 } 172 175 -
uspace/lib/usbdev/src/recognise.c
rcae002c reea3e39 50 50 51 51 /** DDF operations of child devices. */ 52 ddf_dev_ops_t child_ops = {52 static ddf_dev_ops_t child_ops = { 53 53 .interfaces[USB_DEV_IFACE] = &usb_iface_hub_child_impl 54 54 }; … … 339 339 * @param[in] hc_handle Handle of the host controller. 340 340 * @param[in] parent Parent device. 341 * @param[in] dev_ops Child device ops. 341 * @param[in] dev_ops Child device ops. Default child_ops will be used if NULL. 342 342 * @param[in] dev_data Arbitrary pointer to be stored in the child 343 343 * as @c driver_data.
Note:
See TracChangeset
for help on using the changeset viewer.