1 From 655e247daf52b202a6c2d0f8a06dd2051e756ce4 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
3 Date: Mon, 16 Jan 2012 15:11:59 +0100
4 Subject: USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 From: Bjørn Mork <bjorn@mork.no>
11 commit 655e247daf52b202a6c2d0f8a06dd2051e756ce4 upstream.
13 As it turns out, there was a mismatch between the allocated inbuf size
14 (desc->bMaxPacketSize0, typically something like 64) and the length we
15 specified in the URB (desc->wMaxCommand, typically something like 2048)
17 Signed-off-by: Bjørn Mork <bjorn@mork.no>
18 Cc: Oliver Neukum <oliver@neukum.org>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
22 drivers/usb/class/cdc-wdm.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
25 --- a/drivers/usb/class/cdc-wdm.c
26 +++ b/drivers/usb/class/cdc-wdm.c
27 @@ -723,7 +723,7 @@ next_desc:
30 desc->inbuf = usb_alloc_coherent(interface_to_usbdev(intf),
31 - desc->bMaxPacketSize0,
34 &desc->response->transfer_dma);