Lines Matching refs:pdu
214 struct usbip_header *pdu) in stub_recv_cmd_unlink() argument
223 if (priv->seqnum != pdu->u.cmd_unlink.seqnum) in stub_recv_cmd_unlink()
242 priv->seqnum = pdu->base.seqnum; in stub_recv_cmd_unlink()
273 pdu->u.cmd_unlink.seqnum); in stub_recv_cmd_unlink()
281 stub_enqueue_ret_unlink(sdev, pdu->base.seqnum, 0); in stub_recv_cmd_unlink()
288 static int valid_request(struct stub_device *sdev, struct usbip_header *pdu) in valid_request() argument
293 if (pdu->base.devid == sdev->devid) { in valid_request()
306 struct usbip_header *pdu) in stub_priv_alloc() argument
322 priv->seqnum = pdu->base.seqnum; in stub_priv_alloc()
336 static int get_pipe(struct stub_device *sdev, struct usbip_header *pdu) in get_pipe() argument
341 int epnum = pdu->base.ep; in get_pipe()
342 int dir = pdu->base.direction; in get_pipe()
379 if (pdu->u.cmd_submit.number_of_packets < 0 || in get_pipe()
380 pdu->u.cmd_submit.number_of_packets > in get_pipe()
384 pdu->u.cmd_submit.number_of_packets); in get_pipe()
465 struct usbip_header *pdu) in stub_recv_cmd_submit() argument
475 int pipe = get_pipe(sdev, pdu); in stub_recv_cmd_submit()
476 int use_sg = pdu->u.cmd_submit.transfer_flags & USBIP_URB_DMA_MAP_SG; in stub_recv_cmd_submit()
490 priv = stub_priv_alloc(sdev, pdu); in stub_recv_cmd_submit()
494 buf_len = (unsigned long long)pdu->u.cmd_submit.transfer_buffer_length; in stub_recv_cmd_submit()
526 pdu->u.cmd_submit.transfer_flags &= in stub_recv_cmd_submit()
545 np = pdu->u.cmd_submit.number_of_packets; in stub_recv_cmd_submit()
562 priv->urbs[0]->setup_packet = kmemdup(&pdu->u.cmd_submit.setup, in stub_recv_cmd_submit()
569 usbip_pack_pdu(pdu, priv->urbs[0], USBIP_CMD_SUBMIT, 0); in stub_recv_cmd_submit()
579 usbip_pack_pdu(pdu, priv->urbs[i], USBIP_CMD_SUBMIT, 0); in stub_recv_cmd_submit()
615 pdu->base.seqnum); in stub_recv_cmd_submit()
618 usbip_dump_header(pdu); in stub_recv_cmd_submit()
655 struct usbip_header pdu; in stub_rx_pdu() local
661 memset(&pdu, 0, sizeof(pdu)); in stub_rx_pdu()
664 ret = usbip_recv(ud->tcp_socket, &pdu, sizeof(pdu)); in stub_rx_pdu()
665 if (ret != sizeof(pdu)) { in stub_rx_pdu()
671 usbip_header_correct_endian(&pdu, 0); in stub_rx_pdu()
674 usbip_dump_header(&pdu); in stub_rx_pdu()
676 if (!valid_request(sdev, &pdu)) { in stub_rx_pdu()
682 switch (pdu.base.command) { in stub_rx_pdu()
684 stub_recv_cmd_unlink(sdev, &pdu); in stub_rx_pdu()
688 stub_recv_cmd_submit(sdev, &pdu); in stub_rx_pdu()