[PATCH 05/29] staging: most: fix USB babble on IN pipe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
---
 drivers/staging/most/hdm-usb/hdm_usb.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 9bbefaa..9006793 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;
 	}
 
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux