Lines Matching refs:urb

36 static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
38 static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status);
664 static void vhci_tx_urb(struct urb *urb, struct vhci_device *vdev)
680 dev_info(&urb->dev->dev, "seqnum max\n");
683 priv->urb = urb;
685 urb->hcpriv = (void *) priv;
693 static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
697 struct device *dev = &urb->dev->dev;
698 u8 portnum = urb->dev->portnum;
709 if (!urb->transfer_buffer && !urb->num_sgs &&
710 urb->transfer_buffer_length) {
717 if (urb->status != -EINPROGRESS) {
718 dev_err(dev, "URB already unlinked!, status %d\n", urb->status);
720 return urb->status;
734 ret = usb_hcd_link_urb_to_ep(hcd, urb);
747 if (usb_pipedevice(urb->pipe) == 0) {
749 __u8 type = usb_pipetype(urb->pipe);
751 (struct usb_ctrlrequest *) urb->setup_packet;
766 vdev->udev = usb_get_dev(urb->dev);
773 if (urb->status == -EINPROGRESS) {
776 urb->status = 0;
786 vdev->udev = usb_get_dev(urb->dev);
803 vhci_tx_urb(urb, vdev);
809 usb_hcd_unlink_urb_from_ep(hcd, urb);
817 usb_hcd_giveback_urb(hcd, urb, urb->status);
824 * vhci_rx gives back the urb after receiving the reply of the urb. If an
826 * back its urb. For the driver unlinking the urb, the content of the urb is
835 * - case 1a). the urb of the pdu is not unlinking.
837 * => just give back the urb
839 * - case 1b). the urb of the pdu is unlinking.
841 * => give back the urb now and go to case 2b).
846 * - urb was really pending in usbip.ko and urb_unlink_urb() was
849 * => notify unlink completeness by giving back the urb
852 * - urb was already given back to the core driver.
853 * => do not give back the urb
860 * - case 3a). the urb of the unlink request is now in submission.
864 * - case 3b). the urb of the unlink request is not in submission.
869 static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
879 priv = urb->hcpriv;
890 ret = usb_hcd_check_unlink_urb(hcd, urb, status);
906 urb->hcpriv = NULL;
915 usb_hcd_unlink_urb_from_ep(hcd, urb);
918 usb_hcd_giveback_urb(hcd, urb, urb->status);
968 struct urb *urb;
970 /* give back urb of unsent unlink request */
973 urb = pickup_urb_and_free_priv(vdev, unlink->unlink_seqnum);
974 if (!urb) {
980 urb->status = -ENODEV;
982 usb_hcd_unlink_urb_from_ep(hcd, urb);
989 usb_hcd_giveback_urb(hcd, urb, urb->status);
998 struct urb *urb;
1006 urb = pickup_urb_and_free_priv(vdev, unlink->unlink_seqnum);
1007 if (!urb) {
1008 pr_info("the urb (seqnum %lu) was already given back\n",
1015 urb->status = -ENODEV;
1017 usb_hcd_unlink_urb_from_ep(hcd, urb);
1024 usb_hcd_giveback_urb(hcd, urb, urb->status);
1087 * the cleanup function of a USB driver. When unlinking a urb with an
1088 * active connection, vhci_dequeue() does not give back the urb which