uurb 1479 drivers/usb/core/devio.c find_memory_area(struct usb_dev_state *ps, const struct usbdevfs_urb *uurb) uurb 1483 drivers/usb/core/devio.c unsigned long uurb_start = (unsigned long)uurb->buffer; uurb 1489 drivers/usb/core/devio.c if (uurb->buffer_length > iter->vm_start + iter->size - uurb 1503 drivers/usb/core/devio.c static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb, uurb 1525 drivers/usb/core/devio.c if (uurb->type == USBDEVFS_URB_TYPE_ISO) uurb 1528 drivers/usb/core/devio.c if (uurb->flags & ~mask) uurb 1531 drivers/usb/core/devio.c if ((unsigned int)uurb->buffer_length >= USBFS_XFER_MAX) uurb 1533 drivers/usb/core/devio.c if (uurb->buffer_length > 0 && !uurb->buffer) uurb 1535 drivers/usb/core/devio.c if (!(uurb->type == USBDEVFS_URB_TYPE_CONTROL && uurb 1536 drivers/usb/core/devio.c (uurb->endpoint & ~USB_ENDPOINT_DIR_MASK) == 0)) { uurb 1537 drivers/usb/core/devio.c ifnum = findintfep(ps->dev, uurb->endpoint); uurb 1544 drivers/usb/core/devio.c ep = ep_to_host_endpoint(ps->dev, uurb->endpoint); uurb 1547 drivers/usb/core/devio.c is_in = (uurb->endpoint & USB_ENDPOINT_DIR_MASK) != 0; uurb 1550 drivers/usb/core/devio.c switch (uurb->type) { uurb 1555 drivers/usb/core/devio.c if (uurb->buffer_length < 8) uurb 1560 drivers/usb/core/devio.c if (copy_from_user(dr, uurb->buffer, 8)) { uurb 1564 drivers/usb/core/devio.c if (uurb->buffer_length < (le16_to_cpu(dr->wLength) + 8)) { uurb 1572 drivers/usb/core/devio.c uurb->buffer_length = le16_to_cpu(dr->wLength); uurb 1573 drivers/usb/core/devio.c uurb->buffer += 8; uurb 1574 drivers/usb/core/devio.c if ((dr->bRequestType & USB_DIR_IN) && uurb->buffer_length) { uurb 1576 drivers/usb/core/devio.c uurb->endpoint |= USB_DIR_IN; uurb 1579 drivers/usb/core/devio.c uurb->endpoint &= ~USB_DIR_IN; uurb 1604 drivers/usb/core/devio.c uurb->type = USBDEVFS_URB_TYPE_INTERRUPT; uurb 1607 drivers/usb/core/devio.c num_sgs = DIV_ROUND_UP(uurb->buffer_length, USB_SG_SIZE); uurb 1611 drivers/usb/core/devio.c stream_id = uurb->stream_id; uurb 1626 drivers/usb/core/devio.c if (uurb->number_of_packets < 1 || uurb 1627 drivers/usb/core/devio.c uurb->number_of_packets > 128) uurb 1631 drivers/usb/core/devio.c number_of_packets = uurb->number_of_packets; uurb 1652 drivers/usb/core/devio.c uurb->buffer_length = totlen; uurb 1659 drivers/usb/core/devio.c if (uurb->buffer_length > 0 && uurb 1660 drivers/usb/core/devio.c !access_ok(uurb->buffer, uurb->buffer_length)) { uurb 1670 drivers/usb/core/devio.c as->usbm = find_memory_area(ps, uurb); uurb 1684 drivers/usb/core/devio.c (as->usbm ? 0 : uurb->buffer_length) + uurb 1702 drivers/usb/core/devio.c totlen = uurb->buffer_length; uurb 1713 drivers/usb/core/devio.c if (copy_from_user(buf, uurb->buffer, u)) { uurb 1717 drivers/usb/core/devio.c uurb->buffer += u; uurb 1721 drivers/usb/core/devio.c } else if (uurb->buffer_length > 0) { uurb 1723 drivers/usb/core/devio.c unsigned long uurb_start = (unsigned long)uurb->buffer; uurb 1728 drivers/usb/core/devio.c as->urb->transfer_buffer = kmalloc(uurb->buffer_length, uurb 1736 drivers/usb/core/devio.c uurb->buffer, uurb 1737 drivers/usb/core/devio.c uurb->buffer_length)) { uurb 1741 drivers/usb/core/devio.c } else if (uurb->type == USBDEVFS_URB_TYPE_ISO) { uurb 1749 drivers/usb/core/devio.c uurb->buffer_length); uurb 1754 drivers/usb/core/devio.c as->urb->pipe = (uurb->type << 30) | uurb 1755 drivers/usb/core/devio.c __create_pipe(ps->dev, uurb->endpoint & 0xf) | uurb 1756 drivers/usb/core/devio.c (uurb->endpoint & USB_DIR_IN); uurb 1763 drivers/usb/core/devio.c if (uurb->flags & USBDEVFS_URB_ISO_ASAP) uurb 1765 drivers/usb/core/devio.c if (allow_short && uurb->flags & USBDEVFS_URB_SHORT_NOT_OK) uurb 1767 drivers/usb/core/devio.c if (allow_zero && uurb->flags & USBDEVFS_URB_ZERO_PACKET) uurb 1769 drivers/usb/core/devio.c if (uurb->flags & USBDEVFS_URB_NO_INTERRUPT) uurb 1773 drivers/usb/core/devio.c if (!allow_short && uurb->flags & USBDEVFS_URB_SHORT_NOT_OK) uurb 1775 drivers/usb/core/devio.c if (!allow_zero && uurb->flags & USBDEVFS_URB_ZERO_PACKET) uurb 1778 drivers/usb/core/devio.c as->urb->transfer_buffer_length = uurb->buffer_length; uurb 1781 drivers/usb/core/devio.c as->urb->start_frame = uurb->start_frame; uurb 1786 drivers/usb/core/devio.c if (uurb->type == USBDEVFS_URB_TYPE_ISO || uurb 1808 drivers/usb/core/devio.c unsigned long uurb_start = (unsigned long)uurb->buffer; uurb 1813 drivers/usb/core/devio.c } else if (is_in && uurb->buffer_length > 0) uurb 1814 drivers/usb/core/devio.c as->userbuffer = uurb->buffer; uurb 1815 drivers/usb/core/devio.c as->signr = uurb->signr; uurb 1841 drivers/usb/core/devio.c if (uurb->flags & USBDEVFS_URB_BULK_CONTINUATION) uurb 1878 drivers/usb/core/devio.c struct usbdevfs_urb uurb; uurb 1881 drivers/usb/core/devio.c if (copy_from_user(&uurb, arg, sizeof(uurb))) uurb 1887 drivers/usb/core/devio.c return proc_do_submiturb(ps, &uurb, uurb 2064 drivers/usb/core/devio.c struct usbdevfs_urb32 __user *uurb) uurb 2067 drivers/usb/core/devio.c if (copy_from_user(&urb32, uurb, sizeof(*uurb))) uurb 2086 drivers/usb/core/devio.c struct usbdevfs_urb uurb; uurb 2089 drivers/usb/core/devio.c if (get_urb32(&uurb, (struct usbdevfs_urb32 __user *)arg)) uurb 2095 drivers/usb/core/devio.c return proc_do_submiturb(ps, &uurb,