Changes in uspace/drv/vhc/conndev.c [79ae36dd:8869f7b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/vhc/conndev.c
r79ae36dd r8869f7b 45 45 static fibril_local char plugged_device_name[PLUGGED_DEVICE_NAME_MAXLEN + 1] = "<unknown>"; 46 46 47 #if 048 47 /** Receive device name. 49 48 * … … 85 84 plugged_device_name[len] = 0; 86 85 } 87 #endif88 86 89 87 /** Default handler for IPC methods not handled by DDF. … … 93 91 * @param icall Call data. 94 92 */ 95 void default_connection_handler(ddf_fun_t *fun, 96 ipc_call id_t icallid, ipc_call_t *icall)93 void default_connection_handler(ddf_fun_t *fun, ipc_callid_t icallid, 94 ipc_call_t *icall) 97 95 { 98 // FIXME:99 // This code needs to be refactored since the async100 // framework does not support automatic callback connections101 // yet.102 103 #if 0104 96 vhc_data_t *vhc = fun->dev->driver_data; 105 sysarg_t method = IPC_GET_IMETHOD(*icall);106 107 if (method == IPC_M_CONNECT_TO_ME) {108 int callback = IPC_GET_ARG5(*icall);109 int rc = vhc_virtdev_plug(vhc, callback,110 97 98 async_sess_t *callback = 99 async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 100 101 if (callback) { 102 int rc = vhc_virtdev_plug(vhc, callback, &plugged_device_handle); 111 103 if (rc != EOK) { 112 104 async_answer_0(icallid, rc); … … 114 106 return; 115 107 } 116 108 117 109 async_answer_0(icallid, EOK); 118 110 119 111 receive_device_name(callback); 120 112 121 113 usb_log_info("New virtual device `%s' (id: %" PRIxn ").\n", 122 114 plugged_device_name, plugged_device_handle); 123 124 return; 125 } 126 #endif 127 128 async_answer_0(icallid, EINVAL); 115 } else 116 async_answer_0(icallid, EINVAL); 129 117 } 130 118
Note:
See TracChangeset
for help on using the changeset viewer.