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