• Home
  • Raw
  • Download

Lines Matching +full:0 +full:xb

54 #define USB_VENDOR_ID_XILINX		0x03fd
55 #define USB_VENDOR_ID_ALTERA 0x09fb
57 #define USB_PRODUCT_ID_XILLYUSB 0xebbe
197 OPCODE_DATA = 0,
206 OPCODE_QUIESCE = 0,
227 unsigned int done = 0; in fifo_write()
241 if (n == 0) { in fifo_write()
267 writepos = 0; in fifo_write()
271 writebuf = 0; in fifo_write()
280 unsigned int done = 0; in fifo_read()
304 if (n == 0) { in fifo_read()
330 readpos = 0; in fifo_read()
334 readbuf = 0; in fifo_read()
350 return 0; in xilly_copy_from_user()
358 return 0; in xilly_copy_to_user()
365 return 0; in xilly_memcpy()
385 log2_bufnum = 0; in fifo_init()
387 log2_size - PAGE_SHIFT : 0; in fifo_init()
400 for (i = 0; i < fifo->bufnum; i++) { in fifo_init()
408 fifo->fill = 0; in fifo_init()
409 fifo->readpos = 0; in fifo_init()
410 fifo->readbuf = 0; in fifo_init()
411 fifo->writepos = 0; in fifo_init()
412 fifo->writebuf = 0; in fifo_init()
415 return 0; in fifo_init()
418 for (i--; i >= 0; i--) in fifo_init()
439 for (i = 0; i < fifo->bufnum; i++) in fifo_mem_release()
476 struct xillybuffer *xb = in endpoint_dealloc() local
479 free_pages((unsigned long)xb->buf, ep->order); in endpoint_dealloc()
480 kfree(xb); in endpoint_dealloc()
513 ep->outstanding_urbs = 0; in endpoint_alloc()
520 for (i = 0; i < bufnum; i++) { in endpoint_alloc()
521 struct xillybuffer *xb; in endpoint_alloc() local
524 xb = kzalloc(sizeof(*xb), GFP_KERNEL); in endpoint_alloc()
526 if (!xb) { in endpoint_alloc()
534 kfree(xb); in endpoint_alloc()
539 xb->buf = (void *)addr; in endpoint_alloc()
540 xb->ep = ep; in endpoint_alloc()
541 list_add_tail(&xb->entry, &ep->buffers); in endpoint_alloc()
586 for (i = 0; i < xdev->num_channels; i++) { in wakeup_all()
596 chan->read_data_ok = 0; in wakeup_all()
651 struct xillybuffer *xb = urb->context; in bulk_in_completer() local
652 struct xillyusb_endpoint *ep = xb->ep; in bulk_in_completer()
662 list_add_tail(&xb->entry, &ep->buffers); in bulk_in_completer()
669 xb->len = urb->actual_length; in bulk_in_completer()
672 list_add_tail(&xb->entry, &ep->filled_buffers); in bulk_in_completer()
681 struct xillybuffer *xb = urb->context; in bulk_out_completer() local
682 struct xillyusb_endpoint *ep = xb->ep; in bulk_out_completer()
692 list_add_tail(&xb->entry, &ep->buffers); in bulk_out_completer()
703 struct xillybuffer *xb; in try_queue_bulk_in() local
723 xb = list_first_entry(&ep->buffers, struct xillybuffer, entry); in try_queue_bulk_in()
724 list_del(&xb->entry); in try_queue_bulk_in()
729 urb = usb_alloc_urb(0, GFP_KERNEL); in try_queue_bulk_in()
737 xb->buf, bufsize, bulk_in_completer, xb); in try_queue_bulk_in()
758 list_add_tail(&xb->entry, &ep->buffers); in try_queue_bulk_in()
770 struct xillybuffer *xb; in try_queue_bulk_out() local
818 xb = list_first_entry(&ep->buffers, struct xillybuffer, entry); in try_queue_bulk_out()
819 list_del(&xb->entry); in try_queue_bulk_out()
826 count = fifo_read(&ep->fifo, xb->buf, max_read, xilly_memcpy); in try_queue_bulk_out()
829 * xilly_memcpy always returns 0 => fifo_read can't fail => in try_queue_bulk_out()
830 * count > 0 in try_queue_bulk_out()
833 urb = usb_alloc_urb(0, GFP_KERNEL); in try_queue_bulk_out()
841 xb->buf, count, bulk_out_completer, xb); in try_queue_bulk_out()
865 list_add_tail(&xb->entry, &ep->buffers); in try_queue_bulk_out()
914 WRITE_ONCE(chan->read_data_ok, 0); in process_in_opcode()
919 chan->flushing = 0; in process_in_opcode()
934 return 0; in process_in_opcode()
937 static int process_bulk_in(struct xillybuffer *xb) in process_bulk_in() argument
939 struct xillyusb_endpoint *ep = xb->ep; in process_bulk_in()
942 int dws = xb->len >> 2; in process_bulk_in()
943 __le32 *p = xb->buf; in process_bulk_in()
947 int chan_num = 0, opcode; in process_bulk_in()
950 int in_bytes_left = 0; in process_bulk_in()
953 if ((dws << 2) != xb->len) { in process_bulk_in()
955 xb->len); in process_bulk_in()
970 chan_num = ctrlword & 0xfff; in process_bulk_in()
971 count = (ctrlword >> 12) & 0x3ff; in process_bulk_in()
972 opcode = (ctrlword >> 24) & 0xf; in process_bulk_in()
975 unsigned int in_counter = xdev->in_counter++ & 0x3ff; in process_bulk_in()
1024 return 0; in process_bulk_in()
1033 struct xillybuffer *xb; in bulk_in_work() local
1035 int rc = 0; in bulk_in_work()
1054 xb = list_first_entry(&ep->filled_buffers, struct xillybuffer, in bulk_in_work()
1056 list_del(&xb->entry); in bulk_in_work()
1063 rc = process_bulk_in(xb); in bulk_in_work()
1066 list_add_tail(&xb->entry, &ep->buffers); in bulk_in_work()
1078 int rc = 0; in xillyusb_send_opcode()
1080 msg[0] = cpu_to_le32((chan_num & 0xfff) | in xillyusb_send_opcode()
1081 ((opcode & 0xf) << 24)); in xillyusb_send_opcode()
1139 return 0; in flush_downstream()
1146 chan->canceled = 0; in flush_downstream()
1148 OPCODE_CANCEL_CHECKPOINT, 0); in flush_downstream()
1157 if (left_to_sleep <= 0) { in flush_downstream()
1207 if (left_to_sleep <= 0) in flush_downstream()
1218 if (interruptible && rc < 0) in flush_downstream()
1224 return 0; in flush_downstream()
1317 chan->out_bytes = 0; in xillyusb_open()
1318 chan->flushed = 0; in xillyusb_open()
1367 u32 in_checkpoint = 0; in xillyusb_open()
1373 chan->in_consumed_bytes = 0; in xillyusb_open()
1374 chan->poll_used = 0; in xillyusb_open()
1395 return 0; in xillyusb_open()
1398 chan->read_data_ok = 0; in xillyusb_open()
1417 chan->open_for_read = 0; in xillyusb_open()
1420 chan->open_for_write = 0; in xillyusb_open()
1443 int bytes_done = 0; in xillyusb_read()
1465 if (rc < 0) in xillyusb_read()
1491 if (chan->in_synchronous && diff >= 0) { in xillyusb_read()
1515 (checkpoint_for_complete && leap > 0))) { in xillyusb_read()
1526 (left_to_sleep <= 0 && bytes_done)) in xillyusb_read()
1542 rc = 0; in xillyusb_read()
1567 if (left_to_sleep > 0) { in xillyusb_read()
1579 } else { /* bytes_done == 0 */ in xillyusb_read()
1591 if (rc < 0) { in xillyusb_read()
1615 return 0; in xillyusb_flush()
1664 if (count == 0) in xillyusb_write()
1670 if (rc != 0) in xillyusb_write()
1686 if (rc < 0) in xillyusb_write()
1693 chan->flushed = 0; in xillyusb_write()
1697 int flush_rc = flush_downstream(chan, 0, true); in xillyusb_write()
1713 int rc_read = 0, rc_write = 0; in xillyusb_release()
1719 OPCODE_CLOSE, 0); in xillyusb_release()
1742 chan->open_for_read = 0; in xillyusb_release()
1768 OPCODE_CLOSE, 0); in xillyusb_release()
1771 chan->open_for_write = 0; in xillyusb_release()
1790 int rc = 0; in xillyusb_llseek()
1833 chan->flushed = 0; in xillyusb_llseek()
1852 __poll_t mask = 0; in xillyusb_poll()
1926 return 0; in xillyusb_setup_base_eps()
1947 for (i = 0; i < num_channels; i++, chan++) { in setup_channels()
1959 if (in_desc & 0x80) { /* Entry is valid */ in setup_channels()
1961 chan->in_synchronous = !!(in_desc & 0x40); in setup_channels()
1962 chan->in_seekable = !!(in_desc & 0x20); in setup_channels()
1963 chan->in_log2_element_size = in_desc & 0x0f; in setup_channels()
1964 chan->in_log2_fifo_size = ((in_desc >> 8) & 0x1f) + 16; in setup_channels()
1973 if ((out_desc & 0x80) && i < 14) { /* Entry is valid */ in setup_channels()
1975 chan->out_synchronous = !!(out_desc & 0x40); in setup_channels()
1976 chan->out_seekable = !!(out_desc & 0x20); in setup_channels()
1977 chan->out_log2_element_size = out_desc & 0x0f; in setup_channels()
1979 ((out_desc >> 8) & 0x1f) + 16; in setup_channels()
1983 return 0; in setup_channels()
1997 rc = xillyusb_send_opcode(xdev, ~0, OPCODE_QUIESCE, 0); in xillyusb_discovery()
2007 bogus_chandesc[0] = cpu_to_le16(0x80); in xillyusb_discovery()
2008 bogus_chandesc[1] = cpu_to_le16(0); in xillyusb_discovery()
2027 rc = xillyusb_send_opcode(xdev, ~0, OPCODE_REQ_IDT, 0); in xillyusb_discovery()
2043 if (rc < 0) { in xillyusb_discovery()
2064 if (crc32_le(~0, idt, idt_len) != 0) { in xillyusb_discovery()
2070 if (*idt > 0x90) { in xillyusb_discovery()
2071 …dev_err(&interface->dev, "No support for IDT version 0x%02x. Maybe the xillyusb driver needs an up… in xillyusb_discovery()
2145 xdev->error = 0; in xillyusb_probe()
2147 xdev->in_counter = 0; in xillyusb_probe()
2148 xdev->in_bytes_left = 0; in xillyusb_probe()
2149 xdev->workq = alloc_workqueue(xillyname, WQ_HIGHPRI, 0); in xillyusb_probe()
2169 return 0; in xillyusb_probe()
2197 xillyusb_send_opcode(xdev, ~0, OPCODE_QUIESCE, 0); in xillyusb_disconnect()
2223 for (i = 0; i < xdev->num_channels; i++) { in xillyusb_disconnect()
2259 int rc = 0; in xillyusb_init()
2264 fifo_buf_order = 0; in xillyusb_init()