diff options
author | Bjørn Mork <bjorn@mork.no> | 2012-01-16 09:11:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-03 12:19:02 -0500 |
commit | 5256ca41663c848ac24783a5161a97730a21696c (patch) | |
tree | c71feea294099586e8158994a78008464b98b74f | |
parent | f1abac982c49f35615f47ff1f94a8ca5ba962bd8 (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>
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index ed4317365fa..854615ca37a 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -723,7 +723,7 @@ next_desc: | |||
723 | goto err; | 723 | goto err; |
724 | 724 | ||
725 | desc->inbuf = usb_alloc_coherent(interface_to_usbdev(intf), | 725 | desc->inbuf = usb_alloc_coherent(interface_to_usbdev(intf), |
726 | desc->bMaxPacketSize0, | 726 | desc->wMaxCommand, |
727 | GFP_KERNEL, | 727 | GFP_KERNEL, |
728 | &desc->response->transfer_dma); | 728 | &desc->response->transfer_dma); |
729 | if (!desc->inbuf) | 729 | if (!desc->inbuf) |