Lines Matching full:urbs

199  * process coming urbs.  Even if the urb is unlinked, its completion
253 ret = usb_unlink_urb(priv->urbs[i]); in stub_recv_cmd_unlink()
255 dev_err(&priv->urbs[i]->dev->dev, in stub_recv_cmd_unlink()
447 ret = usbip_recv_xbuff(ud, priv->urbs[i]); in stub_recv_xbuff()
502 * a single SG request into several URBs and map in stub_recv_cmd_submit()
509 * several URBs. Later, priv->sgl is used by in stub_recv_cmd_submit()
511 * reassemble the divied URBs. in stub_recv_cmd_submit()
528 priv->urbs = kmalloc_array(num_urbs, sizeof(*priv->urbs), GFP_KERNEL); in stub_recv_cmd_submit()
529 if (!priv->urbs) in stub_recv_cmd_submit()
537 priv->urbs[0] = usb_alloc_urb(np, GFP_KERNEL); in stub_recv_cmd_submit()
538 if (!priv->urbs[0]) in stub_recv_cmd_submit()
543 priv->urbs[0]->sg = sgl; in stub_recv_cmd_submit()
544 priv->urbs[0]->num_sgs = nents; in stub_recv_cmd_submit()
545 priv->urbs[0]->transfer_buffer = NULL; in stub_recv_cmd_submit()
547 priv->urbs[0]->transfer_buffer = buffer; in stub_recv_cmd_submit()
552 priv->urbs[0]->setup_packet = kmemdup(&pdu->u.cmd_submit.setup, in stub_recv_cmd_submit()
554 if (!priv->urbs[0]->setup_packet) { in stub_recv_cmd_submit()
559 usbip_pack_pdu(pdu, priv->urbs[0], USBIP_CMD_SUBMIT, 0); in stub_recv_cmd_submit()
562 priv->urbs[i] = usb_alloc_urb(0, GFP_KERNEL); in stub_recv_cmd_submit()
563 /* The URBs which is previously allocated will be freed in stub_recv_cmd_submit()
566 if (!priv->urbs[i]) in stub_recv_cmd_submit()
569 usbip_pack_pdu(pdu, priv->urbs[i], USBIP_CMD_SUBMIT, 0); in stub_recv_cmd_submit()
570 priv->urbs[i]->transfer_buffer = sg_virt(sg); in stub_recv_cmd_submit()
571 priv->urbs[i]->transfer_buffer_length = sg->length; in stub_recv_cmd_submit()
578 priv->urbs[i]->context = (void *) priv; in stub_recv_cmd_submit()
579 priv->urbs[i]->dev = udev; in stub_recv_cmd_submit()
580 priv->urbs[i]->pipe = pipe; in stub_recv_cmd_submit()
581 priv->urbs[i]->complete = stub_complete; in stub_recv_cmd_submit()
584 tweak_special_requests(priv->urbs[i]); in stub_recv_cmd_submit()
586 masking_bogus_flags(priv->urbs[i]); in stub_recv_cmd_submit()
592 if (usbip_recv_iso(ud, priv->urbs[0]) < 0) in stub_recv_cmd_submit()
597 ret = usb_submit_urb(priv->urbs[i], GFP_KERNEL); in stub_recv_cmd_submit()
605 usbip_dump_urb(priv->urbs[i]); in stub_recv_cmd_submit()
620 kfree(priv->urbs); in stub_recv_cmd_submit()