Lines Matching refs:urb

635     struct usbdevfs_urb *urb = calloc(1, sizeof(struct usbdevfs_urb));  in usb_request_new()  local
636 if (!urb) in usb_request_new()
640 urb->type = USBDEVFS_URB_TYPE_BULK; in usb_request_new()
642 urb->type = USBDEVFS_URB_TYPE_INTERRUPT; in usb_request_new()
645 free(urb); in usb_request_new()
648 urb->endpoint = ep_desc->bEndpointAddress; in usb_request_new()
652 free(urb); in usb_request_new()
658 req->private_data = urb; in usb_request_new()
659 req->endpoint = urb->endpoint; in usb_request_new()
660 urb->usercontext = req; in usb_request_new()
673 struct usbdevfs_urb *urb = (struct usbdevfs_urb*)req->private_data; in usb_request_queue() local
676 urb->status = -1; in usb_request_queue()
677 urb->buffer = req->buffer; in usb_request_queue()
680 urb->buffer_length = MAX_USBFS_BUFFER_SIZE; in usb_request_queue()
682 urb->buffer_length = req->buffer_length; in usb_request_queue()
685 res = ioctl(req->dev->fd, USBDEVFS_SUBMITURB, urb); in usb_request_queue()
707 struct usbdevfs_urb *urb = NULL; in usb_request_wait() local
709 USBDEVFS_REAPURBNDELAY, &urb)); in usb_request_wait()
716 D("[ urb @%p status = %d, actual = %d ]\n", urb, urb->status, urb->actual_length); in usb_request_wait()
718 struct usb_request *req = (struct usb_request*)urb->usercontext; in usb_request_wait()
719 req->actual_length = urb->actual_length; in usb_request_wait()
727 struct usbdevfs_urb *urb = ((struct usbdevfs_urb*)req->private_data); in usb_request_cancel() local
728 return ioctl(req->dev->fd, USBDEVFS_DISCARDURB, urb); in usb_request_cancel()