aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-04-21 23:04:34 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-21 23:04:34 -0700
commit3fc445d47e4235983450c884be2404a0a0029958 (patch)
treece9578bf3aec6e6f44814fd942ac63bc5dfead28
parent7142d75625b830b24097e7fa6783cb7ce060a620 (diff)
downloadpatches-3fc445d47e4235983450c884be2404a0a0029958.tar.gz
usb patches and sync with 2.6.30-rc3
-rw-r--r--driver-core.current/doc-sysfs-rules-swap-the-order-of-the-words-so-the-sentence-makes-more-sense.patch30
-rw-r--r--driver-core.current/driver-core-platform-fix-kernel-doc-warnings.patch49
-rw-r--r--series17
-rw-r--r--usb.current/usb-ci13xxx_udc-fix-build-error.patch30
-rw-r--r--usb.current/usb-ehci-sched.c-ehci-sitd-scheduling-bugfix.patch2
-rw-r--r--usb.current/usb-gadget-omap_udc-uses-platform_driver_probe.patch40
-rw-r--r--usb.current/usb-musb-prevent-multiple-includes-of-musb.h.patch40
-rw-r--r--usb.current/usb-serial-sierra-driver-bug-fix-for-composite-interface.patch73
-rw-r--r--usb/usb-at91_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch39
-rw-r--r--usb/usb-atmel_usba_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch37
-rw-r--r--usb/usb-ci13xxx_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch34
-rw-r--r--usb/usb-core-sysfs-fix-sparse-warnings.patch53
-rw-r--r--usb/usb-gadgetfs-use-helper-functions-to-determine-endpoint-type-and-direction.patch63
-rw-r--r--usb/usb-goku-s-use-helper-functions-to-determine-endpoint-type-and-direction.patch43
-rw-r--r--usb/usb-ignore-storage-device-in-modem-mode-on-dwn-652.patch87
-rw-r--r--usb/usb-uhci-queue-use-usb_endpoint_type.patch29
-rw-r--r--usb/usb-usbfs-deprecate-and-hide-option-for-embedded.patch59
-rw-r--r--version2
18 files changed, 724 insertions, 3 deletions
diff --git a/driver-core.current/doc-sysfs-rules-swap-the-order-of-the-words-so-the-sentence-makes-more-sense.patch b/driver-core.current/doc-sysfs-rules-swap-the-order-of-the-words-so-the-sentence-makes-more-sense.patch
new file mode 100644
index 00000000000000..c74cbc3f3c6720
--- /dev/null
+++ b/driver-core.current/doc-sysfs-rules-swap-the-order-of-the-words-so-the-sentence-makes-more-sense.patch
@@ -0,0 +1,30 @@
+From randy.dunlap@oracle.com Tue Apr 21 22:37:36 2009
+From: Henrik Austad <henrik@austad.us>
+Date: Mon, 20 Apr 2009 18:42:38 -0700
+Subject: Doc/sysfs-rules: Swap the order of the words so the sentence makes more sense
+Cc: gregkh@suse.de, Henrik Austad <henrik@austad.us>
+Message-ID: <20090420184238.51cd7092.randy.dunlap@oracle.com>
+
+
+From: Henrik Austad <henrik@austad.us>
+
+Signed-off-by: Henrik Austad <henrik@austad.us>
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Cc: Greg Kroah-Hartman <gregkh@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/sysfs-rules.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Documentation/sysfs-rules.txt
++++ b/Documentation/sysfs-rules.txt
+@@ -113,7 +113,7 @@ versions of the sysfs interface.
+ "devices" directory at /sys/subsystem/<name>/devices.
+
+ If /sys/subsystem exists, /sys/bus, /sys/class and /sys/block can be
+- ignored. If it does not exist, you have always to scan all three
++ ignored. If it does not exist, you always have to scan all three
+ places, as the kernel is free to move a subsystem from one place to
+ the other, as long as the devices are still reachable by the same
+ subsystem name.
diff --git a/driver-core.current/driver-core-platform-fix-kernel-doc-warnings.patch b/driver-core.current/driver-core-platform-fix-kernel-doc-warnings.patch
new file mode 100644
index 00000000000000..28456463e2a549
--- /dev/null
+++ b/driver-core.current/driver-core-platform-fix-kernel-doc-warnings.patch
@@ -0,0 +1,49 @@
+From rdunlap@xenotime.net Tue Apr 21 22:37:06 2009
+From: Randy Dunlap <rdunlap@xenotime.net>
+Date: Tue, 21 Apr 2009 07:22:53 -0700
+Subject: Driver core: platform: fix kernel-doc warnings
+To: Greg KH <gregkh@suse.de>
+Message-ID: <49EDD6BD.1010006@xenotime.net>
+
+
+From: Randy Dunlap <randy.dunlap@oracle.com>
+
+Fix function parameter notation in platform.c;
+fixes kernel-doc warnings.
+
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/platform.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/base/platform.c
++++ b/drivers/base/platform.c
+@@ -1029,7 +1029,7 @@ static __initdata LIST_HEAD(early_platfo
+
+ /**
+ * early_platform_driver_register
+- * @edrv: early_platform driver structure
++ * @epdrv: early_platform driver structure
+ * @buf: string passed from early_param()
+ */
+ int __init early_platform_driver_register(struct early_platform_driver *epdrv,
+@@ -1113,7 +1113,7 @@ void __init early_platform_driver_regist
+
+ /**
+ * early_platform_match
+- * @edrv: early platform driver structure
++ * @epdrv: early platform driver structure
+ * @id: id to match against
+ */
+ static __init struct platform_device *
+@@ -1131,7 +1131,7 @@ early_platform_match(struct early_platfo
+
+ /**
+ * early_platform_left
+- * @edrv: early platform driver structure
++ * @epdrv: early platform driver structure
+ * @id: return true if id or above exists
+ */
+ static __init int early_platform_left(struct early_platform_driver *epdrv,
diff --git a/series b/series
index 5034ce61071fe4..b989e7e4599479 100644
--- a/series
+++ b/series
@@ -10,6 +10,8 @@ gregkh/gkh-version.patch
# Driver core patches for 2.6.30
#################################
driver-core.current/driver-core-platform-do-not-complain-for-platform_data-added-by-platform_device_add_data.patch
+driver-core.current/driver-core-platform-fix-kernel-doc-warnings.patch
+driver-core.current/doc-sysfs-rules-swap-the-order-of-the-words-so-the-sentence-makes-more-sense.patch
#################################
@@ -26,6 +28,10 @@ usb.current/usb-mos7840-fix-debug-log-messages.patch
usb.current/usb-ehci-sched.c-ehci-sitd-scheduling-bugfix.patch
usb.current/usb-g_file_storage-fix-use-after-free-bug-when-closing-files.patch
usb.current/usb-pass-mem_flags-to-dma_alloc_coherent.patch
+usb.current/usb-musb-prevent-multiple-includes-of-musb.h.patch
+usb.current/usb-ci13xxx_udc-fix-build-error.patch
+usb.current/usb-gadget-omap_udc-uses-platform_driver_probe.patch
+usb.current/usb-serial-sierra-driver-bug-fix-for-composite-interface.patch
#####################################################################
@@ -64,7 +70,15 @@ usb/musb-use-dma-mode-1-for-tx-if-transfer-size-equals-maxpacket.patch
usb/musb-add-high-bandwidth-iso-support.patch
usb/usb-serial-ftdi-add-high-speed-device-support.patch
usb/usb-consolidate-usb_unbind_interface-and-usb_driver_release_interface.patch
-
+usb/usb-usbfs-deprecate-and-hide-option-for-embedded.patch
+usb/usb-ignore-storage-device-in-modem-mode-on-dwn-652.patch
+usb/usb-core-sysfs-fix-sparse-warnings.patch
+usb/usb-ci13xxx_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
+usb/usb-atmel_usba_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
+usb/usb-at91_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
+usb/usb-goku-s-use-helper-functions-to-determine-endpoint-type-and-direction.patch
+usb/usb-gadgetfs-use-helper-functions-to-determine-endpoint-type-and-direction.patch
+usb/usb-uhci-queue-use-usb_endpoint_type.patch
# stuff I want in my tree, but not to go into -next
@@ -203,3 +217,4 @@ staging/staging-w35und-merge-rest-of-wbhal.c-to-phy_calibration.c.patch
#staging/staging-add-intel-poulsbo-morrestown-drm-driver.patch
+
diff --git a/usb.current/usb-ci13xxx_udc-fix-build-error.patch b/usb.current/usb-ci13xxx_udc-fix-build-error.patch
new file mode 100644
index 00000000000000..905a9b4976d65d
--- /dev/null
+++ b/usb.current/usb-ci13xxx_udc-fix-build-error.patch
@@ -0,0 +1,30 @@
+From matthias@kaehlcke.net Tue Apr 21 22:57:08 2009
+From: Matthias Kaehlcke <matthias@kaehlcke.net>
+Date: Wed, 15 Apr 2009 22:28:36 +0200
+Subject: USB: ci13xxx_udc: fix build error
+To: Greg KH <greg@kroah.com>, dbrownell@users.sourceforge.net
+Message-ID: <20090415202836.GV8693@traven>
+Content-Disposition: inline
+
+
+Fix build error in the MIPS USB IP core family device controller driver.
+The driver calls udelay() without including linux/delay.h
+
+Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/ci13xxx_udc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/gadget/ci13xxx_udc.c
++++ b/drivers/usb/gadget/ci13xxx_udc.c
+@@ -51,6 +51,7 @@
+ * - Gadget API (majority of optional features)
+ * - Suspend & Remote Wakeup
+ */
++#include <linux/delay.h>
+ #include <linux/device.h>
+ #include <linux/dmapool.h>
+ #include <linux/dma-mapping.h>
diff --git a/usb.current/usb-ehci-sched.c-ehci-sitd-scheduling-bugfix.patch b/usb.current/usb-ehci-sched.c-ehci-sitd-scheduling-bugfix.patch
index 844feaa3727af5..1bf017be290caf 100644
--- a/usb.current/usb-ehci-sched.c-ehci-sitd-scheduling-bugfix.patch
+++ b/usb.current/usb-ehci-sched.c-ehci-sitd-scheduling-bugfix.patch
@@ -25,7 +25,7 @@ device, this patch may help.
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Reported-by: Kung James <kong1191@gmail.com>
-Cc: David Brownell <david-b@pacbell.net>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
diff --git a/usb.current/usb-gadget-omap_udc-uses-platform_driver_probe.patch b/usb.current/usb-gadget-omap_udc-uses-platform_driver_probe.patch
new file mode 100644
index 00000000000000..45274cea2672f3
--- /dev/null
+++ b/usb.current/usb-gadget-omap_udc-uses-platform_driver_probe.patch
@@ -0,0 +1,40 @@
+From david-b@pacbell.net Tue Apr 21 22:40:44 2009
+From: David Brownell <david-b@pacbell.net>
+Date: Thu, 16 Apr 2009 13:51:46 -0700
+Subject: USB: gadget: omap_udc uses platform_driver_probe()
+To: Greg KH <greg@kroah.com>
+Cc: "Uwe Kleine-K�nig" <u.kleine-koenig@pengutronix.de>
+Message-ID: <200904161351.46652.david-b@pacbell.net>
+
+
+From: David Brownell <dbrownell@users.sourceforge.net>
+
+We now have a more correct solution for shrinking runtime driver
+footprints than just marking probe() as __init ... use it.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/omap_udc.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/omap_udc.c
++++ b/drivers/usb/gadget/omap_udc.c
+@@ -3104,7 +3104,6 @@ static int omap_udc_resume(struct platfo
+ /*-------------------------------------------------------------------------*/
+
+ static struct platform_driver udc_driver = {
+- .probe = omap_udc_probe,
+ .remove = __exit_p(omap_udc_remove),
+ .suspend = omap_udc_suspend,
+ .resume = omap_udc_resume,
+@@ -3122,7 +3121,7 @@ static int __init udc_init(void)
+ #endif
+ "%s\n", driver_desc,
+ use_dma ? " (dma)" : "");
+- return platform_driver_register(&udc_driver);
++ return platform_driver_probe(&udc_driver, omap_udc_probe);
+ }
+ module_init(udc_init);
+
diff --git a/usb.current/usb-musb-prevent-multiple-includes-of-musb.h.patch b/usb.current/usb-musb-prevent-multiple-includes-of-musb.h.patch
new file mode 100644
index 00000000000000..bd8444dee2f1c1
--- /dev/null
+++ b/usb.current/usb-musb-prevent-multiple-includes-of-musb.h.patch
@@ -0,0 +1,40 @@
+From david-b@pacbell.net Tue Apr 21 22:35:24 2009
+From: Mark A. Greer <mgreer@mvista.com>
+Date: Tue, 21 Apr 2009 20:52:54 -0700
+Subject: USB: musb: Prevent multiple includes of musb.h
+To: Greg KH <greg@kroah.com>
+Cc: "Mark A. Greer" <mgreer@mvista.com>
+Message-ID: <200904212052.54393.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Mark A. Greer <mgreer@mvista.com>
+
+Add #ifndef to musb header file to prevent multiple inclusions.
+
+Signed-off-by: Mark A. Greer <mgreer@mvista.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/usb/musb.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/include/linux/usb/musb.h
++++ b/include/linux/usb/musb.h
+@@ -7,6 +7,9 @@
+ * key configuration differences between boards.
+ */
+
++#ifndef __LINUX_USB_MUSB_H
++#define __LINUX_USB_MUSB_H
++
+ /* The USB role is defined by the connector used on the board, so long as
+ * standards are being followed. (Developer boards sometimes won't.)
+ */
+@@ -101,3 +104,5 @@ extern int __init tusb6010_setup_interfa
+ extern int tusb6010_platform_retime(unsigned is_refclk);
+
+ #endif /* OMAP2 */
++
++#endif /* __LINUX_USB_MUSB_H */
diff --git a/usb.current/usb-serial-sierra-driver-bug-fix-for-composite-interface.patch b/usb.current/usb-serial-sierra-driver-bug-fix-for-composite-interface.patch
new file mode 100644
index 00000000000000..0083a99c856f50
--- /dev/null
+++ b/usb.current/usb-serial-sierra-driver-bug-fix-for-composite-interface.patch
@@ -0,0 +1,73 @@
+From epasheva@sierrawireless.com Tue Apr 21 22:43:03 2009
+From: Elina Pasheva <epasheva@sierrawireless.com>
+Date: Tue, 21 Apr 2009 17:54:42 -0700
+Subject: USB: serial: sierra driver bug fix for composite interface
+To: <gregkh@suse.de>
+Cc: <epasheva@sierrawireless.com>, <rfiler@sierrawireless.com>
+Message-ID: <1240361682.6322.1.camel@Linuxdev3>
+
+From: Elina Pasheva <epasheva@sierrawireless.com>
+
+This patch fixes a problem in sierra_send_setup() function when
+composite devices are used. One should not be sending ACM commands to
+interfaces that are OBEX. Doing this causes an apparent failure as the
+ACM command has to time out before the interface can start being used.
+
+Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/serial/sierra.c | 21 +++++++++++++++++----
+ 1 file changed, 17 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/serial/sierra.c
++++ b/drivers/usb/serial/sierra.c
+@@ -14,7 +14,7 @@
+ Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
+ */
+
+-#define DRIVER_VERSION "v.1.3.2"
++#define DRIVER_VERSION "v.1.3.3"
+ #define DRIVER_AUTHOR "Kevin Lloyd <klloyd@sierrawireless.com>"
+ #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"
+
+@@ -259,9 +259,21 @@ static int sierra_send_setup(struct tty_
+ val |= 0x02;
+
+ /* If composite device then properly report interface */
+- if (serial->num_ports == 1)
++ if (serial->num_ports == 1) {
+ interface = sierra_calc_interface(serial);
+
++ /* Control message is sent only to interfaces with
++ * interrupt_in endpoints
++ */
++ if (port->interrupt_in_urb) {
++ /* send control message */
++ return usb_control_msg(serial->dev,
++ usb_rcvctrlpipe(serial->dev, 0),
++ 0x22, 0x21, val, interface,
++ NULL, 0, USB_CTRL_SET_TIMEOUT);
++ }
++ }
++
+ /* Otherwise the need to do non-composite mapping */
+ else {
+ if (port->bulk_out_endpointAddress == 2)
+@@ -270,12 +282,13 @@ static int sierra_send_setup(struct tty_
+ interface = 1;
+ else if (port->bulk_out_endpointAddress == 5)
+ interface = 2;
+- }
+
+- return usb_control_msg(serial->dev,
++ return usb_control_msg(serial->dev,
+ usb_rcvctrlpipe(serial->dev, 0),
+ 0x22, 0x21, val, interface,
+ NULL, 0, USB_CTRL_SET_TIMEOUT);
++
++ }
+ }
+
+ return 0;
diff --git a/usb/usb-at91_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch b/usb/usb-at91_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
new file mode 100644
index 00000000000000..cc7360bf2d4ad4
--- /dev/null
+++ b/usb/usb-at91_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
@@ -0,0 +1,39 @@
+From matthias@kaehlcke.net Tue Apr 21 22:55:48 2009
+From: Matthias Kaehlcke <matthias@kaehlcke.net>
+Date: Wed, 15 Apr 2009 22:28:02 +0200
+Subject: USB: at91_udc: use helper functions to determine endpoint type and direction
+To: Greg KH <greg@kroah.com>, dbrownell@users.sourceforge.net
+Message-ID: <20090415202802.GP8693@traven>
+
+
+Use helper functions to determine the type and direction of an endpoint
+instead of fiddling with bEndpointAddress and bmAttributes
+
+Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/at91_udc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/at91_udc.c
++++ b/drivers/usb/gadget/at91_udc.c
+@@ -485,7 +485,7 @@ static int at91_ep_enable(struct usb_ep
+ return -ESHUTDOWN;
+ }
+
+- tmp = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
++ tmp = usb_endpoint_type(desc);
+ switch (tmp) {
+ case USB_ENDPOINT_XFER_CONTROL:
+ DBG("only one control endpoint\n");
+@@ -517,7 +517,7 @@ ok:
+ local_irq_save(flags);
+
+ /* initialize endpoint to match this descriptor */
+- ep->is_in = (desc->bEndpointAddress & USB_DIR_IN) != 0;
++ ep->is_in = usb_endpoint_dir_in(desc);
+ ep->is_iso = (tmp == USB_ENDPOINT_XFER_ISOC);
+ ep->stopped = 0;
+ if (ep->is_in)
diff --git a/usb/usb-atmel_usba_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch b/usb/usb-atmel_usba_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
new file mode 100644
index 00000000000000..4fd8c050dca917
--- /dev/null
+++ b/usb/usb-atmel_usba_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
@@ -0,0 +1,37 @@
+From matthias@kaehlcke.net Tue Apr 21 22:54:46 2009
+From: Matthias Kaehlcke <matthias@kaehlcke.net>
+Date: Wed, 15 Apr 2009 22:27:49 +0200
+Subject: USB: atmel_usba_udc: use helper functions to determine endpoint type and direction
+To: hskinnemoen@atmel.com, Greg KH <greg@kroah.com>, dbrownell@users.sourceforge.net
+Message-ID: <20090415202749.GN8693@traven>
+Content-Disposition: inline
+
+Use helper functions to determine the type and direction of an endpoint
+instead of fiddling with bEndpointAddress and bmAttributes
+
+Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/atmel_usba_udc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/atmel_usba_udc.c
++++ b/drivers/usb/gadget/atmel_usba_udc.c
+@@ -550,12 +550,12 @@ usba_ep_enable(struct usb_ep *_ep, const
+ DBG(DBG_HW, "%s: EPT_SIZE = %lu (maxpacket = %lu)\n",
+ ep->ep.name, ept_cfg, maxpacket);
+
+- if ((desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) {
++ if (usb_endpoint_dir_in(desc)) {
+ ep->is_in = 1;
+ ept_cfg |= USBA_EPT_DIR_IN;
+ }
+
+- switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
++ switch (usb_endpoint_type(desc)) {
+ case USB_ENDPOINT_XFER_CONTROL:
+ ept_cfg |= USBA_BF(EPT_TYPE, USBA_EPT_TYPE_CONTROL);
+ ept_cfg |= USBA_BF(BK_NUMBER, USBA_BK_NUMBER_ONE);
diff --git a/usb/usb-ci13xxx_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch b/usb/usb-ci13xxx_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
new file mode 100644
index 00000000000000..1ba473b74faf44
--- /dev/null
+++ b/usb/usb-ci13xxx_udc-use-helper-functions-to-determine-endpoint-type-and-direction.patch
@@ -0,0 +1,34 @@
+From matthias@kaehlcke.net Tue Apr 21 22:53:49 2009
+From: Matthias Kaehlcke <matthias@kaehlcke.net>
+Date: Wed, 15 Apr 2009 22:28:41 +0200
+Subject: USB: ci13xxx_udc: use helper functions to determine endpoint type and direction
+To: Greg KH <greg@kroah.com>, dbrownell@users.sourceforge.net
+Message-ID: <20090415202841.GW8693@traven>
+
+
+Use helper functions to determine the type and direction of an endpoint
+instead of fiddling with bEndpointAddress and bmAttributes
+
+Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/ci13xxx_udc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/gadget/ci13xxx_udc.c
++++ b/drivers/usb/gadget/ci13xxx_udc.c
+@@ -1977,9 +1977,9 @@ static int ep_enable(struct usb_ep *ep,
+ if (!list_empty(&mEp->qh[mEp->dir].queue))
+ warn("enabling a non-empty endpoint!");
+
+- mEp->dir = (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? TX : RX;
+- mEp->num = desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+- mEp->type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
++ mEp->dir = usb_endpoint_dir_in(desc) ? TX : RX;
++ mEp->num = usb_endpoint_num(desc);
++ mEp->type = usb_endpoint_type(desc);
+
+ mEp->ep.maxpacket = __constant_le16_to_cpu(desc->wMaxPacketSize);
+
diff --git a/usb/usb-core-sysfs-fix-sparse-warnings.patch b/usb/usb-core-sysfs-fix-sparse-warnings.patch
new file mode 100644
index 00000000000000..7fc34a0699fc42
--- /dev/null
+++ b/usb/usb-core-sysfs-fix-sparse-warnings.patch
@@ -0,0 +1,53 @@
+From linux-kernel-owner+greg=40kroah.com-S1751362AbZDPBfD@vger.kernel.org Tue Apr 21 22:45:49 2009
+From: "H Hartley Sweeten" <hartleys@visionengravers.com>
+Date: Wed, 15 Apr 2009 21:34:40 -0400
+Subject: USB: core/sysfs: fix sparse warnings
+Message-ID: <BD79186B4FD85F4B8E60E381CAEE1909015F8DF8@mi8nycmail19.Mi8.com>
+
+
+Fix 3 sparse warning in drivers/usb/core/sysfs.c.
+
+ warning: symbol '__mptr' shadows an earlier one
+
+Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/sysfs.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/core/sysfs.c
++++ b/drivers/usb/core/sysfs.c
+@@ -552,8 +552,8 @@ static struct attribute *dev_string_attr
+ static mode_t dev_string_attrs_are_visible(struct kobject *kobj,
+ struct attribute *a, int n)
+ {
+- struct usb_device *udev = to_usb_device(
+- container_of(kobj, struct device, kobj));
++ struct device *dev = container_of(kobj, struct device, kobj);
++ struct usb_device *udev = to_usb_device(dev);
+
+ if (a == &dev_attr_manufacturer.attr) {
+ if (udev->manufacturer == NULL)
+@@ -585,8 +585,8 @@ static ssize_t
+ read_descriptors(struct kobject *kobj, struct bin_attribute *attr,
+ char *buf, loff_t off, size_t count)
+ {
+- struct usb_device *udev = to_usb_device(
+- container_of(kobj, struct device, kobj));
++ struct device *dev = container_of(kobj, struct device, kobj);
++ struct usb_device *udev = to_usb_device(dev);
+ size_t nleft = count;
+ size_t srclen, n;
+ int cfgno;
+@@ -786,8 +786,8 @@ static struct attribute *intf_assoc_attr
+ static mode_t intf_assoc_attrs_are_visible(struct kobject *kobj,
+ struct attribute *a, int n)
+ {
+- struct usb_interface *intf = to_usb_interface(
+- container_of(kobj, struct device, kobj));
++ struct device *dev = container_of(kobj, struct device, kobj);
++ struct usb_interface *intf = to_usb_interface(dev);
+
+ if (intf->intf_assoc == NULL)
+ return 0;
diff --git a/usb/usb-gadgetfs-use-helper-functions-to-determine-endpoint-type-and-direction.patch b/usb/usb-gadgetfs-use-helper-functions-to-determine-endpoint-type-and-direction.patch
new file mode 100644
index 00000000000000..51754e27b0a5a7
--- /dev/null
+++ b/usb/usb-gadgetfs-use-helper-functions-to-determine-endpoint-type-and-direction.patch
@@ -0,0 +1,63 @@
+From matthias@kaehlcke.net Tue Apr 21 22:57:27 2009
+From: Matthias Kaehlcke <matthias@kaehlcke.net>
+Date: Wed, 15 Apr 2009 22:28:32 +0200
+Subject: USB: gadgetfs: use helper functions to determine endpoint type and direction
+To: Greg KH <greg@kroah.com>, dbrownell@users.sourceforge.net
+Message-ID: <20090415202832.GU8693@traven>
+
+
+Use helper functions to determine the type and direction of an endpoint
+instead of fiddling with bEndpointAddress and bmAttributes
+
+Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/inode.c | 14 ++++++--------
+ 1 file changed, 6 insertions(+), 8 deletions(-)
+
+--- a/drivers/usb/gadget/inode.c
++++ b/drivers/usb/gadget/inode.c
+@@ -384,9 +384,8 @@ ep_read (struct file *fd, char __user *b
+ return value;
+
+ /* halt any endpoint by doing a "wrong direction" i/o call */
+- if (data->desc.bEndpointAddress & USB_DIR_IN) {
+- if ((data->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+- == USB_ENDPOINT_XFER_ISOC)
++ if (usb_endpoint_dir_in(&data->desc)) {
++ if (usb_endpoint_xfer_isoc(&data->desc))
+ return -EINVAL;
+ DBG (data->dev, "%s halt\n", data->name);
+ spin_lock_irq (&data->dev->lock);
+@@ -428,9 +427,8 @@ ep_write (struct file *fd, const char __
+ return value;
+
+ /* halt any endpoint by doing a "wrong direction" i/o call */
+- if (!(data->desc.bEndpointAddress & USB_DIR_IN)) {
+- if ((data->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+- == USB_ENDPOINT_XFER_ISOC)
++ if (usb_endpoint_dir_in(&data->desc)) {
++ if (usb_endpoint_xfer_isoc(&data->desc))
+ return -EINVAL;
+ DBG (data->dev, "%s halt\n", data->name);
+ spin_lock_irq (&data->dev->lock);
+@@ -691,7 +689,7 @@ ep_aio_read(struct kiocb *iocb, const st
+ struct ep_data *epdata = iocb->ki_filp->private_data;
+ char *buf;
+
+- if (unlikely(epdata->desc.bEndpointAddress & USB_DIR_IN))
++ if (unlikely(usb_endpoint_dir_in(&epdata->desc)))
+ return -EINVAL;
+
+ buf = kmalloc(iocb->ki_left, GFP_KERNEL);
+@@ -711,7 +709,7 @@ ep_aio_write(struct kiocb *iocb, const s
+ size_t len = 0;
+ int i = 0;
+
+- if (unlikely(!(epdata->desc.bEndpointAddress & USB_DIR_IN)))
++ if (unlikely(!usb_endpoint_dir_in(&epdata->desc)))
+ return -EINVAL;
+
+ buf = kmalloc(iocb->ki_left, GFP_KERNEL);
diff --git a/usb/usb-goku-s-use-helper-functions-to-determine-endpoint-type-and-direction.patch b/usb/usb-goku-s-use-helper-functions-to-determine-endpoint-type-and-direction.patch
new file mode 100644
index 00000000000000..c8e1b99c9c1d95
--- /dev/null
+++ b/usb/usb-goku-s-use-helper-functions-to-determine-endpoint-type-and-direction.patch
@@ -0,0 +1,43 @@
+From matthias@kaehlcke.net Tue Apr 21 22:56:47 2009
+From: Matthias Kaehlcke <matthias@kaehlcke.net>
+Date: Wed, 15 Apr 2009 22:28:21 +0200
+Subject: USB: Goku-S: use helper functions to determine endpoint type and direction
+To: Greg KH <greg@kroah.com>, dbrownell@users.sourceforge.net
+Message-ID: <20090415202821.GS8693@traven>
+Content-Disposition: inline
+
+Use helper functions to determine the type and direction of an endpoint
+instead of fiddling with bEndpointAddress and bmAttributes
+
+Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/goku_udc.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/gadget/goku_udc.c
++++ b/drivers/usb/gadget/goku_udc.c
+@@ -110,10 +110,10 @@ goku_ep_enable(struct usb_ep *_ep, const
+ return -EINVAL;
+ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
+ return -ESHUTDOWN;
+- if (ep->num != (desc->bEndpointAddress & 0x0f))
++ if (ep->num != usb_endpoint_num(desc))
+ return -EINVAL;
+
+- switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
++ switch (usb_endpoint_type(desc)) {
+ case USB_ENDPOINT_XFER_BULK:
+ case USB_ENDPOINT_XFER_INT:
+ break;
+@@ -142,7 +142,7 @@ goku_ep_enable(struct usb_ep *_ep, const
+ /* ep1/ep2 dma direction is chosen early; it works in the other
+ * direction, with pio. be cautious with out-dma.
+ */
+- ep->is_in = (USB_DIR_IN & desc->bEndpointAddress) != 0;
++ ep->is_in = usb_endpoint_dir_in(desc);
+ if (ep->is_in) {
+ mode |= 1;
+ ep->dma = (use_dma != 0) && (ep->num == UDC_MSTRD_ENDPOINT);
diff --git a/usb/usb-ignore-storage-device-in-modem-mode-on-dwn-652.patch b/usb/usb-ignore-storage-device-in-modem-mode-on-dwn-652.patch
new file mode 100644
index 00000000000000..e885e553a22ad0
--- /dev/null
+++ b/usb/usb-ignore-storage-device-in-modem-mode-on-dwn-652.patch
@@ -0,0 +1,87 @@
+From pterjan@mandriva.com Tue Apr 21 22:40:02 2009
+From: Pascal Terjan <pterjan@mandriva.com>
+Date: Thu, 16 Apr 2009 19:00:45 +0200
+Subject: USB: Ignore storage device in modem mode on DWN-652
+To: Greg KH <greg@kroah.com>
+Message-ID: <1239901245.6660.17.camel@plop>
+
+
+D-Link DWN-652 in Modem mode exposes 3 interfaces
+- First one is the USB storage one
+- Second one is for both control and connection
+- Third one is unknown
+
+This patch avoids usb-storage trying to switch again when already in
+modem mode, and exposes only 2 ttyUSB instead of 3 by not attaching
+to the storage interface
+
+Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/option.c | 15 +++++++++++++++
+ drivers/usb/storage/option_ms.c | 3 ++-
+ drivers/usb/storage/unusual_devs.h | 2 +-
+ 3 files changed, 18 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -43,6 +43,8 @@
+ #include <linux/usb/serial.h>
+
+ /* Function prototypes */
++static int option_probe(struct usb_serial *serial,
++ const struct usb_device_id *id);
+ static int option_open(struct tty_struct *tty, struct usb_serial_port *port,
+ struct file *filp);
+ static void option_close(struct tty_struct *tty, struct usb_serial_port *port,
+@@ -549,6 +551,7 @@ static struct usb_serial_driver option_1
+ .usb_driver = &option_driver,
+ .id_table = option_ids,
+ .num_ports = 1,
++ .probe = option_probe,
+ .open = option_open,
+ .close = option_close,
+ .write = option_write,
+@@ -624,6 +627,18 @@ static void __exit option_exit(void)
+ module_init(option_init);
+ module_exit(option_exit);
+
++static int option_probe(struct usb_serial *serial,
++ const struct usb_device_id *id)
++{
++ /* D-Link DWM 652 still exposes CD-Rom emulation interface in modem mode */
++ if (serial->dev->descriptor.idVendor == DLINK_VENDOR_ID &&
++ serial->dev->descriptor.idProduct == DLINK_PRODUCT_DWM_652 &&
++ serial->interface->cur_altsetting->desc.bInterfaceClass == 0x8)
++ return -ENODEV;
++
++ return 0;
++}
++
+ static void option_set_termios(struct tty_struct *tty,
+ struct usb_serial_port *port, struct ktermios *old_termios)
+ {
+--- a/drivers/usb/storage/option_ms.c
++++ b/drivers/usb/storage/option_ms.c
+@@ -94,7 +94,8 @@ int option_ms_init(struct us_data *us)
+ */
+ if (udev->descriptor.bDeviceClass != 0 ||
+ udev->descriptor.bDeviceSubClass != 0 ||
+- udev->descriptor.bDeviceProtocol != 0)
++ udev->descriptor.bDeviceProtocol != 0 ||
++ udev->actconfig->desc.bNumInterfaces == 3)
+ return USB_STOR_TRANSPORT_GOOD;
+
+ US_DEBUGP("Option MS: option_ms_init called\n");
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -1384,7 +1384,7 @@ UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x
+ UNUSUAL_DEV( 0x1186, 0x3e04, 0x0000, 0x0000,
+ "D-Link",
+ "USB Mass Storage",
+- US_SC_DEVICE, US_PR_DEVICE, option_ms_init, 0),
++ US_SC_DEVICE, US_PR_DEVICE, option_ms_init, US_FL_IGNORE_DEVICE),
+
+ /* Reported by Kevin Lloyd <linux@sierrawireless.com>
+ * Entry is needed for the initializer function override,
diff --git a/usb/usb-uhci-queue-use-usb_endpoint_type.patch b/usb/usb-uhci-queue-use-usb_endpoint_type.patch
new file mode 100644
index 00000000000000..441d0bc6e9bc63
--- /dev/null
+++ b/usb/usb-uhci-queue-use-usb_endpoint_type.patch
@@ -0,0 +1,29 @@
+From matthias@kaehlcke.net Tue Apr 21 22:57:49 2009
+From: Matthias Kaehlcke <matthias@kaehlcke.net>
+Date: Wed, 15 Apr 2009 22:28:28 +0200
+Subject: USB: UHCI queue: use usb_endpoint_type()
+To: Greg KH <greg@kroah.com>, stern@rowland.harvard.edu
+Message-ID: <20090415202828.GT8693@traven>
+
+
+use usb_endpoint_type() instead of fiddling manually with bmAttributes
+
+Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/uhci-q.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/uhci-q.c
++++ b/drivers/usb/host/uhci-q.c
+@@ -260,7 +260,7 @@ static struct uhci_qh *uhci_alloc_qh(str
+ INIT_LIST_HEAD(&qh->node);
+
+ if (udev) { /* Normal QH */
+- qh->type = hep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
++ qh->type = usb_endpoint_type(&hep->desc);
+ if (qh->type != USB_ENDPOINT_XFER_ISOC) {
+ qh->dummy_td = uhci_alloc_td(uhci);
+ if (!qh->dummy_td) {
diff --git a/usb/usb-usbfs-deprecate-and-hide-option-for-embedded.patch b/usb/usb-usbfs-deprecate-and-hide-option-for-embedded.patch
new file mode 100644
index 00000000000000..1010d10652c6f2
--- /dev/null
+++ b/usb/usb-usbfs-deprecate-and-hide-option-for-embedded.patch
@@ -0,0 +1,59 @@
+From linux-usb-owner@vger.kernel.org Tue Apr 21 22:36:15 2009
+From: Scott James Remnant <scott@canonical.com>
+Date: Tue, 21 Apr 2009 17:21:40 +0100
+Subject: USB: usbfs: deprecate and hide option for !embedded
+To: gregkh@suse.de
+Cc: Kay Sievers <kay.sievers@vrfy.org>
+Message-ID: <E1LwIw0-0000re-41@zelda.netsplit.com>
+
+
+Modern systems do not use usbfs; the entries within it are files,
+not device nodes, and do not support ACLs which are the default way to
+provide access to USB devices to untrusted users.
+
+It is replaced by device-nodes maintained by udev in /dev/bus/usb,
+libusb uses this device nodes.
+
+Mark the option as deprecated, and hide entirely for non-embedded builds
+(which may not be using udev but require raw USB device access).
+
+Signed-off-by: Scott James Remnant <scott@canonical.com>
+Acked-by: Kay Sievers <kay.sievers@vrfy.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/Kconfig | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/core/Kconfig
++++ b/drivers/usb/core/Kconfig
+@@ -28,7 +28,7 @@ comment "Miscellaneous USB options"
+ depends on USB
+
+ config USB_DEVICEFS
+- bool "USB device filesystem"
++ bool "USB device filesystem (DEPRECATED)" if EMBEDDED
+ depends on USB
+ ---help---
+ If you say Y here (and to "/proc file system support" in the "File
+@@ -46,11 +46,15 @@ config USB_DEVICEFS
+ For the format of the various /proc/bus/usb/ files, please read
+ <file:Documentation/usb/proc_usb_info.txt>.
+
+- Usbfs files can't handle Access Control Lists (ACL), which are the
+- default way to grant access to USB devices for untrusted users of a
+- desktop system. The usbfs functionality is replaced by real
+- device-nodes managed by udev. These nodes live in /dev/bus/usb and
+- are used by libusb.
++ Modern Linux systems do not use this.
++
++ Usbfs entries are files and not character devices; usbfs can't
++ handle Access Control Lists (ACL) which are the default way to
++ grant access to USB devices for untrusted users of a desktop
++ system.
++
++ The usbfs functionality is replaced by real device-nodes managed by
++ udev. These nodes lived in /dev/bus/usb and are used by libusb.
+
+ config USB_DEVICE_CLASS
+ bool "USB device class-devices (DEPRECATED)"
diff --git a/version b/version
index d324aac65d18d3..45c9f03b4d45c3 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.6.30-rc2-git7
+2.6.30-rc3