Changes in uspace/lib/usb/src/hc.c [e280857:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/hc.c
re280857 r79ae36dd 98 98 return EBUSY; 99 99 100 async_sess_t *sess = devman_device_connect(EXCHANGE_ ATOMIC,100 async_sess_t *sess = devman_device_connect(EXCHANGE_SERIALIZE, 101 101 connection->hc_handle, 0); 102 102 if (!sess) … … 177 177 { 178 178 async_sess_t *parent_sess = 179 devman_parent_device_connect(EXCHANGE_ ATOMIC, dev_handle,179 devman_parent_device_connect(EXCHANGE_SERIALIZE, dev_handle, 180 180 IPC_FLAG_BLOCKING); 181 181 if (!parent_sess) … … 201 201 /** Get host controller handle by its class index. 202 202 * 203 * @param sid Service ID of the HC function.203 * @param class_index Class index for the host controller. 204 204 * @param hc_handle Where to store the HC handle 205 205 * (can be NULL for existence test only). 206 206 * @return Error code. 207 207 */ 208 int usb_ddf_get_hc_handle_by_sid(service_id_t sid, devman_handle_t *hc_handle) 209 { 210 devman_handle_t handle; 208 int usb_ddf_get_hc_handle_by_class(size_t class_index, 209 devman_handle_t *hc_handle) 210 { 211 char *class_index_str; 212 devman_handle_t hc_handle_tmp; 211 213 int rc; 212 213 rc = devman_fun_sid_to_handle(sid, &handle); 214 if (hc_handle != NULL) 215 *hc_handle = handle; 216 217 return rc; 214 215 rc = asprintf(&class_index_str, "%zu", class_index); 216 if (rc < 0) { 217 return ENOMEM; 218 } 219 rc = devman_device_get_handle_by_class("usbhc", class_index_str, 220 &hc_handle_tmp, 0); 221 free(class_index_str); 222 if (rc != EOK) { 223 return rc; 224 } 225 226 if (hc_handle != NULL) { 227 *hc_handle = hc_handle_tmp; 228 } 229 230 return EOK; 218 231 } 219 232 … … 228 241 { 229 242 async_sess_t *parent_sess = 230 devman_parent_device_connect(EXCHANGE_ ATOMIC, device_handle,243 devman_parent_device_connect(EXCHANGE_SERIALIZE, device_handle, 231 244 IPC_FLAG_BLOCKING); 232 245 if (!parent_sess)
Note:
See TracChangeset
for help on using the changeset viewer.