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