提交 1325f85f 编写于 作者: A Arjan Mels 提交者: Greg Kroah-Hartman

staging: usbip: bugfix add number of packets for isochronous frames

The number_of_packets was not transmitted for RET_SUBMIT packets. The
linux client used the stored number_of_packet from the submitted
request. The windows userland client does not do this however and needs
to know the number_of_packets to determine the size of the transmission.
Signed-off-by: NArjan Mels <arjan.mels@gmx.net>
Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
Cc: Max Vozeler <max@vozeler.com>
Cc: stable <stable@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d2dd0b07
...@@ -333,10 +333,11 @@ void usbip_dump_header(struct usbip_header *pdu) ...@@ -333,10 +333,11 @@ void usbip_dump_header(struct usbip_header *pdu)
usbip_udbg("CMD_UNLINK: seq %u\n", pdu->u.cmd_unlink.seqnum); usbip_udbg("CMD_UNLINK: seq %u\n", pdu->u.cmd_unlink.seqnum);
break; break;
case USBIP_RET_SUBMIT: case USBIP_RET_SUBMIT:
usbip_udbg("RET_SUBMIT: st %d al %u sf %d ec %d\n", usbip_udbg("RET_SUBMIT: st %d al %u sf %d #p %d ec %d\n",
pdu->u.ret_submit.status, pdu->u.ret_submit.status,
pdu->u.ret_submit.actual_length, pdu->u.ret_submit.actual_length,
pdu->u.ret_submit.start_frame, pdu->u.ret_submit.start_frame,
pdu->u.ret_submit.number_of_packets,
pdu->u.ret_submit.error_count); pdu->u.ret_submit.error_count);
case USBIP_RET_UNLINK: case USBIP_RET_UNLINK:
usbip_udbg("RET_UNLINK: status %d\n", pdu->u.ret_unlink.status); usbip_udbg("RET_UNLINK: status %d\n", pdu->u.ret_unlink.status);
...@@ -520,6 +521,7 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb, ...@@ -520,6 +521,7 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb,
rpdu->status = urb->status; rpdu->status = urb->status;
rpdu->actual_length = urb->actual_length; rpdu->actual_length = urb->actual_length;
rpdu->start_frame = urb->start_frame; rpdu->start_frame = urb->start_frame;
rpdu->number_of_packets = urb->number_of_packets;
rpdu->error_count = urb->error_count; rpdu->error_count = urb->error_count;
} else { } else {
/* vhci_rx.c */ /* vhci_rx.c */
...@@ -527,6 +529,7 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb, ...@@ -527,6 +529,7 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb,
urb->status = rpdu->status; urb->status = rpdu->status;
urb->actual_length = rpdu->actual_length; urb->actual_length = rpdu->actual_length;
urb->start_frame = rpdu->start_frame; urb->start_frame = rpdu->start_frame;
urb->number_of_packets = rpdu->number_of_packets;
urb->error_count = rpdu->error_count; urb->error_count = rpdu->error_count;
} }
} }
...@@ -595,11 +598,13 @@ static void correct_endian_ret_submit(struct usbip_header_ret_submit *pdu, ...@@ -595,11 +598,13 @@ static void correct_endian_ret_submit(struct usbip_header_ret_submit *pdu,
cpu_to_be32s(&pdu->status); cpu_to_be32s(&pdu->status);
cpu_to_be32s(&pdu->actual_length); cpu_to_be32s(&pdu->actual_length);
cpu_to_be32s(&pdu->start_frame); cpu_to_be32s(&pdu->start_frame);
cpu_to_be32s(&pdu->number_of_packets);
cpu_to_be32s(&pdu->error_count); cpu_to_be32s(&pdu->error_count);
} else { } else {
be32_to_cpus(&pdu->status); be32_to_cpus(&pdu->status);
be32_to_cpus(&pdu->actual_length); be32_to_cpus(&pdu->actual_length);
be32_to_cpus(&pdu->start_frame); be32_to_cpus(&pdu->start_frame);
cpu_to_be32s(&pdu->number_of_packets);
be32_to_cpus(&pdu->error_count); be32_to_cpus(&pdu->error_count);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册