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,
377 if (copy_from_user(buf, ubuf, size)) {
412 static ssize_t tool_port_read(struct file *filep, char __user *ubuf,
421 return simple_read_from_buffer(ubuf, size, offp, buf, pos);
428 static ssize_t tool_peer_port_read(struct file *filep, char __user *ubuf,
439 return simple_read_from_buffer(ubuf, size, offp, buf, pos);
469 static ssize_t tool_link_write(struct file *filep, const char __user *ubuf,
476 ret = kstrtobool_from_user(ubuf, size, &val);
495 static ssize_t tool_peer_link_read(struct file *filep, char __user *ubuf,
509 return simple_read_from_buffer(ubuf, size, offp, buf, 2);
517 const char __user *ubuf,
526 ret = kstrtobool_from_user(ubuf, size, &val);
548 static ssize_t tool_mw_read(struct file *filep, char __user *ubuf,
556 return simple_read_from_buffer(ubuf, size, offp,
560 static ssize_t tool_mw_write(struct file *filep, const char __user *ubuf,
569 ubuf, size);
644 static ssize_t tool_mw_trans_read(struct file *filep, char __user *ubuf,
698 ret = simple_read_from_buffer(ubuf, size, offp, buf, off);
706 static ssize_t tool_mw_trans_write(struct file *filep, const char __user *ubuf,
713 ret = kstrtouint_from_user(ubuf, size, 0, &val);
731 static ssize_t tool_peer_mw_read(struct file *filep, char __user *ubuf,
753 ret = copy_to_user(ubuf, buf, size);
769 static ssize_t tool_peer_mw_write(struct file *filep, const char __user *ubuf,
789 ret = copy_from_user(buf, ubuf, size);
872 static ssize_t tool_peer_mw_trans_read(struct file *filep, char __user *ubuf,
923 ret = simple_read_from_buffer(ubuf, size, offp, buf, off);
930 const char __user *ubuf,
941 if (copy_from_user(buf, ubuf, buf_size))
1032 static ssize_t tool_db_read(struct file *filep, char __user *ubuf,
1037 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->db_read);
1040 static ssize_t tool_db_write(struct file *filep, const char __user *ubuf,
1045 return tool_fn_write(tc, ubuf, size, offp, tc->ntb->ops->db_set,
1053 static ssize_t tool_db_valid_mask_read(struct file *filep, char __user *ubuf,
1058 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->db_valid_mask);
1065 static ssize_t tool_db_mask_read(struct file *filep, char __user *ubuf,
1070 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->db_read_mask);
1073 static ssize_t tool_db_mask_write(struct file *filep, const char __user *ubuf,
1078 return tool_fn_write(tc, ubuf, size, offp, tc->ntb->ops->db_set_mask,
1086 static ssize_t tool_peer_db_read(struct file *filep, char __user *ubuf,
1091 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->peer_db_read);
1094 static ssize_t tool_peer_db_write(struct file *filep, const char __user *ubuf,
1099 return tool_fn_write(tc, ubuf, size, offp, tc->ntb->ops->peer_db_set,
1107 static ssize_t tool_peer_db_mask_read(struct file *filep, char __user *ubuf,
1112 return tool_fn_read(tc, ubuf, size, offp,
1117 const char __user *ubuf,
1122 return tool_fn_write(tc, ubuf, size, offp,
1132 const char __user *ubuf,
1139 ret = kstrtou64_from_user(ubuf, size, 0, &val);
1158 static ssize_t tool_spad_read(struct file *filep, char __user *ubuf,
1171 return simple_read_from_buffer(ubuf, size, offp, buf, pos);
1174 static ssize_t tool_spad_write(struct file *filep, const char __user *ubuf,
1186 ret = kstrtou32_from_user(ubuf, size, 0, &val);
1199 static ssize_t tool_peer_spad_read(struct file *filep, char __user *ubuf,
1212 return simple_read_from_buffer(ubuf, size, offp, buf, pos);
1215 static ssize_t tool_peer_spad_write(struct file *filep, const char __user *ubuf,
1227 ret = kstrtou32_from_user(ubuf, size, 0, &val);
1281 static ssize_t tool_inmsg_read(struct file *filep, char __user *ubuf,
1294 return simple_read_from_buffer(ubuf, size, offp, buf, pos);
1302 const char __user *ubuf,
1309 ret = kstrtou32_from_user(ubuf, size, 0, &val);
1322 static ssize_t tool_msg_sts_read(struct file *filep, char __user *ubuf,
1327 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->msg_read_sts);
1330 static ssize_t tool_msg_sts_write(struct file *filep, const char __user *ubuf,
1335 return tool_fn_write(tc, ubuf, size, offp, NULL,
1343 static ssize_t tool_msg_inbits_read(struct file *filep, char __user *ubuf,
1348 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->msg_inbits);
1355 static ssize_t tool_msg_outbits_read(struct file *filep, char __user *ubuf,
1360 return tool_fn_read(tc, ubuf, size, offp, tc->ntb->ops->msg_outbits);
1367 static ssize_t tool_msg_mask_write(struct file *filep, const char __user *ubuf,
1372 return tool_fn_write(tc, ubuf, size, offp,
1382 const char __user *ubuf,
1389 ret = kstrtou64_from_user(ubuf, size, 0, &val);