Changeset a35b458 in mainline for uspace/drv/bus/usb/vhc/conndev.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/conndev.c
r3061bc1 ra35b458 57 57 { 58 58 async_exch_t *exch = async_exchange_begin(sess); 59 59 60 60 aid_t opening_request = async_send_0(exch, IPC_M_USBVIRT_GET_NAME, NULL); 61 61 if (opening_request == 0) { … … 63 63 return; 64 64 } 65 65 66 66 ipc_call_t data_request_call; 67 67 aid_t data_request = async_data_read(exch, plugged_device_name, 68 68 PLUGGED_DEVICE_NAME_MAXLEN, &data_request_call); 69 69 70 70 async_exchange_end(exch); 71 71 72 72 if (data_request == 0) { 73 73 async_forget(opening_request); 74 74 return; 75 75 } 76 76 77 77 errno_t data_request_rc; 78 78 errno_t opening_request_rc; 79 79 async_wait_for(data_request, &data_request_rc); 80 80 async_wait_for(opening_request, &opening_request_rc); 81 81 82 82 if ((data_request_rc != EOK) || (opening_request_rc != EOK)) 83 83 return; 84 84 85 85 size_t len = IPC_GET_ARG2(data_request_call); 86 86 plugged_device_name[len] = 0; … … 97 97 { 98 98 vhc_data_t *vhc = ddf_fun_data_get(fun); 99 99 100 100 async_sess_t *callback = 101 101 async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 102 102 103 103 if (callback) { 104 104 errno_t rc = vhc_virtdev_plug(vhc, callback, &plugged_device_handle); … … 108 108 return; 109 109 } 110 110 111 111 async_answer_0(icallid, EOK); 112 112 113 113 receive_device_name(callback); 114 114 115 115 usb_log_info("New virtual device `%s' (id: %" PRIxn ").", 116 116 plugged_device_name, plugged_device_handle);
Note:
See TracChangeset
for help on using the changeset viewer.