aboutsummaryrefslogtreecommitdiffstats
path: root/usb.current
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-01-28 10:09:03 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-01-28 10:09:03 -0800
commit8cc41761de7769edb4a2db3a5623a61f4126cf40 (patch)
treefcb762d3fecc892b1f5952da47b0459ede4de567 /usb.current
parentc17398a9fe29f6759c97b57ea50713ea50f61efb (diff)
downloadpatches-8cc41761de7769edb4a2db3a5623a61f4126cf40.tar.gz
more patches
Diffstat (limited to 'usb.current')
-rw-r--r--usb.current/usb-gadget-fix-eem-gadget-crc-usage.patch44
-rw-r--r--usb.current/usb-r8a66597-hdc-disable-interrupts-fix.patch59
2 files changed, 103 insertions, 0 deletions
diff --git a/usb.current/usb-gadget-fix-eem-gadget-crc-usage.patch b/usb.current/usb-gadget-fix-eem-gadget-crc-usage.patch
new file mode 100644
index 00000000000000..55e73e57d94ec3
--- /dev/null
+++ b/usb.current/usb-gadget-fix-eem-gadget-crc-usage.patch
@@ -0,0 +1,44 @@
+From bniebuhr3@gmail.com Thu Jan 28 09:47:04 2010
+From: Brian Niebuhr <bniebuhr3@gmail.com>
+Date: Mon, 25 Jan 2010 14:45:40 -0600
+Subject: USB: gadget: fix EEM gadget CRC usage
+To: linux-usb@vger.kernel.org
+Cc: Brian Niebuhr <bniebuhr@efjohnson.com>, Steve Longerbeam <stevel@netspectrum.com>
+Message-ID: <9b99923f1001251245k11a1e74bo276d881a4069c277@mail.gmail.com>
+
+
+eem_wrap() is sending a sentinel CRC, but it didn't indicate that to
+the host, it should zero bit 14 (bmCRC) in the EEM packet header,
+instead of setting it.
+
+Also remove a redundant crc calculation in eem_unwrap().
+
+
+Signed-off-by: Steve Longerbeam <stevel@netspectrum.com>
+Acked-by: Brian Niebuhr <bniebuhr@efjohnson.com>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/f_eem.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/f_eem.c
++++ b/drivers/usb/gadget/f_eem.c
+@@ -358,7 +358,7 @@ done:
+ * b15: bmType (0 == data)
+ */
+ len = skb->len;
+- put_unaligned_le16((len & 0x3FFF) | BIT(14), skb_push(skb, 2));
++ put_unaligned_le16(len & 0x3FFF, skb_push(skb, 2));
+
+ /* add a zero-length EEM packet, if needed */
+ if (padlen)
+@@ -464,7 +464,6 @@ static int eem_unwrap(struct gether *por
+ }
+
+ /* validate CRC */
+- crc = get_unaligned_le32(skb->data + len - ETH_FCS_LEN);
+ if (header & BIT(14)) {
+ crc = get_unaligned_le32(skb->data + len
+ - ETH_FCS_LEN);
diff --git a/usb.current/usb-r8a66597-hdc-disable-interrupts-fix.patch b/usb.current/usb-r8a66597-hdc-disable-interrupts-fix.patch
new file mode 100644
index 00000000000000..9415bea64d3a1a
--- /dev/null
+++ b/usb.current/usb-r8a66597-hdc-disable-interrupts-fix.patch
@@ -0,0 +1,59 @@
+From magnus.damm@gmail.com Thu Jan 28 09:52:39 2010
+From: Magnus Damm <magnus.damm@gmail.com>
+Date: Wed, 27 Jan 2010 16:41:19 +0900
+Subject: USB: r8a66597-hdc disable interrupts fix
+To: linux-sh@vger.kernel.org
+Cc: Magnus Damm <magnus.damm@gmail.com>, lethal@linux-sh.org, shimoda.yoshihiro@renesas.com, linux-usb@vger.kernel.org, gregkh@suse.de
+Message-ID: <20100127074119.25763.59310.sendpatchset@rxone.opensource.se>
+
+
+From: Magnus Damm <damm@opensource.se>
+
+This patch improves disable_controller() in the r8a66597-hdc
+driver to disable all interrupts and clear status flags. It
+also makes sure that disable_controller() is called during
+probe(). This fixes the relatively rare case of unexpected
+pending interrupts after kexec reboot.
+
+Signed-off-by: Magnus Damm <damm@opensource.se>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/r8a66597-hcd.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/r8a66597-hcd.c
++++ b/drivers/usb/host/r8a66597-hcd.c
+@@ -216,8 +216,17 @@ static void disable_controller(struct r8
+ {
+ int port;
+
++ /* disable interrupts */
+ r8a66597_write(r8a66597, 0, INTENB0);
+- r8a66597_write(r8a66597, 0, INTSTS0);
++ r8a66597_write(r8a66597, 0, INTENB1);
++ r8a66597_write(r8a66597, 0, BRDYENB);
++ r8a66597_write(r8a66597, 0, BEMPENB);
++ r8a66597_write(r8a66597, 0, NRDYENB);
++
++ /* clear status */
++ r8a66597_write(r8a66597, 0, BRDYSTS);
++ r8a66597_write(r8a66597, 0, NRDYSTS);
++ r8a66597_write(r8a66597, 0, BEMPSTS);
+
+ for (port = 0; port < r8a66597->max_root_hub; port++)
+ r8a66597_disable_port(r8a66597, port);
+@@ -2466,6 +2475,12 @@ static int __devinit r8a66597_probe(stru
+ r8a66597->rh_timer.data = (unsigned long)r8a66597;
+ r8a66597->reg = (unsigned long)reg;
+
++ /* make sure no interrupts are pending */
++ ret = r8a66597_clock_enable(r8a66597);
++ if (ret < 0)
++ goto clean_up3;
++ disable_controller(r8a66597);
++
+ for (i = 0; i < R8A66597_MAX_NUM_PIPE; i++) {
+ INIT_LIST_HEAD(&r8a66597->pipe_queue[i]);
+ init_timer(&r8a66597->td_timer[i]);