Lines Matching refs:ubuf

341 static ssize_t tool_fn_read(struct tool_ctx *tc, char __user *ubuf,  in tool_fn_read()  argument
356 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_fn_read()
360 const char __user *ubuf, in tool_fn_write() argument
373 buf = memdup_user_nul(ubuf, size); in tool_fn_write()
405 static ssize_t tool_port_read(struct file *filep, char __user *ubuf, in tool_port_read() argument
414 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_port_read()
421 static ssize_t tool_peer_port_read(struct file *filep, char __user *ubuf, in tool_peer_port_read() argument
432 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_peer_port_read()
462 static ssize_t tool_link_write(struct file *filep, const char __user *ubuf, in tool_link_write() argument
469 ret = kstrtobool_from_user(ubuf, size, &val); in tool_link_write()
488 static ssize_t tool_peer_link_read(struct file *filep, char __user *ubuf, in tool_peer_link_read() argument
502 return simple_read_from_buffer(ubuf, size, offp, buf, 2); in tool_peer_link_read()
510 const char __user *ubuf, in tool_peer_link_event_write() argument
519 ret = kstrtobool_from_user(ubuf, size, &val); in tool_peer_link_event_write()
541 static ssize_t tool_mw_read(struct file *filep, char __user *ubuf, in tool_mw_read() argument
549 return simple_read_from_buffer(ubuf, size, offp, in tool_mw_read()
553 static ssize_t tool_mw_write(struct file *filep, const char __user *ubuf, in tool_mw_write() argument
562 ubuf, size); in tool_mw_write()
637 static ssize_t tool_mw_trans_read(struct file *filep, char __user *ubuf, in tool_mw_trans_read() argument
691 ret = simple_read_from_buffer(ubuf, size, offp, buf, off); in tool_mw_trans_read()
699 static ssize_t tool_mw_trans_write(struct file *filep, const char __user *ubuf, in tool_mw_trans_write() argument
706 ret = kstrtouint_from_user(ubuf, size, 0, &val); in tool_mw_trans_write()
724 static ssize_t tool_peer_mw_read(struct file *filep, char __user *ubuf, in tool_peer_mw_read() argument
746 ret = copy_to_user(ubuf, buf, size); in tool_peer_mw_read()
762 static ssize_t tool_peer_mw_write(struct file *filep, const char __user *ubuf, in tool_peer_mw_write() argument
782 ret = copy_from_user(buf, ubuf, size); in tool_peer_mw_write()
865 static ssize_t tool_peer_mw_trans_read(struct file *filep, char __user *ubuf, in tool_peer_mw_trans_read() argument
916 ret = simple_read_from_buffer(ubuf, size, offp, buf, off); in tool_peer_mw_trans_read()
923 const char __user *ubuf, in tool_peer_mw_trans_write() argument
934 if (copy_from_user(buf, ubuf, buf_size)) in tool_peer_mw_trans_write()
1025 static ssize_t tool_db_read(struct file *filep, char __user *ubuf, in tool_db_read() argument
1030 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->db_read); in tool_db_read()
1033 static ssize_t tool_db_write(struct file *filep, const char __user *ubuf, in tool_db_write() argument
1038 return tool_fn_write(tc, ubuf, size, offp, tc->ntb->ops->db_set, in tool_db_write()
1046 static ssize_t tool_db_valid_mask_read(struct file *filep, char __user *ubuf, in tool_db_valid_mask_read() argument
1051 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->db_valid_mask); in tool_db_valid_mask_read()
1058 static ssize_t tool_db_mask_read(struct file *filep, char __user *ubuf, in tool_db_mask_read() argument
1063 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->db_read_mask); in tool_db_mask_read()
1066 static ssize_t tool_db_mask_write(struct file *filep, const char __user *ubuf, in tool_db_mask_write() argument
1071 return tool_fn_write(tc, ubuf, size, offp, tc->ntb->ops->db_set_mask, in tool_db_mask_write()
1079 static ssize_t tool_peer_db_read(struct file *filep, char __user *ubuf, in tool_peer_db_read() argument
1084 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->peer_db_read); in tool_peer_db_read()
1087 static ssize_t tool_peer_db_write(struct file *filep, const char __user *ubuf, in tool_peer_db_write() argument
1092 return tool_fn_write(tc, ubuf, size, offp, tc->ntb->ops->peer_db_set, in tool_peer_db_write()
1100 static ssize_t tool_peer_db_mask_read(struct file *filep, char __user *ubuf, in tool_peer_db_mask_read() argument
1105 return tool_fn_read(tc, ubuf, size, offp, in tool_peer_db_mask_read()
1110 const char __user *ubuf, in tool_peer_db_mask_write() argument
1115 return tool_fn_write(tc, ubuf, size, offp, in tool_peer_db_mask_write()
1125 const char __user *ubuf, in tool_db_event_write() argument
1132 ret = kstrtou64_from_user(ubuf, size, 0, &val); in tool_db_event_write()
1151 static ssize_t tool_spad_read(struct file *filep, char __user *ubuf, in tool_spad_read() argument
1164 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_spad_read()
1167 static ssize_t tool_spad_write(struct file *filep, const char __user *ubuf, in tool_spad_write() argument
1179 ret = kstrtou32_from_user(ubuf, size, 0, &val); in tool_spad_write()
1192 static ssize_t tool_peer_spad_read(struct file *filep, char __user *ubuf, in tool_peer_spad_read() argument
1205 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_peer_spad_read()
1208 static ssize_t tool_peer_spad_write(struct file *filep, const char __user *ubuf, in tool_peer_spad_write() argument
1220 ret = kstrtou32_from_user(ubuf, size, 0, &val); in tool_peer_spad_write()
1274 static ssize_t tool_inmsg_read(struct file *filep, char __user *ubuf, in tool_inmsg_read() argument
1287 return simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_inmsg_read()
1295 const char __user *ubuf, in tool_outmsg_write() argument
1302 ret = kstrtou32_from_user(ubuf, size, 0, &val); in tool_outmsg_write()
1315 static ssize_t tool_msg_sts_read(struct file *filep, char __user *ubuf, in tool_msg_sts_read() argument
1320 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->msg_read_sts); in tool_msg_sts_read()
1323 static ssize_t tool_msg_sts_write(struct file *filep, const char __user *ubuf, in tool_msg_sts_write() argument
1328 return tool_fn_write(tc, ubuf, size, offp, NULL, in tool_msg_sts_write()
1336 static ssize_t tool_msg_inbits_read(struct file *filep, char __user *ubuf, in tool_msg_inbits_read() argument
1341 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->msg_inbits); in tool_msg_inbits_read()
1348 static ssize_t tool_msg_outbits_read(struct file *filep, char __user *ubuf, in tool_msg_outbits_read() argument
1353 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->msg_outbits); in tool_msg_outbits_read()
1360 static ssize_t tool_msg_mask_write(struct file *filep, const char __user *ubuf, in tool_msg_mask_write() argument
1365 return tool_fn_write(tc, ubuf, size, offp, in tool_msg_mask_write()
1375 const char __user *ubuf, in tool_msg_event_write() argument
1382 ret = kstrtou64_from_user(ubuf, size, 0, &val); in tool_msg_event_write()