summaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip/vhci_rx.c
diff options
context:
space:
mode:
authorArjan Mels <arjan.mels@gmx.net>2011-04-05 20:26:59 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-06 15:51:14 -0700
commit28276a28d8b3cd19f4449991faad4945fe557656 (patch)
treee3c5c6ceb249faf8a90e03519a198836235746a5 /drivers/staging/usbip/vhci_rx.c
parent1325f85fa49f57df034869de430f7c302ae23109 (diff)
downloadop-kernel-dev-28276a28d8b3cd19f4449991faad4945fe557656.zip
op-kernel-dev-28276a28d8b3cd19f4449991faad4945fe557656.tar.gz
staging: usbip: bugfix for isochronous packets and optimization
For isochronous packets the actual_length is the sum of the actual length of each of the packets, however between the packets might be padding, so it is not sufficient to just send the first actual_length bytes of the buffer. To fix this and simultanesouly optimize the bandwidth the content of the isochronous packets are send without the padding, the padding is restored on the receiving end. Signed-off-by: Arjan 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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip/vhci_rx.c')
-rw-r--r--drivers/staging/usbip/vhci_rx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/usbip/vhci_rx.c b/drivers/staging/usbip/vhci_rx.c
index 09bf235..2ffc96a 100644
--- a/drivers/staging/usbip/vhci_rx.c
+++ b/drivers/staging/usbip/vhci_rx.c
@@ -100,6 +100,9 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
if (usbip_recv_iso(ud, urb) < 0)
return;
+ /* restore the padding in iso packets */
+ if (usbip_pad_iso(ud, urb) < 0)
+ return;
if (usbip_dbg_flag_vhci_rx)
usbip_dump_urb(urb);
OpenPOWER on IntegriCloud