aboutsummaryrefslogtreecommitdiffstats
path: root/usb/usb-r8a66597-udc-add-processing-when-usb-was-removed.patch
diff options
Diffstat (limited to 'usb/usb-r8a66597-udc-add-processing-when-usb-was-removed.patch')
-rw-r--r--usb/usb-r8a66597-udc-add-processing-when-usb-was-removed.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/usb/usb-r8a66597-udc-add-processing-when-usb-was-removed.patch b/usb/usb-r8a66597-udc-add-processing-when-usb-was-removed.patch
new file mode 100644
index 00000000000000..ced13c253379f1
--- /dev/null
+++ b/usb/usb-r8a66597-udc-add-processing-when-usb-was-removed.patch
@@ -0,0 +1,40 @@
+From yusuke.goda.sx@renesas.com Wed Oct 20 14:24:29 2010
+Date: Wed, 20 Oct 2010 09:28:08 +0900
+From: Yusuke Goda <yusuke.goda.sx@renesas.com>
+Subject: usb: r8a66597-udc: Add processing when USB was removed.
+To: linux-usb@vger.kernel.org
+Cc: dbrownell@users.sourceforge.net, gregkh@suse.de,
+ Paul Mundt <lethal@linux-sh.org>,
+ Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Message-id: <4CBE3798.2080009@renesas.com>
+
+When USB was removed, this patch prepares for the next insertion.
+
+Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
+Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Cc: Paul Mundt <lethal@linux-sh.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/r8a66597-udc.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/gadget/r8a66597-udc.c
++++ b/drivers/usb/gadget/r8a66597-udc.c
+@@ -42,6 +42,7 @@ static const char *r8a66597_ep_name[] =
+ "ep8", "ep9",
+ };
+
++static void init_controller(struct r8a66597 *r8a66597);
+ static void disable_controller(struct r8a66597 *r8a66597);
+ static void irq_ep0_write(struct r8a66597_ep *ep, struct r8a66597_request *req);
+ static void irq_packet_write(struct r8a66597_ep *ep,
+@@ -104,6 +105,8 @@ __acquires(r8a66597->lock)
+ spin_lock(&r8a66597->lock);
+
+ disable_controller(r8a66597);
++ init_controller(r8a66597);
++ r8a66597_bset(r8a66597, VBSE, INTENB0);
+ INIT_LIST_HEAD(&r8a66597->ep[0].queue);
+ }
+