Lines Matching defs:pdu

200  * handler will be called and stub_tx will send a return pdu.
205 struct usbip_header *pdu)
214 if (priv->seqnum != pdu->u.cmd_unlink.seqnum)
221 * now not going to return the normal result pdu of a
222 * submission request, but going to return a result pdu
231 * to make the result pdu of the unlink request.
233 priv->seqnum = pdu->base.seqnum;
244 * will return the result pdu of this unlink request
264 pdu->u.cmd_unlink.seqnum);
269 * CMD_RET pdu. In this case, usb_unlink_urb() is not needed. We only
272 stub_enqueue_ret_unlink(sdev, pdu->base.seqnum, 0);
279 static int valid_request(struct stub_device *sdev, struct usbip_header *pdu)
284 if (pdu->base.devid == sdev->devid) {
297 struct usbip_header *pdu)
313 priv->seqnum = pdu->base.seqnum;
327 static int get_pipe(struct stub_device *sdev, struct usbip_header *pdu)
332 int epnum = pdu->base.ep;
333 int dir = pdu->base.direction;
370 if (pdu->u.cmd_submit.number_of_packets < 0 ||
371 pdu->u.cmd_submit.number_of_packets >
375 pdu->u.cmd_submit.number_of_packets);
456 struct usbip_header *pdu)
466 int pipe = get_pipe(sdev, pdu);
467 int use_sg = pdu->u.cmd_submit.transfer_flags & USBIP_URB_DMA_MAP_SG;
480 priv = stub_priv_alloc(sdev, pdu);
484 buf_len = (unsigned long long)pdu->u.cmd_submit.transfer_buffer_length;
516 pdu->u.cmd_submit.transfer_flags &=
535 np = pdu->u.cmd_submit.number_of_packets;
552 priv->urbs[0]->setup_packet = kmemdup(&pdu->u.cmd_submit.setup,
559 usbip_pack_pdu(pdu, priv->urbs[0], USBIP_CMD_SUBMIT, 0);
569 usbip_pack_pdu(pdu, priv->urbs[i], USBIP_CMD_SUBMIT, 0);
577 /* set other members from the base header of pdu */
601 pdu->base.seqnum);
604 usbip_dump_header(pdu);
628 /* recv a pdu */
632 struct usbip_header pdu;
638 memset(&pdu, 0, sizeof(pdu));
640 /* receive a pdu header */
641 ret = usbip_recv(ud->tcp_socket, &pdu, sizeof(pdu));
642 if (ret != sizeof(pdu)) {
648 usbip_header_correct_endian(&pdu, 0);
651 usbip_dump_header(&pdu);
653 if (!valid_request(sdev, &pdu)) {
659 switch (pdu.base.command) {
661 stub_recv_cmd_unlink(sdev, &pdu);
665 stub_recv_cmd_submit(sdev, &pdu);
670 dev_err(dev, "unknown pdu\n");