• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/comedi/

Lines Matching refs:async

113 			       struct comedi_async *async, unsigned new_size);
311 struct comedi_async *async;
322 async = s->async;
324 if (!async) {
325 DPRINTK("subdevice does not have async capability\n");
335 async->max_bufsize = bc.maximum_size;
339 retval = resize_async_buffer(dev, s, async, bc.size);
344 bc.size = async->prealloc_bufsz;
345 bc.maximum_size = async->max_bufsize;
566 struct comedi_async *async;
579 async = s->async;
581 if (!async) {
582 DPRINTK("subdevice does not have async capability\n");
600 bi.bytes_read = comedi_buf_read_alloc(async, bi.bytes_read);
601 comedi_buf_read_free(async, bi.bytes_read);
605 && async->buf_write_count == async->buf_read_count) {
612 comedi_buf_write_alloc(async, bi.bytes_written);
613 comedi_buf_write_free(async, bi.bytes_written);
617 bi.buf_write_count = async->buf_write_count;
618 bi.buf_write_ptr = async->buf_write_ptr;
619 bi.buf_read_count = async->buf_read_count;
620 bi.buf_read_ptr = async->buf_read_ptr;
830 if (!s->async) {
831 DPRINTK("no async\n");
835 if (!s->async->inttrig) {
840 ret = s->async->inttrig(dev, s, insn->data[0]);
1007 struct comedi_async *async;
1024 async = s->async;
1031 if (!s->do_cmd || !s->do_cmdtest || !s->async) {
1066 kfree(async->cmd.chanlist);
1067 async->cmd = user_cmd;
1068 async->cmd.data = NULL;
1070 async->cmd.chanlist =
1071 kmalloc(async->cmd.chanlist_len * sizeof(int), GFP_KERNEL);
1072 if (!async->cmd.chanlist) {
1078 if (copy_from_user(async->cmd.chanlist, user_cmd.chanlist,
1079 async->cmd.chanlist_len * sizeof(int))) {
1087 async->cmd.chanlist_len,
1088 async->cmd.chanlist);
1094 ret = s->do_cmdtest(dev, s, &async->cmd);
1096 if (async->cmd.flags & TRIG_BOGUS || ret) {
1098 user_cmd = async->cmd;
1111 if (!async->prealloc_bufsz) {
1117 comedi_reset_async_buf(async);
1119 async->cb_mask =
1122 if (async->cmd.flags & TRIG_WAKE_EOS)
1123 async->cb_mask |= COMEDI_CB_EOS;
1337 if (s->async == NULL)
1404 struct comedi_async *async;
1407 async = area->vm_private_data;
1408 dev = async->subdevice->device;
1411 async->mmap_count--;
1425 struct comedi_async *async = NULL;
1448 async = s->async;
1449 if (async == NULL) {
1461 if (size > async->prealloc_bufsz) {
1474 (async->buf_page_list
1484 vma->vm_private_data = async;
1486 async->mmap_count++;
1514 poll_wait(file, &read_subdev->async->wait_head, wait);
1516 || comedi_buf_read_n_available(read_subdev->async) > 0
1524 poll_wait(file, &write_subdev->async->wait_head, wait);
1525 comedi_buf_write_alloc(write_subdev->async,
1526 write_subdev->async->prealloc_bufsz);
1530 || comedi_buf_write_n_allocated(write_subdev->async) >=
1531 bytes_per_sample(write_subdev->async->subdevice)) {
1544 struct comedi_async *async;
1563 async = s->async;
1577 add_wait_queue(&async->wait_head, &wait);
1597 if (async->buf_write_ptr + m > async->prealloc_bufsz)
1598 m = async->prealloc_bufsz - async->buf_write_ptr;
1599 comedi_buf_write_alloc(async, async->prealloc_bufsz);
1600 if (m > comedi_buf_write_n_allocated(async))
1601 m = comedi_buf_write_n_allocated(async);
1624 m = copy_from_user(async->prealloc_buf + async->buf_write_ptr,
1630 comedi_buf_write_free(async, n);
1639 remove_wait_queue(&async->wait_head, &wait);
1649 struct comedi_async *async;
1668 async = s->async;
1682 add_wait_queue(&async->wait_head, &wait);
1688 m = comedi_buf_read_n_available(async);
1690 if (async->buf_read_ptr + m > async->prealloc_bufsz)
1691 m = async->prealloc_bufsz - async->buf_read_ptr;
1726 m = copy_to_user(buf, async->prealloc_buf +
1727 async->buf_read_ptr, n);
1733 comedi_buf_read_alloc(async, n);
1734 comedi_buf_read_free(async, n);
1743 async->buf_read_count - async->buf_write_count == 0) {
1747 remove_wait_queue(&async->wait_head, &wait);
1758 struct comedi_async *async = s->async;
1761 if (async) {
1762 comedi_reset_async_buf(async);
1763 async->inttrig = NULL;
1766 "BUG: (?) do_become_nonbusy called with async=0\n");
2018 struct comedi_async *async = s->async;
2028 async->events & (COMEDI_CB_EOA | COMEDI_CB_ERROR |
2034 if (s->async->events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW)) {
2043 if (async->cb_mask & s->async->events) {
2045 wake_up_interruptible(&async->wait_head);
2051 if (async->cb_func)
2052 async->cb_func(s->async->events, async->cb_arg);
2055 s->async->events = 0;
2083 if (s->async && s->async->mmap_count)
2330 struct comedi_async *async, unsigned new_size)
2334 if (new_size > async->max_bufsize)
2341 if (async->mmap_count) {
2346 if (!async->prealloc_buf)
2364 dev->minor, (int)(s - dev->subdevices), async->prealloc_bufsz);
2384 read_subdevice->async) {
2385 max_buffer_size_kb = read_subdevice->async->max_bufsize /
2415 read_subdevice->async == NULL) {
2419 read_subdevice->async->max_bufsize = new_max_size;
2445 read_subdevice->async) {
2446 buffer_size_kb = read_subdevice->async->prealloc_bufsz /
2477 read_subdevice->async == NULL) {
2482 read_subdevice->async, new_size);
2511 write_subdevice->async) {
2512 max_buffer_size_kb = write_subdevice->async->max_bufsize /
2542 write_subdevice->async == NULL) {
2546 write_subdevice->async->max_bufsize = new_max_size;
2572 write_subdevice->async) {
2573 buffer_size_kb = write_subdevice->async->prealloc_bufsz /
2604 write_subdevice->async == NULL) {
2609 write_subdevice->async, new_size);