aboutsummaryrefslogtreecommitdiffstats
path: root/usb/usb-musb-gadget-only-enable-autoclear-in-double-buffered-case.patch
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-10-05 14:19:44 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-05 14:19:44 -0700
commit9e54cc2f815f57852a179325184efe7fc2219be0 (patch)
tree8346597b73cb9ad21ac8316bd3217f040e0c73d7 /usb/usb-musb-gadget-only-enable-autoclear-in-double-buffered-case.patch
parentbb6875565ac14ec6885ed0c21119899200d4f10a (diff)
downloadpatches-9e54cc2f815f57852a179325184efe7fc2219be0.tar.gz
usb patches
Diffstat (limited to 'usb/usb-musb-gadget-only-enable-autoclear-in-double-buffered-case.patch')
-rw-r--r--usb/usb-musb-gadget-only-enable-autoclear-in-double-buffered-case.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/usb/usb-musb-gadget-only-enable-autoclear-in-double-buffered-case.patch b/usb/usb-musb-gadget-only-enable-autoclear-in-double-buffered-case.patch
new file mode 100644
index 00000000000000..4376a184cdc118
--- /dev/null
+++ b/usb/usb-musb-gadget-only-enable-autoclear-in-double-buffered-case.patch
@@ -0,0 +1,40 @@
+From balbi@ti.com Tue Oct 5 13:31:10 2010
+From: Felipe Balbi <balbi@ti.com>
+To: Greg KH <greg@kroah.com>
+Cc: Linux USB Mailing List <linux-usb@vger.kernel.org>,
+ Felipe Balbi <balbi@ti.com>
+Subject: usb: musb: gadget: only enable AUTOCLEAR in double buffered case
+Date: Fri, 24 Sep 2010 13:44:15 +0300
+Message-Id: <1285325055-1247-15-git-send-email-balbi@ti.com>
+
+commit 633ba7876b96ec339ef685357e2f7c60b5a8ce85 broke
+g_file_storage functionality by enabling AUTOCLEAR on
+all cases without caring for all gadget drivers.
+
+This patch will only enable AUTOCLEAR if our endpoint's
+FIFO was configured with double buffering support. Note
+this is not a complete fix, double buffered case still
+doesn't work always, but that hasn't been working for
+quite some time. Other than reverting the entire commit
+and breaking testusb with double buffered case again,
+I decided it was better to fix the single buffered case
+and spend more time fixing double buffered case properly.
+
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/usb/musb/musb_gadget.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -689,7 +689,8 @@ static void rxstate(struct musb *musb, s
+ */
+
+ csr |= MUSB_RXCSR_DMAENAB;
+- if (!musb_ep->hb_mult)
++ if (!musb_ep->hb_mult &&
++ musb_ep->hw_ep->rx_double_buffered)
+ csr |= MUSB_RXCSR_AUTOCLEAR;
+ #ifdef USE_MODE1
+ /* csr |= MUSB_RXCSR_DMAMODE; */