This is a note to let you know that I've just added the patch titled
USB: Fix 'bad dma' problem on WDM device disconnect
to the 2.6.37-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-fix-bad-dma-problem-on-wdm-device-disconnect.patch
and it can be found in the queue-2.6.37 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 878b753e32ca765cd346a5d3038d630178ec78ff Mon Sep 17 00:00:00 2001
From: Robert Lukassen <[email protected]>
Date: Wed, 16 Mar 2011 12:13:34 +0100
Subject: USB: Fix 'bad dma' problem on WDM device disconnect
From: Robert Lukassen <[email protected]>
commit 878b753e32ca765cd346a5d3038d630178ec78ff upstream.
In the WDM class driver a disconnect event leads to calls to
usb_free_coherent to put back two USB DMA buffers allocated earlier.
The call to usb_free_coherent uses a different size parameter
(desc->wMaxCommand) than the corresponding call to usb_alloc_coherent
(desc->bMaxPacketSize0).
When a disconnect event occurs, this leads to 'bad dma' complaints
from usb core because the USB DMA buffer is being pushed back to the
'buffer-2048' pool from which it has not been allocated.
This patch against the most recent linux-2.6 kernel ensures that the
parameters used by usb_alloc_coherent & usb_free_coherent calls in
cdc-wdm.c match.
Signed-off-by: Robert Lukassen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/class/cdc-wdm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -281,7 +281,7 @@ static void cleanup(struct wdm_device *d
desc->sbuf,
desc->validity->transfer_dma);
usb_free_coherent(interface_to_usbdev(desc->intf),
- desc->wMaxCommand,
+ desc->bMaxPacketSize0,
desc->inbuf,
desc->response->transfer_dma);
kfree(desc->orq);
Patches currently in stable-queue which might be from
[email protected] are
queue-2.6.37/usb-fix-bad-dma-problem-on-wdm-device-disconnect.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable