Changeset 984a9ba in mainline for uspace/drv
- Timestamp:
- 2018-07-05T09:34:09Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- Location:
- uspace/drv
- Files:
-
- 26 edited
-
block/ata_bd/main.c (modified) (2 diffs)
-
block/ddisk/ddisk.c (modified) (3 diffs)
-
block/usbmast/main.c (modified) (2 diffs)
-
bus/adb/cuda_adb/cuda_adb.c (modified) (3 diffs)
-
bus/usb/vhc/conndev.c (modified) (3 diffs)
-
bus/usb/vhc/vhcd.h (modified) (1 diff)
-
char/i8042/i8042.c (modified) (2 diffs)
-
char/msim-con/msim-con.c (modified) (2 diffs)
-
char/ns8250/ns8250.c (modified) (5 diffs)
-
char/pl050/pl050.c (modified) (2 diffs)
-
char/ski-con/ski-con.c (modified) (2 diffs)
-
char/sun4v-con/sun4v-con.c (modified) (2 diffs)
-
fb/amdm37x_dispc/main.c (modified) (1 diff)
-
fb/kfb/port.c (modified) (2 diffs)
-
hid/adb-kbd/adb-kbd.c (modified) (7 diffs)
-
hid/adb-mouse/adb-mouse.c (modified) (7 diffs)
-
hid/atkbd/atkbd.c (modified) (5 diffs)
-
hid/ps2mouse/ps2mouse.c (modified) (4 diffs)
-
hid/usbhid/kbd/kbddev.c (modified) (7 diffs)
-
hid/usbhid/mouse/mousedev.c (modified) (4 diffs)
-
hid/usbhid/multimedia/multimedia.c (modified) (3 diffs)
-
hid/xtkbd/xtkbd.c (modified) (5 diffs)
-
intctl/apic/apic.c (modified) (3 diffs)
-
intctl/i8259/i8259.c (modified) (3 diffs)
-
intctl/icp-ic/icp-ic.c (modified) (3 diffs)
-
intctl/obio/obio.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ata_bd/main.c
r76f566d r984a9ba 47 47 static errno_t ata_fun_offline(ddf_fun_t *fun); 48 48 49 static void ata_bd_connection( cap_call_handle_t,ipc_call_t *, void *);49 static void ata_bd_connection(ipc_call_t *, void *); 50 50 51 51 static driver_ops_t driver_ops = { … … 313 313 314 314 /** Block device connection handler */ 315 static void ata_bd_connection( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)315 static void ata_bd_connection(ipc_call_t *icall, void *arg) 316 316 { 317 317 ata_fun_t *afun; 318 318 319 319 afun = (ata_fun_t *) ddf_fun_data_get((ddf_fun_t *)arg); 320 bd_conn(icall _handle, icall, &afun->bds);320 bd_conn(icall, &afun->bds); 321 321 } 322 322 -
uspace/drv/block/ddisk/ddisk.c
r76f566d r984a9ba 62 62 static errno_t ddisk_fun_offline(ddf_fun_t *); 63 63 64 static void ddisk_bd_connection( cap_call_handle_t,ipc_call_t *, void *);64 static void ddisk_bd_connection(ipc_call_t *, void *); 65 65 66 66 static void ddisk_irq_handler(ipc_call_t *, ddf_dev_t *); … … 585 585 586 586 /** Block device connection handler */ 587 static void ddisk_bd_connection( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)587 static void ddisk_bd_connection(ipc_call_t *icall, void *arg) 588 588 { 589 589 ddisk_t *ddisk; … … 591 591 592 592 ddisk = (ddisk_t *) ddf_dev_data_get(ddf_fun_get_dev(fun)); 593 bd_conn(icall _handle, icall, &ddisk->bds);593 bd_conn(icall, &ddisk->bds); 594 594 } 595 595 -
uspace/drv/block/usbmast/main.c
r76f566d r984a9ba 79 79 80 80 static errno_t usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun); 81 static void usbmast_bd_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, 82 void *arg); 81 static void usbmast_bd_connection(ipc_call_t *icall, void *arg); 83 82 84 83 static errno_t usbmast_bd_open(bd_srvs_t *, bd_srv_t *); … … 317 316 318 317 /** Blockdev client connection handler. */ 319 static void usbmast_bd_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, 320 void *arg) 318 static void usbmast_bd_connection(ipc_call_t *icall, void *arg) 321 319 { 322 320 usbmast_fun_t *mfun; 323 321 324 322 mfun = (usbmast_fun_t *) ddf_fun_data_get((ddf_fun_t *)arg); 325 bd_conn(icall _handle, icall, &mfun->bds);323 bd_conn(icall, &mfun->bds); 326 324 } 327 325 -
uspace/drv/bus/adb/cuda_adb/cuda_adb.c
r76f566d r984a9ba 55 55 #define NAME "cuda_adb" 56 56 57 static void cuda_dev_connection( cap_call_handle_t,ipc_call_t *, void *);57 static void cuda_dev_connection(ipc_call_t *, void *); 58 58 static errno_t cuda_init(cuda_t *); 59 59 static void cuda_irq_handler(ipc_call_t *, void *); … … 198 198 199 199 /** Device connection handler */ 200 static void cuda_dev_connection(cap_call_handle_t icall_handle, 201 ipc_call_t *icall, void *arg) 200 static void cuda_dev_connection(ipc_call_t *icall, void *arg) 202 201 { 203 202 adb_dev_t *dev = (adb_dev_t *) ddf_fun_data_get((ddf_fun_t *) arg); 204 cap_call_handle_t chandle;205 203 ipc_call_t call; 206 204 sysarg_t method; 207 205 208 206 /* Answer the IPC_M_CONNECT_ME_TO call. */ 209 async_answer_0(icall _handle, EOK);207 async_answer_0(icall, EOK); 210 208 211 209 while (true) { 212 chandle =async_get_call(&call);210 async_get_call(&call); 213 211 method = IPC_GET_IMETHOD(call); 214 212 215 213 if (!method) { 216 214 /* The other side has hung up. */ 217 async_answer_0( chandle, EOK);215 async_answer_0(&call, EOK); 218 216 return; 219 217 } … … 223 221 if (sess != NULL) { 224 222 dev->client_sess = sess; 225 async_answer_0( chandle, EOK);223 async_answer_0(&call, EOK); 226 224 } else { 227 async_answer_0( chandle, EINVAL);225 async_answer_0(&call, EINVAL); 228 226 } 229 227 } -
uspace/drv/bus/usb/vhc/conndev.c
r76f566d r984a9ba 89 89 /** Default handler for IPC methods not handled by DDF. 90 90 * 91 * @param fun Device handling the call.92 * @param icall _handle Call handle.93 * @param icall Call data.91 * @param fun Device handling the call. 92 * @param icall Call data. 93 * 94 94 */ 95 void default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 96 ipc_call_t *icall) 95 void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 97 96 { 98 97 vhc_data_t *vhc = ddf_fun_data_get(fun); … … 104 103 errno_t rc = vhc_virtdev_plug(vhc, callback, &plugged_device_handle); 105 104 if (rc != EOK) { 106 async_answer_0(icall _handle, rc);105 async_answer_0(icall, rc); 107 106 async_hangup(callback); 108 107 return; 109 108 } 110 109 111 async_answer_0(icall _handle, EOK);110 async_answer_0(icall, EOK); 112 111 113 112 receive_device_name(callback); … … 116 115 plugged_device_name, plugged_device_handle); 117 116 } else 118 async_answer_0(icall _handle, EINVAL);117 async_answer_0(icall, EINVAL); 119 118 } 120 119 -
uspace/drv/bus/usb/vhc/vhcd.h
r76f566d r984a9ba 88 88 89 89 void on_client_close(ddf_fun_t *fun); 90 void default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 91 ipc_call_t *icall); 90 void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall); 92 91 93 92 errno_t vhc_virtdev_plug(vhc_data_t *, async_sess_t *, uintptr_t *); -
uspace/drv/char/i8042/i8042.c
r76f566d r984a9ba 67 67 #define i8042_KBD_TRANSLATE 0x40 /* Use this to switch to XT scancodes */ 68 68 69 static void i8042_char_conn( cap_call_handle_t,ipc_call_t *, void *);69 static void i8042_char_conn(ipc_call_t *, void *); 70 70 static errno_t i8042_read(chardev_srv_t *, void *, size_t, size_t *); 71 71 static errno_t i8042_write(chardev_srv_t *, const void *, size_t, size_t *); … … 415 415 /** Handle data requests. 416 416 * 417 * @param id chandle418 417 * @param call IPC request. 419 418 * @param arg ddf_fun_t function. 420 */ 421 void i8042_char_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 419 * 420 */ 421 void i8042_char_conn(ipc_call_t *icall, void *arg) 422 422 { 423 423 i8042_port_t *port = ddf_fun_data_get((ddf_fun_t *)arg); 424 424 425 chardev_conn(icall _handle, icall, &port->cds);425 chardev_conn(icall, &port->cds); 426 426 } 427 427 -
uspace/drv/char/msim-con/msim-con.c
r76f566d r984a9ba 41 41 #include "msim-con.h" 42 42 43 static void msim_con_connection( cap_call_handle_t,ipc_call_t *, void *);43 static void msim_con_connection(ipc_call_t *, void *); 44 44 45 45 static errno_t msim_con_read(chardev_srv_t *, void *, size_t, size_t *); … … 217 217 218 218 /** Character device connection handler. */ 219 static void msim_con_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, 220 void *arg) 219 static void msim_con_connection(ipc_call_t *icall, void *arg) 221 220 { 222 221 msim_con_t *con = (msim_con_t *) ddf_dev_data_get( 223 222 ddf_fun_get_dev((ddf_fun_t *) arg)); 224 223 225 chardev_conn(icall _handle, icall, &con->cds);224 chardev_conn(icall, &con->cds); 226 225 } 227 226 -
uspace/drv/char/ns8250/ns8250.c
r76f566d r984a9ba 311 311 static errno_t ns8250_open(chardev_srvs_t *, chardev_srv_t *); 312 312 static errno_t ns8250_close(chardev_srv_t *); 313 static void ns8250_default_handler(chardev_srv_t *, cap_call_handle_t,ipc_call_t *);313 static void ns8250_default_handler(chardev_srv_t *, ipc_call_t *); 314 314 315 315 /** The character interface's callbacks. */ … … 322 322 }; 323 323 324 static void ns8250_char_conn( cap_call_handle_t,ipc_call_t *, void *);324 static void ns8250_char_conn(ipc_call_t *, void *); 325 325 326 326 static errno_t ns8250_dev_add(ddf_dev_t *dev); … … 1067 1067 * Configure the parameters of the serial communication. 1068 1068 */ 1069 static void ns8250_default_handler(chardev_srv_t *srv, cap_call_handle_t chandle, 1070 ipc_call_t *call) 1069 static void ns8250_default_handler(chardev_srv_t *srv, ipc_call_t *call) 1071 1070 { 1072 1071 ns8250_t *ns8250 = srv_ns8250(srv); … … 1079 1078 ns8250_get_props(ns8250->dev, &baud_rate, &parity, &word_length, 1080 1079 &stop_bits); 1081 async_answer_4(c handle, EOK, baud_rate, parity, word_length,1080 async_answer_4(call, EOK, baud_rate, parity, word_length, 1082 1081 stop_bits); 1083 1082 break; … … 1090 1089 ret = ns8250_set_props(ns8250->dev, baud_rate, parity, word_length, 1091 1090 stop_bits); 1092 async_answer_0(c handle, ret);1091 async_answer_0(call, ret); 1093 1092 break; 1094 1093 1095 1094 default: 1096 async_answer_0(c handle, ENOTSUP);1097 } 1098 } 1099 1100 void ns8250_char_conn( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)1095 async_answer_0(call, ENOTSUP); 1096 } 1097 } 1098 1099 void ns8250_char_conn(ipc_call_t *icall, void *arg) 1101 1100 { 1102 1101 ns8250_t *ns8250 = fun_ns8250((ddf_fun_t *)arg); 1103 1102 1104 chardev_conn(icall _handle, icall, &ns8250->cds);1103 chardev_conn(icall, &ns8250->cds); 1105 1104 } 1106 1105 -
uspace/drv/char/pl050/pl050.c
r76f566d r984a9ba 54 54 static errno_t pl050_fun_online(ddf_fun_t *); 55 55 static errno_t pl050_fun_offline(ddf_fun_t *); 56 static void pl050_char_conn( cap_call_handle_t,ipc_call_t *, void *);56 static void pl050_char_conn(ipc_call_t *, void *); 57 57 static errno_t pl050_read(chardev_srv_t *, void *, size_t, size_t *); 58 58 static errno_t pl050_write(chardev_srv_t *, const void *, size_t, size_t *); … … 286 286 } 287 287 288 void pl050_char_conn( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)288 void pl050_char_conn(ipc_call_t *icall, void *arg) 289 289 { 290 290 pl050_t *pl050 = pl050_from_fun((ddf_fun_t *)arg); 291 291 292 chardev_conn(icall _handle, icall, &pl050->cds);292 chardev_conn(icall, &pl050->cds); 293 293 } 294 294 -
uspace/drv/char/ski-con/ski-con.c
r76f566d r984a9ba 50 50 static errno_t ski_con_fibril(void *arg); 51 51 static int32_t ski_con_getchar(void); 52 static void ski_con_connection( cap_call_handle_t,ipc_call_t *, void *);52 static void ski_con_connection(ipc_call_t *, void *); 53 53 54 54 static errno_t ski_con_read(chardev_srv_t *, void *, size_t, size_t *); … … 255 255 256 256 /** Character device connection handler. */ 257 static void ski_con_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, 258 void *arg) 257 static void ski_con_connection(ipc_call_t *icall, void *arg) 259 258 { 260 259 ski_con_t *con = (ski_con_t *) ddf_dev_data_get( 261 260 ddf_fun_get_dev((ddf_fun_t *) arg)); 262 261 263 chardev_conn(icall _handle, icall, &con->cds);262 chardev_conn(icall, &con->cds); 264 263 } 265 264 -
uspace/drv/char/sun4v-con/sun4v-con.c
r76f566d r984a9ba 42 42 #include "sun4v-con.h" 43 43 44 static void sun4v_con_connection( cap_call_handle_t,ipc_call_t *, void *);44 static void sun4v_con_connection(ipc_call_t *, void *); 45 45 46 46 #define POLL_INTERVAL 10000 … … 181 181 182 182 /** Character device connection handler. */ 183 static void sun4v_con_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, 184 void *arg) 183 static void sun4v_con_connection(ipc_call_t *icall, void *arg) 185 184 { 186 185 sun4v_con_t *con = (sun4v_con_t *) ddf_dev_data_get( 187 186 ddf_fun_get_dev((ddf_fun_t *) arg)); 188 187 189 chardev_conn(icall _handle, icall, &con->cds);188 chardev_conn(icall, &con->cds); 190 189 } 191 190 -
uspace/drv/fb/amdm37x_dispc/main.c
r76f566d r984a9ba 46 46 #define NAME "amdm37x_dispc" 47 47 48 static void graph_vsl_connection( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)48 static void graph_vsl_connection(ipc_call_t *icall, void *arg) 49 49 { 50 50 visualizer_t *vsl; 51 51 52 52 vsl = (visualizer_t *) ddf_fun_data_get((ddf_fun_t *)arg); 53 graph_visualizer_connection(vsl, icall _handle, icall, NULL);53 graph_visualizer_connection(vsl, icall, NULL); 54 54 } 55 55 -
uspace/drv/fb/kfb/port.c
r76f566d r984a9ba 162 162 }; 163 163 164 static void graph_vsl_connection( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)164 static void graph_vsl_connection(ipc_call_t *icall, void *arg) 165 165 { 166 166 visualizer_t *vsl; … … 168 168 169 169 vsl = (visualizer_t *) ddf_fun_data_get((ddf_fun_t *)arg); 170 graph_visualizer_connection(vsl, icall _handle, icall, NULL);170 graph_visualizer_connection(vsl, icall, NULL); 171 171 172 172 if (kfb.addr != NULL) { -
uspace/drv/hid/adb-kbd/adb-kbd.c
r76f566d r984a9ba 43 43 #include "ctl.h" 44 44 45 static void adb_kbd_events( cap_call_handle_t,ipc_call_t *, void *);45 static void adb_kbd_events(ipc_call_t *, void *); 46 46 static void adb_kbd_reg0_data(adb_kbd_t *, uint16_t); 47 static void adb_kbd_conn( cap_call_handle_t,ipc_call_t *, void *);47 static void adb_kbd_conn(ipc_call_t *, void *); 48 48 49 49 /** Add ADB keyboard device */ … … 130 130 } 131 131 132 static void adb_kbd_events( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)132 static void adb_kbd_events(ipc_call_t *icall, void *arg) 133 133 { 134 134 adb_kbd_t *kbd = (adb_kbd_t *) arg; … … 136 136 /* Ignore parameters, the connection is already opened */ 137 137 while (true) { 138 139 138 ipc_call_t call; 140 cap_call_handle_t chandle =async_get_call(&call);139 async_get_call(&call); 141 140 142 141 errno_t retval = EOK; … … 154 153 retval = ENOENT; 155 154 } 156 async_answer_0( chandle, retval);155 async_answer_0(&call, retval); 157 156 } 158 157 } … … 191 190 192 191 /** Handle client connection */ 193 static void adb_kbd_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 194 { 195 cap_call_handle_t chandle; 192 static void adb_kbd_conn(ipc_call_t *icall, void *arg) 193 { 196 194 ipc_call_t call; 197 195 sysarg_t method; … … 201 199 * Answer the first IPC_M_CONNECT_ME_TO call. 202 200 */ 203 async_answer_0(icall _handle, EOK);201 async_answer_0(icall, EOK); 204 202 205 203 kbd = (adb_kbd_t *)ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg)); 206 204 207 205 while (true) { 208 chandle =async_get_call(&call);206 async_get_call(&call); 209 207 method = IPC_GET_IMETHOD(call); 210 208 211 209 if (!method) { 212 210 /* The other side has hung up. */ 213 async_answer_0( chandle, EOK);211 async_answer_0(&call, EOK); 214 212 return; 215 213 } … … 219 217 if (sess != NULL) { 220 218 kbd->client_sess = sess; 221 async_answer_0( chandle, EOK);219 async_answer_0(&call, EOK); 222 220 } else { 223 async_answer_0( chandle, EINVAL);221 async_answer_0(&call, EINVAL); 224 222 } 225 223 } -
uspace/drv/hid/adb-mouse/adb-mouse.c
r76f566d r984a9ba 41 41 #include "adb-mouse.h" 42 42 43 static void adb_mouse_conn( cap_call_handle_t,ipc_call_t *, void *);43 static void adb_mouse_conn(ipc_call_t *, void *); 44 44 45 45 static void adb_mouse_event_button(adb_mouse_t *mouse, int bnum, int bpress) … … 88 88 } 89 89 90 static void adb_mouse_events( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)90 static void adb_mouse_events(ipc_call_t *icall, void *arg) 91 91 { 92 92 adb_mouse_t *mouse = (adb_mouse_t *) arg; … … 95 95 while (true) { 96 96 ipc_call_t call; 97 cap_call_handle_t chandle =async_get_call(&call);97 async_get_call(&call); 98 98 99 99 errno_t retval = EOK; … … 112 112 } 113 113 114 async_answer_0( chandle, retval);114 async_answer_0(&call, retval); 115 115 } 116 116 } … … 200 200 201 201 /** Handle client connection */ 202 static void adb_mouse_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 203 { 204 cap_call_handle_t chandle; 202 static void adb_mouse_conn(ipc_call_t *icall, void *arg) 203 { 205 204 ipc_call_t call; 206 205 sysarg_t method; … … 210 209 * Answer the first IPC_M_CONNECT_ME_TO call. 211 210 */ 212 async_answer_0(icall _handle, EOK);211 async_answer_0(icall, EOK); 213 212 214 213 mouse = (adb_mouse_t *)ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg)); 215 214 216 215 while (true) { 217 chandle =async_get_call(&call);216 async_get_call(&call); 218 217 method = IPC_GET_IMETHOD(call); 219 218 220 219 if (!method) { 221 220 /* The other side has hung up. */ 222 async_answer_0( chandle, EOK);221 async_answer_0(&call, EOK); 223 222 return; 224 223 } … … 228 227 if (sess != NULL) { 229 228 mouse->client_sess = sess; 230 async_answer_0( chandle, EOK);229 async_answer_0(&call, EOK); 231 230 } else { 232 async_answer_0(chandle, EINVAL); 233 } 234 } 235 } 236 231 async_answer_0(&call, EINVAL); 232 } 233 } 234 } 237 235 238 236 /** -
uspace/drv/hid/atkbd/atkbd.c
r76f566d r984a9ba 292 292 /** Default handler for IPC methods not handled by DDF. 293 293 * 294 * @param fun Device function handling the call. 295 * @param icall_handle Call handle. 296 * @param icall Call data. 297 * 298 */ 299 static void 300 default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 301 ipc_call_t *icall) 294 * @param fun Device function handling the call. 295 * @param icall Call data. 296 * 297 */ 298 static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 302 299 { 303 300 const sysarg_t method = IPC_GET_IMETHOD(*icall); … … 307 304 switch (method) { 308 305 case KBDEV_SET_IND: 309 async_answer_0(icall _handle, ENOTSUP);306 async_answer_0(icall, ENOTSUP); 310 307 break; 311 308 case IPC_M_CONNECT_TO_ME: … … 320 317 ddf_msg(LVL_WARN, 321 318 "Failed creating callback session"); 322 async_answer_0(icall _handle, EAGAIN);319 async_answer_0(icall, EAGAIN); 323 320 break; 324 321 } … … 327 324 kbd->client_sess = sess; 328 325 ddf_msg(LVL_DEBUG, "Set client session"); 329 async_answer_0(icall _handle, EOK);326 async_answer_0(icall, EOK); 330 327 } else { 331 328 ddf_msg(LVL_ERROR, "Client session already set"); 332 async_answer_0(icall _handle, ELIMIT);329 async_answer_0(icall, ELIMIT); 333 330 } 334 331 … … 336 333 default: 337 334 ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method); 338 async_answer_0(icall _handle, EINVAL);335 async_answer_0(icall, EINVAL); 339 336 break; 340 337 } -
uspace/drv/hid/ps2mouse/ps2mouse.c
r76f566d r984a9ba 104 104 static errno_t polling_intellimouse(void *); 105 105 static errno_t probe_intellimouse(ps2_mouse_t *, bool); 106 static void default_connection_handler(ddf_fun_t *, cap_call_handle_t,ipc_call_t *);106 static void default_connection_handler(ddf_fun_t *, ipc_call_t *); 107 107 108 108 /** ps/2 mouse driver ops. */ … … 401 401 /** Default handler for IPC methods not handled by DDF. 402 402 * 403 * @param fun Device function handling the call. 404 * @param icall_handle Call handle. 405 * @param icall Call data. 406 */ 407 void default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 408 ipc_call_t *icall) 403 * @param fun Device function handling the call. 404 * @param icall Call data. 405 * 406 */ 407 void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 409 408 { 410 409 const sysarg_t method = IPC_GET_IMETHOD(*icall); … … 423 422 ddf_msg(LVL_WARN, 424 423 "Failed creating client callback session"); 425 async_answer_0(icall _handle, EAGAIN);424 async_answer_0(icall, EAGAIN); 426 425 break; 427 426 } … … 429 428 mouse->client_sess = sess; 430 429 ddf_msg(LVL_DEBUG, "Set client session"); 431 async_answer_0(icall _handle, EOK);430 async_answer_0(icall, EOK); 432 431 } else { 433 432 ddf_msg(LVL_ERROR, "Client session already set"); 434 async_answer_0(icall _handle, ELIMIT);433 async_answer_0(icall, ELIMIT); 435 434 } 436 435 break; 437 436 default: 438 437 ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method); 439 async_answer_0(icall _handle, EINVAL);438 async_answer_0(icall, EINVAL); 440 439 break; 441 440 } -
uspace/drv/hid/usbhid/kbd/kbddev.c
r76f566d r984a9ba 72 72 #include "../usbhid.h" 73 73 74 static void default_connection_handler(ddf_fun_t *, cap_call_handle_t,ipc_call_t *);74 static void default_connection_handler(ddf_fun_t *, ipc_call_t *); 75 75 static ddf_dev_ops_t kbdops = { .default_handler = default_connection_handler }; 76 76 … … 148 148 /* IPC method handler */ 149 149 150 /** 151 * Default handler for IPC methods not handled by DDF. 150 /** Default handler for IPC methods not handled by DDF. 152 151 * 153 152 * Currently recognizes only two methods (IPC_M_CONNECT_TO_ME and KBDEV_SET_IND) … … 156 155 * KBDEV_SET_IND sets LED keyboard indicators. 157 156 * 158 * @param fun Device function handling the call. 159 * @param icall_handle Call handle. 160 * @param icall Call data. 161 */ 162 static void 163 default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 164 ipc_call_t *icall) 157 * @param fun Device function handling the call. 158 * @param icall Call data. 159 * 160 */ 161 static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 165 162 { 166 163 const sysarg_t method = IPC_GET_IMETHOD(*icall); … … 172 169 kbd_dev->mods = IPC_GET_ARG1(*icall); 173 170 usb_kbd_set_led(kbd_dev->hid_dev, kbd_dev); 174 async_answer_0(icall _handle, EOK);171 async_answer_0(icall, EOK); 175 172 break; 176 173 /* … … 184 181 usb_log_warning( 185 182 "Failed to create start console session.\n"); 186 async_answer_0(icall _handle, EAGAIN);183 async_answer_0(icall, EAGAIN); 187 184 break; 188 185 } … … 190 187 kbd_dev->client_sess = sess; 191 188 usb_log_debug("%s: OK", __FUNCTION__); 192 async_answer_0(icall _handle, EOK);189 async_answer_0(icall, EOK); 193 190 } else { 194 191 usb_log_error("%s: console session already set", 195 192 __FUNCTION__); 196 async_answer_0(icall _handle, ELIMIT);193 async_answer_0(icall, ELIMIT); 197 194 } 198 195 break; … … 200 197 usb_log_error("%s: Unknown method: %d.", 201 198 __FUNCTION__, (int) method); 202 async_answer_0(icall _handle, EINVAL);199 async_answer_0(icall, EINVAL); 203 200 break; 204 201 } -
uspace/drv/hid/usbhid/mouse/mousedev.c
r76f566d r984a9ba 56 56 #define NAME "mouse" 57 57 58 static void default_connection_handler(ddf_fun_t *, cap_call_handle_t,ipc_call_t *);58 static void default_connection_handler(ddf_fun_t *, ipc_call_t *); 59 59 60 60 static ddf_dev_ops_t ops = { .default_handler = default_connection_handler }; … … 110 110 /** Default handler for IPC methods not handled by DDF. 111 111 * 112 * @param fun Device function handling the call. 113 * @param icall_handle Call handle. 114 * @param icall Call data. 115 */ 116 static void 117 default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 118 ipc_call_t *icall) 112 * @param fun Device function handling the call. 113 * @param icall Call data. 114 * 115 */ 116 static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 119 117 { 120 118 usb_mouse_t *mouse_dev = ddf_fun_data_get(fun); … … 122 120 if (mouse_dev == NULL) { 123 121 usb_log_debug("%s: Missing parameters.", __FUNCTION__); 124 async_answer_0(icall _handle, EINVAL);122 async_answer_0(icall, EINVAL); 125 123 return; 126 124 } … … 137 135 usb_log_debug("Console session to %s set ok (%p).", 138 136 ddf_fun_get_name(fun), sess); 139 async_answer_0(icall _handle, EOK);137 async_answer_0(icall, EOK); 140 138 } else { 141 139 usb_log_error("Console session to %s already set.", 142 140 ddf_fun_get_name(fun)); 143 async_answer_0(icall _handle, ELIMIT);141 async_answer_0(icall, ELIMIT); 144 142 async_hangup(sess); 145 143 } 146 144 } else { 147 145 usb_log_debug("%s: Invalid function.", __FUNCTION__); 148 async_answer_0(icall _handle, EINVAL);146 async_answer_0(icall, EINVAL); 149 147 } 150 148 } -
uspace/drv/hid/usbhid/multimedia/multimedia.c
r76f566d r984a9ba 73 73 74 74 75 /** 76 * Default handler for IPC methods not handled by DDF. 75 /** Default handler for IPC methods not handled by DDF. 77 76 * 78 77 * Currently recognizes only one method (IPC_M_CONNECT_TO_ME), in which case it … … 80 79 * later use by the driver to notify about key events. 81 80 * 82 * @param fun Device function handling the call. 83 * @param icall_handle Call handle. 84 * @param icall Call data. 85 */ 86 static void 87 default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 88 ipc_call_t *icall) 81 * @param fun Device function handling the call. 82 * @param icall Call data. 83 * 84 */ 85 static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 89 86 { 90 87 usb_log_debug(NAME " default_connection_handler()"); … … 99 96 usb_log_debug(NAME " Saved session to console: %p", 100 97 sess); 101 async_answer_0(icall _handle, EOK);98 async_answer_0(icall, EOK); 102 99 } else 103 async_answer_0(icall _handle, ELIMIT);100 async_answer_0(icall, ELIMIT); 104 101 } else 105 async_answer_0(icall _handle, EINVAL);102 async_answer_0(icall, EINVAL); 106 103 } 107 104 -
uspace/drv/hid/xtkbd/xtkbd.c
r76f566d r984a9ba 328 328 /** Default handler for IPC methods not handled by DDF. 329 329 * 330 * @param fun Device function handling the call. 331 * @param icall_handle Call handle. 332 * @param icall Call data. 333 * 334 */ 335 static void default_connection_handler(ddf_fun_t *fun, 336 cap_call_handle_t icall_handle, ipc_call_t *icall) 330 * @param fun Device function handling the call. 331 * @param icall Call data. 332 * 333 */ 334 static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 337 335 { 338 336 const sysarg_t method = IPC_GET_IMETHOD(*icall); … … 357 355 errno_t rc = chardev_write(kbd->chardev, &cmds[0], 1, &nwr); 358 356 if (rc != EOK) { 359 async_answer_0(icall _handle, rc);357 async_answer_0(icall, rc); 360 358 break; 361 359 } 362 360 363 361 rc = chardev_write(kbd->chardev, &cmds[1], 1, &nwr); 364 async_answer_0(icall _handle, rc);362 async_answer_0(icall, rc); 365 363 break; 366 364 case IPC_M_CONNECT_TO_ME: … … 375 373 ddf_msg(LVL_WARN, 376 374 "Failed creating callback session"); 377 async_answer_0(icall _handle, EAGAIN);375 async_answer_0(icall, EAGAIN); 378 376 break; 379 377 } … … 382 380 kbd->client_sess = sess; 383 381 ddf_msg(LVL_DEBUG, "Set client session"); 384 async_answer_0(icall _handle, EOK);382 async_answer_0(icall, EOK); 385 383 } else { 386 384 ddf_msg(LVL_ERROR, "Client session already set"); 387 async_answer_0(icall _handle, ELIMIT);385 async_answer_0(icall, ELIMIT); 388 386 } 389 387 … … 391 389 default: 392 390 ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method); 393 async_answer_0(icall _handle, EINVAL);391 async_answer_0(icall, EINVAL); 394 392 break; 395 393 } -
uspace/drv/intctl/apic/apic.c
r76f566d r984a9ba 160 160 /** Handle one connection to APIC. 161 161 * 162 * @param iid Hash of the request that opened the connection.163 162 * @param icall Call data of the request that opened the connection. 164 * @param arg Local argument.165 * /166 static void apic_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 167 { 168 cap_call_handle_t chandle; 163 * @param arg Local argument. 164 * 165 */ 166 static void apic_connection(ipc_call_t *icall, void *arg) 167 { 169 168 ipc_call_t call; 170 169 apic_t *apic; … … 173 172 * Answer the first IPC_M_CONNECT_ME_TO call. 174 173 */ 175 async_answer_0(icall _handle, EOK);176 177 apic = (apic_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));174 async_answer_0(icall, EOK); 175 176 apic = (apic_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 178 177 179 178 while (true) { 180 chandle =async_get_call(&call);179 async_get_call(&call); 181 180 182 181 if (!IPC_GET_IMETHOD(call)) { 183 182 /* The other side has hung up. */ 184 async_answer_0( chandle, EOK);183 async_answer_0(&call, EOK); 185 184 return; 186 185 } … … 188 187 switch (IPC_GET_IMETHOD(call)) { 189 188 case IRC_ENABLE_INTERRUPT: 190 async_answer_0( chandle, apic_enable_irq(apic,189 async_answer_0(&call, apic_enable_irq(apic, 191 190 IPC_GET_ARG1(call))); 192 191 break; 193 192 case IRC_DISABLE_INTERRUPT: 194 193 /* XXX TODO */ 195 async_answer_0( chandle, EOK);194 async_answer_0(&call, EOK); 196 195 break; 197 196 case IRC_CLEAR_INTERRUPT: 198 197 /* Noop */ 199 async_answer_0( chandle, EOK);198 async_answer_0(&call, EOK); 200 199 break; 201 200 default: 202 async_answer_0( chandle, EINVAL);201 async_answer_0(&call, EINVAL); 203 202 break; 204 203 } -
uspace/drv/intctl/i8259/i8259.c
r76f566d r984a9ba 89 89 /** Handle one connection to i8259. 90 90 * 91 * @param iid Hash of the request that opened the connection.92 91 * @param icall Call data of the request that opened the connection. 93 * @param arg Local argument.94 * /95 static void i8259_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 96 { 97 cap_call_handle_t chandle; 92 * @param arg Local argument. 93 * 94 */ 95 static void i8259_connection(ipc_call_t *icall, void *arg) 96 { 98 97 ipc_call_t call; 99 98 i8259_t *i8259 = NULL /* XXX */; … … 102 101 * Answer the first IPC_M_CONNECT_ME_TO call. 103 102 */ 104 async_answer_0(icall _handle, EOK);105 106 i8259 = (i8259_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));103 async_answer_0(icall, EOK); 104 105 i8259 = (i8259_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 107 106 108 107 while (true) { 109 chandle =async_get_call(&call);108 async_get_call(&call); 110 109 111 110 if (!IPC_GET_IMETHOD(call)) { 112 111 /* The other side has hung up. */ 113 async_answer_0( chandle, EOK);112 async_answer_0(&call, EOK); 114 113 return; 115 114 } … … 117 116 switch (IPC_GET_IMETHOD(call)) { 118 117 case IRC_ENABLE_INTERRUPT: 119 async_answer_0( chandle, pic_enable_irq(i8259,118 async_answer_0(&call, pic_enable_irq(i8259, 120 119 IPC_GET_ARG1(call))); 121 120 break; 122 121 case IRC_DISABLE_INTERRUPT: 123 122 /* XXX TODO */ 124 async_answer_0( chandle, EOK);123 async_answer_0(&call, EOK); 125 124 break; 126 125 case IRC_CLEAR_INTERRUPT: 127 126 /* Noop */ 128 async_answer_0( chandle, EOK);127 async_answer_0(&call, EOK); 129 128 break; 130 129 default: 131 async_answer_0( chandle, EINVAL);130 async_answer_0(&call, EINVAL); 132 131 break; 133 132 } -
uspace/drv/intctl/icp-ic/icp-ic.c
r76f566d r984a9ba 65 65 /** Client connection handler. 66 66 * 67 * @param iid Hash of the request that opened the connection.68 67 * @param icall Call data of the request that opened the connection. 69 * @param arg Local argument. 68 * @param arg Local argument. 69 * 70 70 */ 71 static void icpic_connection( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)71 static void icpic_connection(ipc_call_t *icall, void *arg) 72 72 { 73 cap_call_handle_t chandle;74 73 ipc_call_t call; 75 74 icpic_t *icpic; … … 78 77 * Answer the first IPC_M_CONNECT_ME_TO call. 79 78 */ 80 async_answer_0(icall _handle, EOK);79 async_answer_0(icall, EOK); 81 80 82 icpic = (icpic_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));81 icpic = (icpic_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 83 82 84 83 while (true) { 85 chandle =async_get_call(&call);84 async_get_call(&call); 86 85 87 86 if (!IPC_GET_IMETHOD(call)) { 88 87 /* The other side has hung up. */ 89 async_answer_0( chandle, EOK);88 async_answer_0(&call, EOK); 90 89 return; 91 90 } … … 93 92 switch (IPC_GET_IMETHOD(call)) { 94 93 case IRC_ENABLE_INTERRUPT: 95 async_answer_0( chandle,94 async_answer_0(&call, 96 95 icpic_enable_irq(icpic, IPC_GET_ARG1(call))); 97 96 break; 98 97 case IRC_DISABLE_INTERRUPT: 99 98 /* XXX TODO */ 100 async_answer_0( chandle, EOK);99 async_answer_0(&call, EOK); 101 100 break; 102 101 case IRC_CLEAR_INTERRUPT: 103 102 /* Noop */ 104 async_answer_0( chandle, EOK);103 async_answer_0(&call, EOK); 105 104 break; 106 105 default: 107 async_answer_0( chandle, EINVAL);106 async_answer_0(&call, EINVAL); 108 107 break; 109 108 } -
uspace/drv/intctl/obio/obio.c
r76f566d r984a9ba 69 69 /** Handle one connection to obio. 70 70 * 71 * @param i id Hashof the request that opened the connection.72 * @param icall Call data of the request that opened the connection.73 * @param arg Local argument.71 * @param icall Call data of the request that opened the connection. 72 * @param arg Local argument. 73 * 74 74 */ 75 static void obio_connection( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)75 static void obio_connection(ipc_call_t *icall, void *arg) 76 76 { 77 cap_call_handle_t chandle;78 77 ipc_call_t call; 79 78 obio_t *obio; … … 82 81 * Answer the first IPC_M_CONNECT_ME_TO call. 83 82 */ 84 async_answer_0(icall _handle, EOK);83 async_answer_0(icall, EOK); 85 84 86 obio = (obio_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));85 obio = (obio_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 87 86 88 87 while (true) { 89 88 int inr; 90 89 91 chandle = async_get_call(&call); 90 async_get_call(&call); 91 92 92 switch (IPC_GET_IMETHOD(call)) { 93 93 case IRC_ENABLE_INTERRUPT: … … 95 95 pio_set_64(&obio->regs[OBIO_IMR(inr & INO_MASK)], 96 96 1UL << 31, 0); 97 async_answer_0( chandle, EOK);97 async_answer_0(&call, EOK); 98 98 break; 99 99 case IRC_DISABLE_INTERRUPT: 100 100 /* XXX TODO */ 101 async_answer_0( chandle, EOK);101 async_answer_0(&call, EOK); 102 102 break; 103 103 case IRC_CLEAR_INTERRUPT: 104 104 inr = IPC_GET_ARG1(call); 105 105 pio_write_64(&obio->regs[OBIO_CIR(inr & INO_MASK)], 0); 106 async_answer_0( chandle, EOK);106 async_answer_0(&call, EOK); 107 107 break; 108 108 default: 109 async_answer_0( chandle, EINVAL);109 async_answer_0(&call, EINVAL); 110 110 break; 111 111 }
Note:
See TracChangeset
for help on using the changeset viewer.
