summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2015-09-28 17:18:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 03:18:49 +0200
commit9161e9311c29e905c8b1cf9f10f5010239d49975 (patch)
treef5bdb7d61a5c4c56c02c8e28c6dd69440c628a2e /drivers/staging
parent3032ab931bc81d56f6bd9a2a319afc66e4b03923 (diff)
downloadlinux-stable-9161e9311c29e905c8b1cf9f10f5010239d49975.tar.gz
linux-stable-9161e9311c29e905c8b1cf9f10f5010239d49975.tar.bz2
linux-stable-9161e9311c29e905c8b1cf9f10f5010239d49975.zip
staging: most: fix USB babble on IN pipe
This patch prevents the HDM USB from submitting an URB with a buffer size unaligned to 512 bytes to the USB subsystem. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/most/hdm-usb/hdm_usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 9bbefaaa0134..9006793aec64 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -711,7 +711,7 @@ static int hdm_enqueue(struct most_interface *iface, int channel, struct mbo *mb
usb_rcvbulkpipe(mdev->usb_device,
mdev->ep_address[channel]),
virt_address,
- length,
+ length + conf->extra_len,
hdm_read_completion,
mbo);
}
@@ -771,6 +771,7 @@ static int hdm_configure_channel(struct most_interface *iface, int channel,
!((conf->data_type == MOST_CH_ISOC_AVP) &&
(conf->packets_per_xact != 0xFF))) {
mdev->padding_active[channel] = false;
+ conf->extra_len = 0;
goto exit;
}