summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-01-16 15:11:59 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 23:33:50 +0100
commitcafbe85fb0d00d32988905c4978df433ca9b6512 (patch)
tree6c4cb1ddd01bec48ae1808c848d5173afe772280 /drivers/usb/class
parentUSB: cdc-wdm: no need to fill the in request URB every time it's submitted (diff)
downloadlinux-cafbe85fb0d00d32988905c4978df433ca9b6512.tar.xz
linux-cafbe85fb0d00d32988905c4978df433ca9b6512.zip
USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core
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> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class')
-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 9734863a3a49..846dfa603447 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -696,7 +696,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)