summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-01-16 15:11:59 +0100
committerSimone Willett <swillett@nvidia.com>2012-02-08 14:41:05 -0800
commita5ab014ca5dce7cd039a6080b480f7e516ffc59a (patch)
tree8914da55ec1a1f9f145a60bd251aa46bb6e46357 /drivers/usb
parent2f136d2a161a97eed107df2efa680577e18c7605 (diff)
USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core
commit 655e247daf52b202a6c2d0f8a06dd2051e756ce4 upstream. As it turns out, there was a mismatch between the allocated inbuf size (desc->bMaxPacketSize0, typically something like 64) and the length we specified in the URB (desc->wMaxCommand, typically something like 2048) Signed-off-by: Bjørn Mork <bjorn@mork.no> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: I00872baa6896dfdd076fdcfc57956f1420973a7f Reviewed-on: http://git-master/r/79687 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/class/cdc-wdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index ec282b59f5e1..8516a8c10e1e 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -718,7 +718,7 @@ next_desc:
goto err;
desc->inbuf = usb_alloc_coherent(interface_to_usbdev(intf),
- desc->bMaxPacketSize0,
+ desc->wMaxCommand,
GFP_KERNEL,
&desc->response->transfer_dma);
if (!desc->inbuf)