Lines Matching full:urbs
208 * process coming urbs. Even if the urb is unlinked, its completion
262 ret = usb_unlink_urb(priv->urbs[i]); in stub_recv_cmd_unlink()
264 dev_err(&priv->urbs[i]->dev->dev, in stub_recv_cmd_unlink()
456 ret = usbip_recv_xbuff(ud, priv->urbs[i]); in stub_recv_xbuff()
512 * a single SG request into several URBs and map in stub_recv_cmd_submit()
519 * several URBs. Later, priv->sgl is used by in stub_recv_cmd_submit()
521 * reassemble the divied URBs. in stub_recv_cmd_submit()
538 priv->urbs = kmalloc_array(num_urbs, sizeof(*priv->urbs), GFP_KERNEL); in stub_recv_cmd_submit()
539 if (!priv->urbs) in stub_recv_cmd_submit()
547 priv->urbs[0] = usb_alloc_urb(np, GFP_KERNEL); in stub_recv_cmd_submit()
548 if (!priv->urbs[0]) in stub_recv_cmd_submit()
553 priv->urbs[0]->sg = sgl; in stub_recv_cmd_submit()
554 priv->urbs[0]->num_sgs = nents; in stub_recv_cmd_submit()
555 priv->urbs[0]->transfer_buffer = NULL; in stub_recv_cmd_submit()
557 priv->urbs[0]->transfer_buffer = buffer; in stub_recv_cmd_submit()
562 priv->urbs[0]->setup_packet = kmemdup(&pdu->u.cmd_submit.setup, in stub_recv_cmd_submit()
564 if (!priv->urbs[0]->setup_packet) { in stub_recv_cmd_submit()
569 usbip_pack_pdu(pdu, priv->urbs[0], USBIP_CMD_SUBMIT, 0); in stub_recv_cmd_submit()
572 priv->urbs[i] = usb_alloc_urb(0, GFP_KERNEL); in stub_recv_cmd_submit()
573 /* The URBs which is previously allocated will be freed in stub_recv_cmd_submit()
576 if (!priv->urbs[i]) in stub_recv_cmd_submit()
579 usbip_pack_pdu(pdu, priv->urbs[i], USBIP_CMD_SUBMIT, 0); in stub_recv_cmd_submit()
580 priv->urbs[i]->transfer_buffer = sg_virt(sg); in stub_recv_cmd_submit()
581 priv->urbs[i]->transfer_buffer_length = sg->length; in stub_recv_cmd_submit()
588 priv->urbs[i]->context = (void *) priv; in stub_recv_cmd_submit()
589 priv->urbs[i]->dev = udev; in stub_recv_cmd_submit()
590 priv->urbs[i]->pipe = pipe; in stub_recv_cmd_submit()
591 priv->urbs[i]->complete = stub_complete; in stub_recv_cmd_submit()
594 * all URBs belong to a single PDU, so a global is_tweaked flag is in stub_recv_cmd_submit()
597 is_tweaked = tweak_special_requests(priv->urbs[i]); in stub_recv_cmd_submit()
599 masking_bogus_flags(priv->urbs[i]); in stub_recv_cmd_submit()
605 if (usbip_recv_iso(ud, priv->urbs[0]) < 0) in stub_recv_cmd_submit()
611 ret = usb_submit_urb(priv->urbs[i], GFP_KERNEL); in stub_recv_cmd_submit()
619 usbip_dump_urb(priv->urbs[i]); in stub_recv_cmd_submit()
634 priv->urbs[i]->status = 0; in stub_recv_cmd_submit()
635 stub_complete(priv->urbs[i]); in stub_recv_cmd_submit()
643 kfree(priv->urbs); in stub_recv_cmd_submit()