aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-08-14 09:45:34 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-08-14 09:45:34 -0700
commit1273eb89bc5681e563a1a3b55c72bb2aa7f4147c (patch)
treef677290a33f4d11b24f9f34ec5ee6ab79ba629ec /usb
parentb8804021e71f5af9d5f8f4d3f08dd0cb64942d05 (diff)
downloadpatches-1273eb89bc5681e563a1a3b55c72bb2aa7f4147c.tar.gz
more patches
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-ehci-ensure-all-watchdog-timer-events-are-deleted-when-suspending-usb.patch52
-rw-r--r--usb/usb-fix-cdc-eem-host-driver-sentinel-crc-validation.patch57
-rw-r--r--usb/usb-gadget-update-freescale-udc-entry-in-maintainers.patch38
-rw-r--r--usb/usb-isp1362-correct-use-of-and.patch56
-rw-r--r--usb/usb-ohci-ep93xx.c-remove-unused-variable.patch32
-rw-r--r--usb/usb-otg-fix-twl4030-usb-build.patch39
6 files changed, 274 insertions, 0 deletions
diff --git a/usb/usb-ehci-ensure-all-watchdog-timer-events-are-deleted-when-suspending-usb.patch b/usb/usb-ehci-ensure-all-watchdog-timer-events-are-deleted-when-suspending-usb.patch
new file mode 100644
index 00000000000000..6b08a4776030b6
--- /dev/null
+++ b/usb/usb-ehci-ensure-all-watchdog-timer-events-are-deleted-when-suspending-usb.patch
@@ -0,0 +1,52 @@
+From stern@rowland.harvard.edu Thu Aug 13 16:37:16 2009
+From: Jon Hunter <jon-hunter@ti.com>
+Date: Wed, 12 Aug 2009 11:57:59 -0400 (EDT)
+Subject: USB: EHCI: ensure all watchdog timer events are deleted when suspending usb
+To: Greg KH <greg@kroah.com>, Jon Hunter <jon-hunter@ti.com>
+Cc: Fei Yang <fei.yang@motorola.com>
+Message-ID: <Pine.LNX.4.44L0.0908121157090.9635-100000@iolanthe.rowland.org>
+
+
+From: Jon Hunter <jon-hunter@ti.com>
+
+This patch was previously discussed in the following thread:
+http://thread.gmane.org/gmane.linux.usb.general/19472/focus=19484
+
+On the OMAP3 device the usbhost controller is in a separate internal
+power-domain. So when the usbhost is inactive or suspend is called,
+we can disable clocks and power-down the usbhost to save power.
+
+Recently we found that after calling ehci_bus_suspend() and disabling
+the usbhost clocks we would see the ehci watchdog timer event fire. This
+was causing a kernel panic because the usbhost controllers clocks were
+disabled and inside the watchdog timer function the clocks were not
+being re-enabled, so when the ehci registers were accessed this resulted
+in a CPU data-abort.
+
+To avoid this panic, per recommendation from Alan Stern (see above thread), we
+make sure any pending timer events (that may have been scheduled by calling
+ehci_work within the ehci_bus_suspend() function) are deleted before returning.
+
+Signed-off-by: Fei Yang <fei.yang@motorola.com>
+Signed-off-by: Jon Hunter <jon-hunter@ti.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-hub.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/host/ehci-hub.c
++++ b/drivers/usb/host/ehci-hub.c
+@@ -209,6 +209,11 @@ static int ehci_bus_suspend (struct usb_
+
+ ehci->next_statechange = jiffies + msecs_to_jiffies(10);
+ spin_unlock_irq (&ehci->lock);
++
++ /* ehci_work() may have re-enabled the watchdog timer, which we do not
++ * want, and so we must delete any pending watchdog timer events.
++ */
++ del_timer_sync(&ehci->watchdog);
+ return 0;
+ }
+
diff --git a/usb/usb-fix-cdc-eem-host-driver-sentinel-crc-validation.patch b/usb/usb-fix-cdc-eem-host-driver-sentinel-crc-validation.patch
new file mode 100644
index 00000000000000..76a177b92762af
--- /dev/null
+++ b/usb/usb-fix-cdc-eem-host-driver-sentinel-crc-validation.patch
@@ -0,0 +1,57 @@
+From bniebuhr3@gmail.com Thu Aug 13 16:48:07 2009
+From: Brian Niebuhr <bniebuhr3@gmail.com>
+Date: Mon, 10 Aug 2009 16:46:59 -0500
+Subject: USB: Fix CDC EEM host driver 'sentinel' CRC validation
+To: linux-usb@vger.kernel.org
+Cc: Brian Niebuhr <bniebuhr@efjohnson.com>
+Message-ID: <1249940819-17023-1-git-send-email-bniebuhr@efjohnson.com>
+
+From: Brian Niebuhr <bniebuhr@efjohnson.com>
+
+This is an alternate solution to the EEM 'sentinel' CRC valiation issue.
+
+CDC EEM allows using a 'sentinel' ethernet frame CRC of 0xdeadbeef in
+place of a real CRC. The 'sentinel' value is transmitted in big-endian
+order whereas the normal CRC is little-endian. This patch handles both
+cases appropriately.
+
+Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/usb/cdc_eem.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/usb/cdc_eem.c
++++ b/drivers/net/usb/cdc_eem.c
+@@ -300,20 +300,23 @@ static int eem_rx_fixup(struct usbnet *d
+ return 0;
+ }
+
+- crc = get_unaligned_le32(skb2->data
+- + len - ETH_FCS_LEN);
+- skb_trim(skb2, len - ETH_FCS_LEN);
+-
+ /*
+ * The bmCRC helps to denote when the CRC field in
+ * the Ethernet frame contains a calculated CRC:
+ * bmCRC = 1 : CRC is calculated
+ * bmCRC = 0 : CRC = 0xDEADBEEF
+ */
+- if (header & BIT(14))
+- crc2 = ~crc32_le(~0, skb2->data, skb2->len);
+- else
++ if (header & BIT(14)) {
++ crc = get_unaligned_le32(skb2->data
++ + len - ETH_FCS_LEN);
++ crc2 = ~crc32_le(~0, skb2->data, skb2->len
++ - ETH_FCS_LEN);
++ } else {
++ crc = get_unaligned_be32(skb2->data
++ + len - ETH_FCS_LEN);
+ crc2 = 0xdeadbeef;
++ }
++ skb_trim(skb2, len - ETH_FCS_LEN);
+
+ if (is_last)
+ return crc == crc2;
diff --git a/usb/usb-gadget-update-freescale-udc-entry-in-maintainers.patch b/usb/usb-gadget-update-freescale-udc-entry-in-maintainers.patch
new file mode 100644
index 00000000000000..914bcbe45c3727
--- /dev/null
+++ b/usb/usb-gadget-update-freescale-udc-entry-in-maintainers.patch
@@ -0,0 +1,38 @@
+From leoli@freescale.com Thu Aug 13 16:44:31 2009
+From: Li Yang <leoli@freescale.com>
+Date: Tue, 11 Aug 2009 11:11:11 +0800
+Subject: USB: gadget: Update Freescale UDC entry in MAINTAINERS
+To: gregkh@suse.de, joe@perches.com
+Cc: lg@denx.de, linux-usb@vger.kernel.org, linuxppc-dev@ozlabs.org, Li Yang <leoli@freescale.com>
+Message-ID: <1249960271-3400-1-git-send-email-leoli@freescale.com>
+
+
+Change the F entry for file rename, and make it also cover fsl_qe_udc
+driver. Update the name accordingly.
+
+Signed-off-by: Li Yang <leoli@freescale.com>
+Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+Cc: Joe Perches <joe@perches.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ MAINTAINERS | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -2067,12 +2067,12 @@ S: Supported
+ F: arch/powerpc/sysdev/qe_lib/
+ F: arch/powerpc/include/asm/*qe.h
+
+-FREESCALE HIGHSPEED USB DEVICE DRIVER
++FREESCALE USB PERIPHERIAL DRIVERS
+ M: Li Yang <leoli@freescale.com>
+ L: linux-usb@vger.kernel.org
+ L: linuxppc-dev@ozlabs.org
+ S: Maintained
+-F: drivers/usb/gadget/fsl_usb2_udc.c
++F: drivers/usb/gadget/fsl*
+
+ FREESCALE QUICC ENGINE UCC ETHERNET DRIVER
+ M: Li Yang <leoli@freescale.com>
diff --git a/usb/usb-isp1362-correct-use-of-and.patch b/usb/usb-isp1362-correct-use-of-and.patch
new file mode 100644
index 00000000000000..5c55006c864a4e
--- /dev/null
+++ b/usb/usb-isp1362-correct-use-of-and.patch
@@ -0,0 +1,56 @@
+From julia@diku.dk Thu Aug 13 16:38:05 2009
+From: Julia Lawall <julia@diku.dk>
+Date: Wed, 12 Aug 2009 16:51:09 +0200 (CEST)
+Subject: USB: isp1362: Correct use of ! and &
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Message-ID: <Pine.LNX.4.64.0908121650450.8540@pc-004.diku.dk>
+
+
+From: Julia Lawall <julia@diku.dk>
+
+Correct priority problem in the use of ! and &.
+
+The semantic patch that makes this change is as follows:
+(http://www.emn.fr/x-info/coccinelle/)
+
+// <smpl>
+@@ expression E; constant C; @@
+- !E & C
++ !(E & C)
+// </smpl>
+
+Signed-off-by: Julia Lawall <julia@diku.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/isp1362-hcd.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/host/isp1362-hcd.c
++++ b/drivers/usb/host/isp1362-hcd.c
+@@ -1075,8 +1075,10 @@ static irqreturn_t isp1362_irq(struct us
+ isp1362_clr_mask16(isp1362_hcd, HCBUFSTAT, HCBUFSTAT_ISTL0_FULL);
+ DBG(1, "%s: ISTL0\n", __func__);
+ WARN_ON((int)!!isp1362_hcd->istl_flip);
+- WARN_ON(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) & HCBUFSTAT_ISTL0_ACTIVE);
+- WARN_ON(!isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) & HCBUFSTAT_ISTL0_DONE);
++ WARN_ON(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) &
++ HCBUFSTAT_ISTL0_ACTIVE);
++ WARN_ON(!(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) &
++ HCBUFSTAT_ISTL0_DONE));
+ isp1362_hcd->irqenb &= ~HCuPINT_ISTL0;
+ }
+
+@@ -1087,8 +1089,10 @@ static irqreturn_t isp1362_irq(struct us
+ isp1362_clr_mask16(isp1362_hcd, HCBUFSTAT, HCBUFSTAT_ISTL1_FULL);
+ DBG(1, "%s: ISTL1\n", __func__);
+ WARN_ON(!(int)isp1362_hcd->istl_flip);
+- WARN_ON(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) & HCBUFSTAT_ISTL1_ACTIVE);
+- WARN_ON(!isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) & HCBUFSTAT_ISTL1_DONE);
++ WARN_ON(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) &
++ HCBUFSTAT_ISTL1_ACTIVE);
++ WARN_ON(!(isp1362_read_reg16(isp1362_hcd, HCBUFSTAT) &
++ HCBUFSTAT_ISTL1_DONE));
+ isp1362_hcd->irqenb &= ~HCuPINT_ISTL1;
+ }
+
diff --git a/usb/usb-ohci-ep93xx.c-remove-unused-variable.patch b/usb/usb-ohci-ep93xx.c-remove-unused-variable.patch
new file mode 100644
index 00000000000000..2a84b22a03ad1c
--- /dev/null
+++ b/usb/usb-ohci-ep93xx.c-remove-unused-variable.patch
@@ -0,0 +1,32 @@
+From hartleys@visionengravers.com Thu Aug 13 16:58:31 2009
+From: "H Hartley Sweeten" <hartleys@visionengravers.com>
+Date: Thu, 13 Aug 2009 13:18:02 -0400
+Subject: USB: ohci-ep93xx.c: remove unused variable
+To: <linux-arm-kernel@lists.arm.linux.org.uk>
+Cc: "Lennert Buytenhek" <buytenh@wantstofly.org>, <linux-usb@vger.kernel.org>
+Message-ID: <BD79186B4FD85F4B8E60E381CAEE190901BE9D26@mi8nycmail19.Mi8.com>
+
+
+Remove unused variable in ohci-ep93xx.c.
+
+This only shows up when CONFIG_PM is enabled.
+
+Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
+Cc: Lennert Buytenhek <kernel@wantstofly.org>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-ep93xx.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-ep93xx.c
++++ b/drivers/usb/host/ohci-ep93xx.c
+@@ -188,7 +188,6 @@ static int ohci_hcd_ep93xx_drv_resume(st
+ {
+ struct usb_hcd *hcd = platform_get_drvdata(pdev);
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+- int status;
+
+ if (time_before(jiffies, ohci->next_statechange))
+ msleep(5);
diff --git a/usb/usb-otg-fix-twl4030-usb-build.patch b/usb/usb-otg-fix-twl4030-usb-build.patch
new file mode 100644
index 00000000000000..26723c32c876e4
--- /dev/null
+++ b/usb/usb-otg-fix-twl4030-usb-build.patch
@@ -0,0 +1,39 @@
+From randy.dunlap@oracle.com Thu Aug 13 16:56:33 2009
+From: Randy Dunlap <randy.dunlap@oracle.com>
+Date: Tue, 11 Aug 2009 11:31:31 -0700
+Subject: USB: otg: fix twl4030-usb build
+To: Stephen Rothwell <sfr@canb.auug.org.au>, Felipe Balbi <felipe.balbi@nokia.com>, gregkh@suse.de
+Cc: akpm <akpm@linux-foundation.org>
+Message-ID: <20090811113131.44db4177.randy.dunlap@oracle.com>
+
+
+From: Randy Dunlap <randy.dunlap@oracle.com>
+
+subsys_initcall_sync() is only defined for built-in code, not for
+loadable modules, so this driver build fails when built as a module.
+However, the _sync() forms of the initcalls are not implemented,
+so this should not be used -- just use the non-sync form of it.
+
+drivers/usb/otg/twl4030-usb.c:777: warning: data definition has no type or storage class
+drivers/usb/otg/twl4030-usb.c:777: warning: type defaults to 'int' in declaration of 'subsys_initcall_sync'
+drivers/usb/otg/twl4030-usb.c:777: warning: parameter names (without types) in function declaration
+
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Cc: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/otg/twl4030-usb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/otg/twl4030-usb.c
++++ b/drivers/usb/otg/twl4030-usb.c
+@@ -774,7 +774,7 @@ static int __init twl4030_usb_init(void)
+ {
+ return platform_driver_register(&twl4030_usb_driver);
+ }
+-subsys_initcall_sync(twl4030_usb_init);
++subsys_initcall(twl4030_usb_init);
+
+ static void __exit twl4030_usb_exit(void)
+ {