aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-09-01 13:24:40 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-01 13:24:40 -0700
commit9c19ffe7b6129ad4babb0762c3b342d02679b9ce (patch)
treefabf5ca6c5a1001150ed360aaa33855f49397bc7
parent8a26eb4b4e0e04efc8676c3317d997e175851e33 (diff)
downloadpatches-9c19ffe7b6129ad4babb0762c3b342d02679b9ce.tar.gz
lots more
-rw-r--r--driver-core.current/sysfs-checking-for-null-instead-of-err_ptr.patch34
-rw-r--r--driver-core/uio-do-not-use-pci-resources-before-pci_enable_device.patch72
-rw-r--r--series48
-rw-r--r--tty.current/maintainers-orphan-isicom.patch30
-rw-r--r--tty.current/serial-bfin_sport_uart-restore-transmit-frame-sync-fix.patch37
-rw-r--r--tty.current/serial-fix-port-type-conflict-between-ns16550a-u6_16550a.patch45
-rw-r--r--tty.current/vt-fix-console-corruption-on-driver-hand-over.patch79
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-arm120
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-avr32121
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-cris141
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-frv122
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-h8300120
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-ia64126
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-m32r120
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-m68k121
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-mn10300122
-rw-r--r--tty/ioctl-use-asm-generic-ioctls-h-on-s390129
-rw-r--r--tty/serial-add-console_poll-support-for-uartlite.patch64
-rw-r--r--tty/serial-mfd-snprintf-returns-largish-values.patch45
-rw-r--r--tty/serport-place-serport-serio-device-correctly-in-the-device-tree.patch30
-rw-r--r--tty/tty-add-tty_struct-dev-pointer-to-corresponding-device-instance.patch73
-rw-r--r--tty/tty-remove-__gfp_nofail-from-tty_add_file.patch92
-rw-r--r--tty/vt-use-pit_tick_rate-in-vt-beep-ioctl.patch78
-rw-r--r--usb.current/usb-allow-drivers-to-use-allocated-bandwidth-until-unbound.patch91
-rw-r--r--usb.current/usb-cp210x-add-b-g-h3000-link-cable-id.patch29
-rw-r--r--usb.current/usb-cp210x-add-new-device-id.patch47
-rw-r--r--usb.current/usb-cp210x-usb-driver-add-usb_device-for-pirelli-dp-l10-mobile.patch75
-rw-r--r--usb.current/usb-ehci-ppc-of-problems-in-unwind.patch60
-rw-r--r--usb.current/usb-fix-kernel-oops-with-g_ether-and-windows.patch42
-rw-r--r--usb.current/usb-option-fix-incorrect-novatel-entries.patch172
-rw-r--r--usb.current/usb-rndis-section-mismatch-fix.patch49
-rw-r--r--usb.current/usb-s3c-hsotg-remove-debug-define.patch29
-rw-r--r--usb.current/usb-ssu100-turn-off-debug-flag.patch27
-rw-r--r--usb/usb-core-update-comment-to-match-current-function-name.patch28
-rw-r--r--usb/usb-gadget-dbgp-cleanup-remove-unneeded-check.patch48
-rw-r--r--usb/usb-gadget-verify-vbus-current-before-setting-the-device-self-powered-bit.patch59
-rw-r--r--usb/usb-sam-ba-add-driver-for-atmel-sam-boot-assistant-sam-ba.patch265
37 files changed, 2984 insertions, 6 deletions
diff --git a/driver-core.current/sysfs-checking-for-null-instead-of-err_ptr.patch b/driver-core.current/sysfs-checking-for-null-instead-of-err_ptr.patch
new file mode 100644
index 00000000000000..503906c9f7f951
--- /dev/null
+++ b/driver-core.current/sysfs-checking-for-null-instead-of-err_ptr.patch
@@ -0,0 +1,34 @@
+From error27@gmail.com Wed Sep 1 12:49:11 2010
+Date: Wed, 25 Aug 2010 09:12:29 +0200
+From: Dan Carpenter <error27@gmail.com>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
+ Serge Hallyn <serue@us.ibm.com>,
+ Stephen Hemminger <shemminger@vyatta.com>,
+ linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
+Subject: sysfs: checking for NULL instead of ERR_PTR
+Message-ID: <20100825071229.GP29330@bicker>
+Content-Disposition: inline
+
+d_path() returns an ERR_PTR and it doesn't return NULL.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Cc: stable <stable@kernel.org>
+Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/sysfs/file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/sysfs/file.c
++++ b/fs/sysfs/file.c
+@@ -340,7 +340,7 @@ static int sysfs_open_file(struct inode
+ char *p;
+
+ p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file));
+- if (p)
++ if (!IS_ERR(p))
+ memmove(last_sysfs_file, p, strlen(p) + 1);
+
+ /* need attr_sd for attr and ops, its parent for kobj */
diff --git a/driver-core/uio-do-not-use-pci-resources-before-pci_enable_device.patch b/driver-core/uio-do-not-use-pci-resources-before-pci_enable_device.patch
new file mode 100644
index 00000000000000..ad5c6b1c68e657
--- /dev/null
+++ b/driver-core/uio-do-not-use-pci-resources-before-pci_enable_device.patch
@@ -0,0 +1,72 @@
+From segooon@gmail.com Wed Sep 1 12:34:29 2010
+From: Kulikov Vasiliy <segooon@gmail.com>
+To: kernel-janitors@vger.kernel.org
+Cc: "Michael S. Tsirkin" <mst@redhat.com>,
+ "Hans J. Koch" <hjk@linutronix.de>,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Jesse Barnes <jbarnes@virtuousgeek.org>, Tejun Heo <tj@kernel.org>,
+ kvm@vger.kernel.org, linux-kernel@vger.kernel.org
+Subject: uio: do not use PCI resources before pci_enable_device()
+Date: Tue, 3 Aug 2010 19:44:23 +0400
+Message-Id: <1280850264-6258-1-git-send-email-segooon@gmail.com>
+
+IRQ and resource[] may not have correct values until
+after PCI hotplug setup occurs at pci_enable_device() time.
+
+The semantic match that finds this problem is as follows:
+
+// <smpl>
+@@
+identifier x;
+identifier request ~= "pci_request.*|pci_resource.*";
+@@
+
+(
+* x->irq
+|
+* x->resource
+|
+* request(x, ...)
+)
+ ...
+*pci_enable_device(x)
+// </smpl>
+
+Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
+Acked-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: Hans J. Koch <hjk@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/uio/uio_pci_generic.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+--- a/drivers/uio/uio_pci_generic.c
++++ b/drivers/uio/uio_pci_generic.c
+@@ -128,12 +128,6 @@ static int __devinit probe(struct pci_de
+ struct uio_pci_generic_dev *gdev;
+ int err;
+
+- if (!pdev->irq) {
+- dev_warn(&pdev->dev, "No IRQ assigned to device: "
+- "no support for interrupts?\n");
+- return -ENODEV;
+- }
+-
+ err = pci_enable_device(pdev);
+ if (err) {
+ dev_err(&pdev->dev, "%s: pci_enable_device failed: %d\n",
+@@ -141,6 +135,13 @@ static int __devinit probe(struct pci_de
+ return err;
+ }
+
++ if (!pdev->irq) {
++ dev_warn(&pdev->dev, "No IRQ assigned to device: "
++ "no support for interrupts?\n");
++ pci_disable_device(pdev);
++ return -ENODEV;
++ }
++
+ err = verify_pci_2_3(pdev);
+ if (err)
+ goto err_verify;
diff --git a/series b/series
index f159f9dafcae41..f619bcd43ba292 100644
--- a/series
+++ b/series
@@ -8,19 +8,30 @@ gregkh/gkh-version.patch
#################################
# Driver core patches for 2.6.36
#################################
-driver-core/dynamic-debug-split-out-query-string-parsing-setup-from-proc_write.patch
-driver-core/dynamic-debug-introduce-ddebug_query-boot-parameter.patch
-driver-core/dynamic-debug-initialize-dynamic-debug-earlier-via-arch_initcall.patch
-driver-core/dynamic-debug-introduce-global-fake-module-param-module.ddebug.patch
-driver-core/driver-core-platform-use-drv-driver.bus-instead-of-assuming-platform_bus_type.patch
+driver-core.current/sysfs-checking-for-null-instead-of-err_ptr.patch
#################################
# TTY patches for 2.6.36
#################################
+tty.current/vt-fix-console-corruption-on-driver-hand-over.patch
+tty.current/maintainers-orphan-isicom.patch
+tty.current/serial-fix-port-type-conflict-between-ns16550a-u6_16550a.patch
+tty.current/serial-bfin_sport_uart-restore-transmit-frame-sync-fix.patch
+
#################################
# USB patches for 2.6.36
#################################
+usb.current/usb-s3c-hsotg-remove-debug-define.patch
+usb.current/usb-ehci-ppc-of-problems-in-unwind.patch
+usb.current/usb-rndis-section-mismatch-fix.patch
+usb.current/usb-fix-kernel-oops-with-g_ether-and-windows.patch
+usb.current/usb-option-fix-incorrect-novatel-entries.patch
+usb.current/usb-cp210x-add-new-device-id.patch
+usb.current/usb-cp210x-add-b-g-h3000-link-cable-id.patch
+usb.current/usb-cp210x-usb-driver-add-usb_device-for-pirelli-dp-l10-mobile.patch
+usb.current/usb-allow-drivers-to-use-allocated-bandwidth-until-unbound.patch
+usb.current/usb-ssu100-turn-off-debug-flag.patch
#################################
@@ -46,6 +57,12 @@ staging.current/staging-wlan-ng-explicitly-set-some-fields-in-cfg80211-interface
#############################################
# Driver core patches for after 2.6.36 is out
#############################################
+driver-core/dynamic-debug-split-out-query-string-parsing-setup-from-proc_write.patch
+driver-core/dynamic-debug-introduce-ddebug_query-boot-parameter.patch
+driver-core/dynamic-debug-initialize-dynamic-debug-earlier-via-arch_initcall.patch
+driver-core/dynamic-debug-introduce-global-fake-module-param-module.ddebug.patch
+driver-core/driver-core-platform-use-drv-driver.bus-instead-of-assuming-platform_bus_type.patch
+driver-core/uio-do-not-use-pci-resources-before-pci_enable_device.patch
# can we really drop it? (nope, not yet...)
#driver-core/driver-core-remove-config_sysfs_deprecated.patch
@@ -53,6 +70,22 @@ staging.current/staging-wlan-ng-explicitly-set-some-fields-in-cfg80211-interface
#####################################
# TTY patches for after 2.6.36 is out
#####################################
+tty/tty-add-tty_struct-dev-pointer-to-corresponding-device-instance.patch
+tty/serport-place-serport-serio-device-correctly-in-the-device-tree.patch
+tty/serial-mfd-snprintf-returns-largish-values.patch
+tty/serial-add-console_poll-support-for-uartlite.patch
+tty/tty-remove-__gfp_nofail-from-tty_add_file.patch
+tty/vt-use-pit_tick_rate-in-vt-beep-ioctl.patch
+tty/ioctl-use-asm-generic-ioctls-h-on-arm
+tty/ioctl-use-asm-generic-ioctls-h-on-avr32
+tty/ioctl-use-asm-generic-ioctls-h-on-cris
+tty/ioctl-use-asm-generic-ioctls-h-on-frv
+tty/ioctl-use-asm-generic-ioctls-h-on-h8300
+tty/ioctl-use-asm-generic-ioctls-h-on-ia64
+tty/ioctl-use-asm-generic-ioctls-h-on-m32r
+tty/ioctl-use-asm-generic-ioctls-h-on-m68k
+tty/ioctl-use-asm-generic-ioctls-h-on-mn10300
+tty/ioctl-use-asm-generic-ioctls-h-on-s390
###################################
@@ -64,9 +97,12 @@ usb/usb-langwell-usb-client-endpoint-initialization.patch
usb/usb-langwell-usb-client-phy-low-power-mode-setting.patch
usb/usb-langwell-usb-client-remote-wakeup-support.patch
usb/usb-langwell-usb-client-driver-memory-handling.patch
+usb/usb-gadget-dbgp-cleanup-remove-unneeded-check.patch
+usb/usb-sam-ba-add-driver-for-atmel-sam-boot-assistant-sam-ba.patch
+usb/usb-gadget-verify-vbus-current-before-setting-the-device-self-powered-bit.patch
+usb/usb-core-update-comment-to-match-current-function-name.patch
# staging stuff for next is now in the staging-next tree on git.kernel.org
-
diff --git a/tty.current/maintainers-orphan-isicom.patch b/tty.current/maintainers-orphan-isicom.patch
new file mode 100644
index 00000000000000..c8e416d42dd640
--- /dev/null
+++ b/tty.current/maintainers-orphan-isicom.patch
@@ -0,0 +1,30 @@
+From jirislaby@gmail.com Wed Sep 1 12:57:23 2010
+From: Jiri Slaby <jslaby@suse.cz>
+To: gregkh@suse.de
+Cc: linux-kernel@vger.kernel.org, jirislaby@gmail.com,
+ joe@perches.com
+Subject: MAINTAINERS: orphan isicom
+Date: Tue, 31 Aug 2010 17:08:52 +0200
+Message-Id: <1283267332-20879-1-git-send-email-jslaby@suse.cz>
+
+I do not maintain isicom anymore...
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ MAINTAINERS | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -3923,8 +3923,7 @@ F: Documentation/sound/oss/MultiSound
+ F: sound/oss/msnd*
+
+ MULTITECH MULTIPORT CARD (ISICOM)
+-M: Jiri Slaby <jirislaby@gmail.com>
+-S: Maintained
++S: Orphan
+ F: drivers/char/isicom.c
+ F: include/linux/isicom.h
+
diff --git a/tty.current/serial-bfin_sport_uart-restore-transmit-frame-sync-fix.patch b/tty.current/serial-bfin_sport_uart-restore-transmit-frame-sync-fix.patch
new file mode 100644
index 00000000000000..41156e15e89731
--- /dev/null
+++ b/tty.current/serial-bfin_sport_uart-restore-transmit-frame-sync-fix.patch
@@ -0,0 +1,37 @@
+From vapier@gentoo.org Wed Sep 1 13:01:10 2010
+From: Sonic Zhang <sonic.zhang@analog.com>
+To: linux-serial@vger.kernel.org,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Alan Cox <alan@lxorguk.ukuu.org.uk>
+Cc: uclinux-dist-devel@blackfin.uclinux.org,
+ linux-kernel@vger.kernel.org, Sonic Zhang <sonic.zhang@analog.com>
+Subject: serial: bfin_sport_uart: restore transmit frame sync fix
+Date: Sat, 28 Aug 2010 16:32:55 -0400
+Message-Id: <1283027575-1686-1-git-send-email-vapier@gentoo.org>
+
+From: Sonic Zhang <sonic.zhang@analog.com>
+
+The large cleanup/rewrite of resources in commit ccf68e59e93181df9353c0cc
+accidentally reverted an earlier fix in commit a19e8b205915b2925aca75b.
+So restore it here.
+
+Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Cc: stable <stable@kernel.org> [.34 and newer]
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/bfin_sport_uart.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/serial/bfin_sport_uart.c
++++ b/drivers/serial/bfin_sport_uart.c
+@@ -121,7 +121,7 @@ static int sport_uart_setup(struct sport
+ unsigned int sclk = get_sclk();
+
+ /* Set TCR1 and TCR2, TFSR is not enabled for uart */
+- SPORT_PUT_TCR1(up, (ITFS | TLSBIT | ITCLK));
++ SPORT_PUT_TCR1(up, (LATFS | ITFS | TFSR | TLSBIT | ITCLK));
+ SPORT_PUT_TCR2(up, size + 1);
+ pr_debug("%s TCR1:%x, TCR2:%x\n", __func__, SPORT_GET_TCR1(up), SPORT_GET_TCR2(up));
+
diff --git a/tty.current/serial-fix-port-type-conflict-between-ns16550a-u6_16550a.patch b/tty.current/serial-fix-port-type-conflict-between-ns16550a-u6_16550a.patch
new file mode 100644
index 00000000000000..dac19b6c8c3f07
--- /dev/null
+++ b/tty.current/serial-fix-port-type-conflict-between-ns16550a-u6_16550a.patch
@@ -0,0 +1,45 @@
+From philippe.langlais@stericsson.com Wed Sep 1 12:57:48 2010
+From: Philippe Langlais <philippe.langlais@stericsson.com>
+To: <gregkh@suse.de>
+Cc: <linux@treblig.org>, <STEricsson_nomadik_linux@list.st.com>,
+ <loic.pallardy@stericsson.com>, <vincent.guittot@stericsson.com>,
+ Philippe Langlais <philippe.langlais@stericsson.com>
+Subject: serial: fix port type conflict between NS16550A & U6_16550A
+Date: Tue, 31 Aug 2010 14:19:09 +0200
+Message-ID: <1283257149-3370-1-git-send-email-philippe.langlais@stericsson.com>
+
+Bug seen by Dr. David Alan Gilbert with sparse
+
+Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/serial.h | 3 +--
+ include/linux/serial_core.h | 3 ++-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/include/linux/serial.h
++++ b/include/linux/serial.h
+@@ -77,8 +77,7 @@ struct serial_struct {
+ #define PORT_16654 11
+ #define PORT_16850 12
+ #define PORT_RSA 13 /* RSA-DV II/S card */
+-#define PORT_U6_16550A 14
+-#define PORT_MAX 14
++#define PORT_MAX 13
+
+ #define SERIAL_IO_PORT 0
+ #define SERIAL_IO_HUB6 1
+--- a/include/linux/serial_core.h
++++ b/include/linux/serial_core.h
+@@ -44,7 +44,8 @@
+ #define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
+ #define PORT_OCTEON 17 /* Cavium OCTEON internal UART */
+ #define PORT_AR7 18 /* Texas Instruments AR7 internal UART */
+-#define PORT_MAX_8250 18 /* max port ID */
++#define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */
++#define PORT_MAX_8250 19 /* max port ID */
+
+ /*
+ * ARM specific type numbers. These are not currently guaranteed
diff --git a/tty.current/vt-fix-console-corruption-on-driver-hand-over.patch b/tty.current/vt-fix-console-corruption-on-driver-hand-over.patch
new file mode 100644
index 00000000000000..ce1dbd4b9e6f7f
--- /dev/null
+++ b/tty.current/vt-fix-console-corruption-on-driver-hand-over.patch
@@ -0,0 +1,79 @@
+From currojerez@riseup.net Wed Sep 1 12:47:54 2010
+From: Francisco Jerez <currojerez@riseup.net>
+To: linux-kernel@vger.kernel.org
+Cc: qiaochong <qiaochong@loongson.cn>,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Andrew Morton <akpm@linux-foundation.org>,
+ Alan Cox <alan@linux.intel.com>
+Subject: vt: Fix console corruption on driver hand-over.
+Date: Sun, 22 Aug 2010 17:37:24 +0200
+Message-Id: <1282491444-25364-1-git-send-email-currojerez@riseup.net>
+
+After 02f0777a0d6560eb995aade34a1b82f95c0452da "vc_origin" is no
+longer reset to the screen buffer before calling the con_init() hook
+of the new console driver.
+
+If the old driver wasn't using a fixed scanout buffer (e.g. the case
+of vgacon) "vc_origin" may be a pointer to a VRAM location, and its
+contents aren't guaranteed to be preserved after calling con_deinit()
+on the old driver and con_init() on the new driver, i.e. the
+subsequent console resize may fill the framebuffer with garbage.
+
+It can be reproduced in the transition from vgacon to the nouveau
+framebuffer driver: in that case the legacy VGA aperture "vc_origin"
+points to becomes unreadable after fbcon_init().
+
+This patch reverts the mentioned commit. To avoid the problem it
+intended to fix, stop using "vc_scr_end" in vc_do_resize() to
+calculate how many rows we have to copy (actually the code looks
+simpler this way without the help of "vc_scr_end").
+
+Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+Cc: qiaochong <qiaochong@loongson.cn>
+Cc: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/vt.c | 15 ++++-----------
+ 1 file changed, 4 insertions(+), 11 deletions(-)
+
+--- a/drivers/char/vt.c
++++ b/drivers/char/vt.c
+@@ -906,22 +906,16 @@ static int vc_do_resize(struct tty_struc
+ * bottom of buffer
+ */
+ old_origin += (old_rows - new_rows) * old_row_size;
+- end = vc->vc_scr_end;
+ } else {
+ /*
+ * Cursor is in no man's land, copy 1/2 screenful
+ * from the top and bottom of cursor position
+ */
+ old_origin += (vc->vc_y - new_rows/2) * old_row_size;
+- end = old_origin + (old_row_size * new_rows);
+ }
+- } else
+- /*
+- * Cursor near the top, copy contents from the top of buffer
+- */
+- end = (old_rows > new_rows) ? old_origin +
+- (old_row_size * new_rows) :
+- vc->vc_scr_end;
++ }
++
++ end = old_origin + old_row_size * min(old_rows, new_rows);
+
+ update_attr(vc);
+
+@@ -3075,8 +3069,7 @@ static int bind_con_driver(const struct
+
+ old_was_color = vc->vc_can_do_color;
+ vc->vc_sw->con_deinit(vc);
+- if (!vc->vc_origin)
+- vc->vc_origin = (unsigned long)vc->vc_screenbuf;
++ vc->vc_origin = (unsigned long)vc->vc_screenbuf;
+ visual_init(vc, i, 0);
+ set_origin(vc);
+ update_attr(vc);
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-arm b/tty/ioctl-use-asm-generic-ioctls-h-on-arm
new file mode 100644
index 00000000000000..9613f1eb2b8f23
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-arm
@@ -0,0 +1,120 @@
+From jeffm@suse.de Wed Sep 1 13:06:25 2010
+Message-Id: <20100820211537.982686153@suse.com>
+Date: Fri, 20 Aug 2010 17:14:02 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ Russell King <linux@arm.linux.org.uk>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on arm (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-arm
+
+This patch converts arm to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- ARM defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
+- The generic version adds support for termiox
+
+Reviewed-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/include/asm/ioctls.h | 83 ------------------------------------------
+ 1 file changed, 1 insertion(+), 82 deletions(-)
+
+--- a/arch/arm/include/asm/ioctls.h
++++ b/arch/arm/include/asm/ioctls.h
+@@ -1,89 +1,8 @@
+ #ifndef __ASM_ARM_IOCTLS_H
+ #define __ASM_ARM_IOCTLS_H
+
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define TIOCGRS485 0x542E
+-#define TIOCSRS485 0x542F
+-
+-#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+ #define FIOQSIZE 0x545E
+
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-avr32 b/tty/ioctl-use-asm-generic-ioctls-h-on-avr32
new file mode 100644
index 00000000000000..a13ea48b53d923
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-avr32
@@ -0,0 +1,121 @@
+From jeffm@suse.de Wed Sep 1 13:07:05 2010
+Message-Id: <20100820211538.179970218@suse.com>
+Date: Fri, 20 Aug 2010 17:14:03 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ Haavard Skinnemoen <hskinnemoen@atmel.com>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on avr32 (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-avr32
+
+This patch converts avr32 to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- The generic version adds support for termiox
+
+Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ arch/avr32/include/asm/ioctls.h | 86 ----------------------------------------
+ 1 file changed, 1 insertion(+), 85 deletions(-)
+
+--- a/arch/avr32/include/asm/ioctls.h
++++ b/arch/avr32/include/asm/ioctls.h
+@@ -1,90 +1,6 @@
+ #ifndef __ASM_AVR32_IOCTLS_H
+ #define __ASM_AVR32_IOCTLS_H
+
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define TIOCGRS485 0x542E
+-#define TIOCSRS485 0x542F
+-
+-#define FIONCLEX 0x5450
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+-#define FIOQSIZE 0x5460
+-
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif /* __ASM_AVR32_IOCTLS_H */
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-cris b/tty/ioctl-use-asm-generic-ioctls-h-on-cris
new file mode 100644
index 00000000000000..310da032173725
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-cris
@@ -0,0 +1,141 @@
+From jeffm@suse.de Wed Sep 1 13:07:28 2010
+Message-Id: <20100820211538.375796948@suse.com>
+Date: Fri, 20 Aug 2010 17:14:04 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ Mikael Starvik <starvik@axis.com>,
+ Jesper Nilsson <jesper.nilsson@axis.com>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on cris (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-cris
+
+This patch converts cris to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- CRIS defines two ioctls: TIOCSERSETRS485 and TIOCSERWRRS485,
+ kept in arch-specific portion
+- CRIS defines a different value for TIOCSRS485, kept via ifndef in generic
+- The generic version adds support for termiox
+
+Cc: Mikael Starvik <starvik@axis.com>
+Cc: Jesper Nilsson <jesper.nilsson@axis.com>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/cris/include/asm/ioctls.h | 84 -----------------------------------------
+ include/asm-generic/ioctls.h | 2
+ 2 files changed, 3 insertions(+), 83 deletions(-)
+
+--- a/arch/cris/include/asm/ioctls.h
++++ b/arch/cris/include/asm/ioctls.h
+@@ -1,93 +1,11 @@
+ #ifndef __ARCH_CRIS_IOCTLS_H__
+ #define __ARCH_CRIS_IOCTLS_H__
+
+-/* verbatim copy of asm-i386/ioctls.h */
+-
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+ #define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+-#define FIOQSIZE 0x5460
+-
+ #define TIOCSERSETRS485 0x5461 /* enable rs-485 (deprecated) */
+ #define TIOCSERWRRS485 0x5462 /* write rs-485 */
+ #define TIOCSRS485 0x5463 /* enable rs-485 */
+-#define TIOCGRS485 0x542E /* get rs-485 */
+-
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif
+--- a/include/asm-generic/ioctls.h
++++ b/include/asm-generic/ioctls.h
+@@ -62,7 +62,9 @@
+ #define TCSETSW2 _IOW('T', 0x2C, struct termios2)
+ #define TCSETSF2 _IOW('T', 0x2D, struct termios2)
+ #define TIOCGRS485 0x542E
++#ifndef TIOCSRS485
+ #define TIOCSRS485 0x542F
++#endif
+ #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+ #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
+ #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-frv b/tty/ioctl-use-asm-generic-ioctls-h-on-frv
new file mode 100644
index 00000000000000..e1c82f0ab030c9
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-frv
@@ -0,0 +1,122 @@
+From jeffm@suse.de Wed Sep 1 13:08:06 2010
+Message-Id: <20100820211538.515791797@suse.com>
+Date: Fri, 20 Aug 2010 17:14:05 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ David Howells <dhowells@redhat.com>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on frv (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-frv
+
+This patch converts frv to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- FRV defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
+- FRV defines TIOCTTYGSTRUCT, kept in arch-specific version
+- The generic version provides TIOCGRS485 and TIOCSRS485 but they
+ are unused by any driver available for this architecture.
+- The generic version adds support for termiox
+
+Cc: David Howells <dhowells@redhat.com>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/frv/include/asm/ioctls.h | 80 ------------------------------------------
+ 1 file changed, 1 insertion(+), 79 deletions(-)
+
+--- a/arch/frv/include/asm/ioctls.h
++++ b/arch/frv/include/asm/ioctls.h
+@@ -1,88 +1,10 @@
+ #ifndef __ASM_IOCTLS_H__
+ #define __ASM_IOCTLS_H__
+
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+ #define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+ #define FIOQSIZE 0x545E
+
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif /* __ASM_IOCTLS_H__ */
+
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-h8300 b/tty/ioctl-use-asm-generic-ioctls-h-on-h8300
new file mode 100644
index 00000000000000..bb46b6d0c8c28b
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-h8300
@@ -0,0 +1,120 @@
+From jeffm@suse.de Wed Sep 1 13:08:25 2010
+Message-Id: <20100820211538.656306204@suse.com>
+Date: Fri, 20 Aug 2010 17:14:06 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ Yoshinori Sato <ysato@users.sourceforge.jp>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on h8300 (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-h8300
+
+This patch converts h8300 to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- H8300 defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
+- The generic version adds TIOCSRS485 and TIOGSRS485, but are unused
+ by any driver available on this architecture.
+- The generic version adds support for termiox
+
+Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/h8300/include/asm/ioctls.h | 81 ----------------------------------------
+ 1 file changed, 1 insertion(+), 80 deletions(-)
+
+--- a/arch/h8300/include/asm/ioctls.h
++++ b/arch/h8300/include/asm/ioctls.h
+@@ -1,87 +1,8 @@
+ #ifndef __ARCH_H8300_IOCTLS_H__
+ #define __ARCH_H8300_IOCTLS_H__
+
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+ #define FIOQSIZE 0x545E
+
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif /* __ARCH_H8300_IOCTLS_H__ */
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-ia64 b/tty/ioctl-use-asm-generic-ioctls-h-on-ia64
new file mode 100644
index 00000000000000..a0918f2f646fcb
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-ia64
@@ -0,0 +1,126 @@
+From linux-kernel-owner@vger.kernel.org Wed Sep 1 13:09:48 2010
+Message-Id: <20100820211538.797351834@suse.com>
+Date: Fri, 20 Aug 2010 17:14:07 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ Tony Luck <tony.luck@intel.com>,
+ Fenghua Yu <fenghua.yu@intel.com>
+Subject: ioctl: Use asm-generic/ioctls.h on ia64 (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-ia64
+
+This patch converts ia64 to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- The generic version adds TIOCSRS485 and TIOCGRS485, which are unused
+ by any driver available on this architecture.
+- The generic version adds support for termiox
+
+Cc: Tony Luck <tony.luck@intel.com>
+Cc: Fenghua Yu <fenghua.yu@intel.com>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/ia64/include/asm/ioctls.h | 89 -----------------------------------------
+ 1 file changed, 1 insertion(+), 88 deletions(-)
+
+--- a/arch/ia64/include/asm/ioctls.h
++++ b/arch/ia64/include/asm/ioctls.h
+@@ -1,93 +1,6 @@
+ #ifndef _ASM_IA64_IOCTLS_H
+ #define _ASM_IA64_IOCTLS_H
+
+-/*
+- * Based on <asm-i386/ioctls.h>
+- *
+- * Modified 1998, 1999, 2002
+- * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
+- */
+-
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+-#define FIOQSIZE 0x5460
+-
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif /* _ASM_IA64_IOCTLS_H */
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-m32r b/tty/ioctl-use-asm-generic-ioctls-h-on-m32r
new file mode 100644
index 00000000000000..8b767099583367
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-m32r
@@ -0,0 +1,120 @@
+From jeffm@suse.de Wed Sep 1 13:10:05 2010
+Message-Id: <20100820211538.937409471@suse.com>
+Date: Fri, 20 Aug 2010 17:14:08 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ Hirokazu Takata <takata@linux-m32r.org>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on m32r (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-m32r
+
+This patch converts m32r to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- The generic version adds TIOCGRS485 and TIOCGRS485, which are unused by
+ any driver available on this architecture.
+- The generic version adds support for termiox
+
+Cc: Hirokazu Takata <takata@linux-m32r.org>
+Cc: Greg Kroah-Hartman <gregkh@suse.de>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/m32r/include/asm/ioctls.h | 83 -----------------------------------------
+ 1 file changed, 1 insertion(+), 82 deletions(-)
+
+--- a/arch/m32r/include/asm/ioctls.h
++++ b/arch/m32r/include/asm/ioctls.h
+@@ -1,87 +1,6 @@
+ #ifndef __ARCH_M32R_IOCTLS_H__
+ #define __ARCH_M32R_IOCTLS_H__
+
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define FIONCLEX 0x5450
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+-#define FIOQSIZE 0x5460
+-
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif /* __ARCH_M32R_IOCTLS_H__ */
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-m68k b/tty/ioctl-use-asm-generic-ioctls-h-on-m68k
new file mode 100644
index 00000000000000..94262afa1eb3c3
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-m68k
@@ -0,0 +1,121 @@
+From jeffm@suse.de Wed Sep 1 13:10:20 2010
+Message-Id: <20100820211539.079080751@suse.com>
+Date: Fri, 20 Aug 2010 17:14:09 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ Geert Uytterhoeven <geert@linux-m68k.org>,
+ Roman Zippel <zippel@linux-m68k.org>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on m68k (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-m68k
+
+This patch converts m68k to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- m68k defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
+- The generic version adds TIOCSRS485 and TIOCGRS485m which are unused
+ by any driver available on this architecture.
+- The generic version adds support for termiox
+
+Cc: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: Roman Zippel <zippel@linux-m68k.org>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/m68k/include/asm/ioctls.h | 80 -----------------------------------------
+ 1 file changed, 1 insertion(+), 79 deletions(-)
+
+--- a/arch/m68k/include/asm/ioctls.h
++++ b/arch/m68k/include/asm/ioctls.h
+@@ -1,86 +1,8 @@
+ #ifndef __ARCH_M68K_IOCTLS_H__
+ #define __ARCH_M68K_IOCTLS_H__
+
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+ #define FIOQSIZE 0x545E
+
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif /* __ARCH_M68K_IOCTLS_H__ */
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-mn10300 b/tty/ioctl-use-asm-generic-ioctls-h-on-mn10300
new file mode 100644
index 00000000000000..788446301c491a
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-mn10300
@@ -0,0 +1,122 @@
+From jeffm@suse.de Wed Sep 1 13:10:31 2010
+Message-Id: <20100820211539.219622188@suse.com>
+Date: Fri, 20 Aug 2010 17:14:10 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ David Howells <dhowells@redhat.com>,
+ Koichi Yasutake <yasutake.koichi@jp.panasonic.com>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on mn10300 (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-mn10300
+
+This patch converts mn10300 to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- The generic version provides TIOCGRS485 and TIOCSRS485 but they
+ are unused by any driver available for this architecture.
+- The generic version adds support for termiox
+
+Cc: David Howells <dhowells@redhat.com>
+Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/mn10300/include/asm/ioctls.h | 84 --------------------------------------
+ 1 file changed, 1 insertion(+), 83 deletions(-)
+
+--- a/arch/mn10300/include/asm/ioctls.h
++++ b/arch/mn10300/include/asm/ioctls.h
+@@ -1,88 +1,6 @@
+ #ifndef _ASM_IOCTLS_H
+ #define _ASM_IOCTLS_H
+
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T', 0x2A, struct termios2)
+-#define TCSETS2 _IOW('T', 0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number
+- * (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T', 0x36, int) /* Generate signal on Pty slave */
+-
+-#define FIONCLEX 0x5450
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+-#define FIOQSIZE 0x5460
+-
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif /* _ASM_IOCTLS_H */
diff --git a/tty/ioctl-use-asm-generic-ioctls-h-on-s390 b/tty/ioctl-use-asm-generic-ioctls-h-on-s390
new file mode 100644
index 00000000000000..90dbd07ee47b33
--- /dev/null
+++ b/tty/ioctl-use-asm-generic-ioctls-h-on-s390
@@ -0,0 +1,129 @@
+From jeffm@suse.de Wed Sep 1 13:10:44 2010
+Message-Id: <20100820211539.359886978@suse.com>
+Date: Fri, 20 Aug 2010 17:14:11 -0400
+From: Jeff Mahoney <jeffm@suse.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>,
+ Martin Schwidefsky <schwidefsky@de.ibm.com>,
+ Heiko Carstens <heiko.carstens@de.ibm.com>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: ioctl: Use asm-generic/ioctls.h on s390 (enables termiox)
+Content-Disposition: inline; filename=ioctl-use-asm-generic-ioctls-h-on-s390
+
+This patch converts s390 to use asm-generic/ioctls.h instead of its
+own version.
+
+The differences between the arch-specific version and the generic
+version are as follows:
+
+- S390 defines its own value for FIOQSIZE, asm-generic/ioctls.h keeps it
+- The generic version adds TIOCGRS485 and TIOCGRS485, which are unused
+ by any driver available on this architecture
+- The generic version adds support for termiox
+
+Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/s390/include/asm/ioctls.h | 88 -----------------------------------------
+ 1 file changed, 1 insertion(+), 87 deletions(-)
+
+--- a/arch/s390/include/asm/ioctls.h
++++ b/arch/s390/include/asm/ioctls.h
+@@ -1,94 +1,8 @@
+-/*
+- * include/asm-s390/ioctls.h
+- *
+- * S390 version
+- *
+- * Derived from "include/asm-i386/ioctls.h"
+- */
+-
+ #ifndef __ARCH_S390_IOCTLS_H__
+ #define __ARCH_S390_IOCTLS_H__
+
+-#include <asm/ioctl.h>
+-
+-/* 0x54 is just a magic number to make these relatively unique ('T') */
+-
+-#define TCGETS 0x5401
+-#define TCSETS 0x5402
+-#define TCSETSW 0x5403
+-#define TCSETSF 0x5404
+-#define TCGETA 0x5405
+-#define TCSETA 0x5406
+-#define TCSETAW 0x5407
+-#define TCSETAF 0x5408
+-#define TCSBRK 0x5409
+-#define TCXONC 0x540A
+-#define TCFLSH 0x540B
+-#define TIOCEXCL 0x540C
+-#define TIOCNXCL 0x540D
+-#define TIOCSCTTY 0x540E
+-#define TIOCGPGRP 0x540F
+-#define TIOCSPGRP 0x5410
+-#define TIOCOUTQ 0x5411
+-#define TIOCSTI 0x5412
+-#define TIOCGWINSZ 0x5413
+-#define TIOCSWINSZ 0x5414
+-#define TIOCMGET 0x5415
+-#define TIOCMBIS 0x5416
+-#define TIOCMBIC 0x5417
+-#define TIOCMSET 0x5418
+-#define TIOCGSOFTCAR 0x5419
+-#define TIOCSSOFTCAR 0x541A
+-#define FIONREAD 0x541B
+-#define TIOCINQ FIONREAD
+-#define TIOCLINUX 0x541C
+-#define TIOCCONS 0x541D
+-#define TIOCGSERIAL 0x541E
+-#define TIOCSSERIAL 0x541F
+-#define TIOCPKT 0x5420
+-#define FIONBIO 0x5421
+-#define TIOCNOTTY 0x5422
+-#define TIOCSETD 0x5423
+-#define TIOCGETD 0x5424
+-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+-#define TIOCSBRK 0x5427 /* BSD compatibility */
+-#define TIOCCBRK 0x5428 /* BSD compatibility */
+-#define TIOCGSID 0x5429 /* Return the session ID of FD */
+-#define TCGETS2 _IOR('T',0x2A, struct termios2)
+-#define TCSETS2 _IOW('T',0x2B, struct termios2)
+-#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+-#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
+-#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
+-
+-#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
+-#define FIOCLEX 0x5451
+-#define FIOASYNC 0x5452
+-#define TIOCSERCONFIG 0x5453
+-#define TIOCSERGWILD 0x5454
+-#define TIOCSERSWILD 0x5455
+-#define TIOCGLCKTRMIOS 0x5456
+-#define TIOCSLCKTRMIOS 0x5457
+-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+-#define TIOCSERGETLSR 0x5459 /* Get line status register */
+-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+-
+-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+ #define FIOQSIZE 0x545E
+
+-/* Used for packet mode */
+-#define TIOCPKT_DATA 0
+-#define TIOCPKT_FLUSHREAD 1
+-#define TIOCPKT_FLUSHWRITE 2
+-#define TIOCPKT_STOP 4
+-#define TIOCPKT_START 8
+-#define TIOCPKT_NOSTOP 16
+-#define TIOCPKT_DOSTOP 32
+-#define TIOCPKT_IOCTL 64
+-
+-#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
++#include <asm-generic/ioctls.h>
+
+ #endif
diff --git a/tty/serial-add-console_poll-support-for-uartlite.patch b/tty/serial-add-console_poll-support-for-uartlite.patch
new file mode 100644
index 00000000000000..c03313ffac5323
--- /dev/null
+++ b/tty/serial-add-console_poll-support-for-uartlite.patch
@@ -0,0 +1,64 @@
+From monstr@monstr.eu Wed Sep 1 12:42:25 2010
+From: Michal Simek <monstr@monstr.eu>
+To: gregkh@suse.de
+Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
+ Michal Simek <monstr@monstr.eu>,
+ Jason Wessel <jason.wessel@windriver.com>
+Subject: serial: Add CONSOLE_POLL support for uartlite
+Date: Tue, 17 Aug 2010 10:42:05 +0200
+Message-Id: <1282034525-19207-2-git-send-email-monstr@monstr.eu>
+
+CONSOLE_POLL support for uartlite enables
+KGDB debugging over serial line.
+
+Signed-off-by: Michal Simek <monstr@monstr.eu>
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/uartlite.c | 26 +++++++++++++++++++++++++-
+ 1 file changed, 25 insertions(+), 1 deletion(-)
+
+--- a/drivers/serial/uartlite.c
++++ b/drivers/serial/uartlite.c
+@@ -322,6 +322,26 @@ static int ulite_verify_port(struct uart
+ return -EINVAL;
+ }
+
++#ifdef CONFIG_CONSOLE_POLL
++static int ulite_get_poll_char(struct uart_port *port)
++{
++ while (!(ioread32be(port->membase + ULITE_STATUS)
++ & ULITE_STATUS_RXVALID))
++ return NO_POLL_CHAR;
++
++ return ioread32be(port->membase + ULITE_RX);
++}
++
++static void ulite_put_poll_char(struct uart_port *port, unsigned char ch)
++{
++ while (ioread32be(port->membase + ULITE_STATUS) & ULITE_STATUS_TXFULL)
++ cpu_relax();
++
++ /* write char to device */
++ iowrite32be(ch, port->membase + ULITE_TX);
++}
++#endif
++
+ static struct uart_ops ulite_ops = {
+ .tx_empty = ulite_tx_empty,
+ .set_mctrl = ulite_set_mctrl,
+@@ -338,7 +358,11 @@ static struct uart_ops ulite_ops = {
+ .release_port = ulite_release_port,
+ .request_port = ulite_request_port,
+ .config_port = ulite_config_port,
+- .verify_port = ulite_verify_port
++ .verify_port = ulite_verify_port,
++#ifdef CONFIG_CONSOLE_POLL
++ .poll_get_char = ulite_get_poll_char,
++ .poll_put_char = ulite_put_poll_char,
++#endif
+ };
+
+ /* ---------------------------------------------------------------------
diff --git a/tty/serial-mfd-snprintf-returns-largish-values.patch b/tty/serial-mfd-snprintf-returns-largish-values.patch
new file mode 100644
index 00000000000000..9a0835027853a1
--- /dev/null
+++ b/tty/serial-mfd-snprintf-returns-largish-values.patch
@@ -0,0 +1,45 @@
+From error27@gmail.com Wed Sep 1 12:40:18 2010
+Date: Thu, 12 Aug 2010 09:50:09 +0200
+From: Dan Carpenter <error27@gmail.com>
+To: Feng Tang <feng.tang@intel.com>
+Cc: Greg Kroah-Hartman <gregkh@suse.de>,
+ Alan Cox <alan@linux.intel.com>, linux-kernel@vger.kernel.org,
+ kernel-janitors@vger.kernel.org
+Subject: serial: mfd: snprintf() returns largish values
+Message-ID: <20100812075009.GK645@bicker>
+Content-Disposition: inline
+
+snprintf() returns the number of bytes which would have been written so
+it can be larger than the size of the buffer. In this case it's fine,
+but people copy and paste this code so I've fixed it.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Acked-by: Feng Tang <feng.tang@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/mfd.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/serial/mfd.c
++++ b/drivers/serial/mfd.c
+@@ -171,6 +171,9 @@ static ssize_t port_show_regs(struct fil
+ len += snprintf(buf + len, HSU_REGS_BUFSIZE - len,
+ "DIV: \t\t0x%08x\n", serial_in(up, UART_DIV));
+
++ if (len > HSU_REGS_BUFSIZE)
++ len = HSU_REGS_BUFSIZE;
++
+ ret = simple_read_from_buffer(user_buf, count, ppos, buf, len);
+ kfree(buf);
+ return ret;
+@@ -218,6 +221,9 @@ static ssize_t dma_show_regs(struct file
+ len += snprintf(buf + len, HSU_REGS_BUFSIZE - len,
+ "D0TSR: \t\t0x%08x\n", chan_readl(chan, HSU_CH_D3TSR));
+
++ if (len > HSU_REGS_BUFSIZE)
++ len = HSU_REGS_BUFSIZE;
++
+ ret = simple_read_from_buffer(user_buf, count, ppos, buf, len);
+ kfree(buf);
+ return ret;
diff --git a/tty/serport-place-serport-serio-device-correctly-in-the-device-tree.patch b/tty/serport-place-serport-serio-device-correctly-in-the-device-tree.patch
new file mode 100644
index 00000000000000..49a390ace74486
--- /dev/null
+++ b/tty/serport-place-serport-serio-device-correctly-in-the-device-tree.patch
@@ -0,0 +1,30 @@
+From dbaryshkov@gmail.com Wed Sep 1 12:36:34 2010
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+To: linux-kernel@vger.kernel.org
+Cc: Greg Kroah-Hartman <gregkh@suse.de>,
+ Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Subject: serport: place serport serio device correctly in the device tree
+Date: Mon, 9 Aug 2010 18:22:50 +0400
+Message-Id: <1281363770-23598-2-git-send-email-dbaryshkov@gmail.com>
+
+Make serport serio device to be a child of corresponding tty device
+instead of just hanging at /sys/devices/serioX.
+
+Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Acked-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/serio/serport.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/serio/serport.c
++++ b/drivers/input/serio/serport.c
+@@ -165,6 +165,7 @@ static ssize_t serport_ldisc_read(struct
+ serio->open = serport_serio_open;
+ serio->close = serport_serio_close;
+ serio->port_data = serport;
++ serio->dev.parent = tty->dev;
+
+ serio_register_port(serport->serio);
+ printk(KERN_INFO "serio: Serial port %s\n", tty_name(tty, name));
diff --git a/tty/tty-add-tty_struct-dev-pointer-to-corresponding-device-instance.patch b/tty/tty-add-tty_struct-dev-pointer-to-corresponding-device-instance.patch
new file mode 100644
index 00000000000000..cba402eb8b9071
--- /dev/null
+++ b/tty/tty-add-tty_struct-dev-pointer-to-corresponding-device-instance.patch
@@ -0,0 +1,73 @@
+From dbaryshkov@gmail.com Wed Sep 1 12:35:48 2010
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+To: linux-kernel@vger.kernel.org
+Cc: Greg Kroah-Hartman <gregkh@suse.de>,
+ Alan Cox <alan@lxorguk.ukuu.org.uk>
+Subject: tty: add tty_struct->dev pointer to corresponding device instance
+Date: Mon, 9 Aug 2010 18:22:49 +0400
+Message-Id: <1281363770-23598-1-git-send-email-dbaryshkov@gmail.com>
+
+Some device drivers (mostly tty line disciplines) would like to have way
+know a struct device instance corresponding to passed tty_struct. Add
+a struct device pointer to struct tty_struct and populate it during
+initialize_tty_struct().
+
+Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Acked-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/tty_io.c | 17 +++++++++++++++++
+ include/linux/tty.h | 1 +
+ 2 files changed, 18 insertions(+)
+
+--- a/drivers/char/tty_io.c
++++ b/drivers/char/tty_io.c
+@@ -183,6 +183,8 @@ struct tty_struct *alloc_tty_struct(void
+
+ void free_tty_struct(struct tty_struct *tty)
+ {
++ if (tty->dev)
++ put_device(tty->dev);
+ kfree(tty->write_buf);
+ tty_buffer_free_all(tty);
+ kfree(tty);
+@@ -2783,6 +2785,20 @@ void do_SAK(struct tty_struct *tty)
+
+ EXPORT_SYMBOL(do_SAK);
+
++static int dev_match_devt(struct device *dev, void *data)
++{
++ dev_t *devt = data;
++ return dev->devt == *devt;
++}
++
++/* Must put_device() after it's unused! */
++static struct device *tty_get_device(struct tty_struct *tty)
++{
++ dev_t devt = tty_devnum(tty);
++ return class_find_device(tty_class, NULL, &devt, dev_match_devt);
++}
++
++
+ /**
+ * initialize_tty_struct
+ * @tty: tty to initialize
+@@ -2823,6 +2839,7 @@ void initialize_tty_struct(struct tty_st
+ tty->ops = driver->ops;
+ tty->index = idx;
+ tty_line_name(driver, idx, tty->name);
++ tty->dev = tty_get_device(tty);
+ }
+
+ /**
+--- a/include/linux/tty.h
++++ b/include/linux/tty.h
+@@ -256,6 +256,7 @@ struct tty_operations;
+ struct tty_struct {
+ int magic;
+ struct kref kref;
++ struct device *dev;
+ struct tty_driver *driver;
+ const struct tty_operations *ops;
+ int index;
diff --git a/tty/tty-remove-__gfp_nofail-from-tty_add_file.patch b/tty/tty-remove-__gfp_nofail-from-tty_add_file.patch
new file mode 100644
index 00000000000000..161eec2fa0a4ae
--- /dev/null
+++ b/tty/tty-remove-__gfp_nofail-from-tty_add_file.patch
@@ -0,0 +1,92 @@
+From penberg@kernel.org Wed Sep 1 13:04:31 2010
+From: Pekka Enberg <penberg@kernel.org>
+To: gregkh@suse.de
+Cc: linux-kernel@vger.kernel.org, Pekka Enberg <penberg@kernel.org>,
+ Andrew Morton <akpm@linux-foundation.org>,
+ Alan Cox <alan@lxorguk.ukuu.org.uk>, Arnd Bergmann <arnd@arndb.de>,
+ David Rientjes <rientjes@google.com>
+Subject: tty: Remove __GFP_NOFAIL from tty_add_file()
+Date: Tue, 24 Aug 2010 07:48:34 +0300
+Message-Id: <1282625314-2445-1-git-send-email-penberg@kernel.org>
+
+This patch removes __GFP_NOFAIL use from tty_add_file() and adds proper error
+handling to the call-sites of the function.
+
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Pekka Enberg <penberg@kernel.org>
+Acked-by: David Rientjes <rientjes@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/pty.c | 4 +++-
+ drivers/char/tty_io.c | 15 +++++++++++----
+ include/linux/tty.h | 2 +-
+ 3 files changed, 15 insertions(+), 6 deletions(-)
+
+--- a/drivers/char/pty.c
++++ b/drivers/char/pty.c
+@@ -676,7 +676,9 @@ static int ptmx_open(struct inode *inode
+
+ set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
+
+- tty_add_file(tty, filp);
++ retval = tty_add_file(tty, filp);
++ if (retval)
++ goto out;
+
+ retval = devpts_pty_new(inode, tty->link);
+ if (retval)
+--- a/drivers/char/tty_io.c
++++ b/drivers/char/tty_io.c
+@@ -196,12 +196,13 @@ static inline struct tty_struct *file_tt
+ }
+
+ /* Associate a new file with the tty structure */
+-void tty_add_file(struct tty_struct *tty, struct file *file)
++int tty_add_file(struct tty_struct *tty, struct file *file)
+ {
+ struct tty_file_private *priv;
+
+- /* XXX: must implement proper error handling in callers */
+- priv = kmalloc(sizeof(*priv), GFP_KERNEL|__GFP_NOFAIL);
++ priv = kmalloc(sizeof(*priv), GFP_KERNEL);
++ if (!priv)
++ return -ENOMEM;
+
+ priv->tty = tty;
+ priv->file = file;
+@@ -210,6 +211,8 @@ void tty_add_file(struct tty_struct *tty
+ spin_lock(&tty_files_lock);
+ list_add(&priv->list, &tty->tty_files);
+ spin_unlock(&tty_files_lock);
++
++ return 0;
+ }
+
+ /* Delete file from its tty */
+@@ -1877,7 +1880,11 @@ got_driver:
+ return PTR_ERR(tty);
+ }
+
+- tty_add_file(tty, filp);
++ retval = tty_add_file(tty, filp);
++ if (retval) {
++ tty_unlock();
++ return retval;
++ }
+
+ check_tty_count(tty, "tty_open");
+ if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+--- a/include/linux/tty.h
++++ b/include/linux/tty.h
+@@ -466,7 +466,7 @@ extern void proc_clear_tty(struct task_s
+ extern struct tty_struct *get_current_tty(void);
+ extern void tty_default_fops(struct file_operations *fops);
+ extern struct tty_struct *alloc_tty_struct(void);
+-extern void tty_add_file(struct tty_struct *tty, struct file *file);
++extern int tty_add_file(struct tty_struct *tty, struct file *file);
+ extern void free_tty_struct(struct tty_struct *tty);
+ extern void initialize_tty_struct(struct tty_struct *tty,
+ struct tty_driver *driver, int idx);
diff --git a/tty/vt-use-pit_tick_rate-in-vt-beep-ioctl.patch b/tty/vt-use-pit_tick_rate-in-vt-beep-ioctl.patch
new file mode 100644
index 00000000000000..3aa34c8da9fd86
--- /dev/null
+++ b/tty/vt-use-pit_tick_rate-in-vt-beep-ioctl.patch
@@ -0,0 +1,78 @@
+From arnd@arndb.de Wed Sep 1 13:04:58 2010
+From: Arnd Bergmann <arnd@arndb.de>
+To: linux-kernel@vger.kernel.org,
+ Greg KH <greg@kroah.com>,
+ linux-input@vger.kernel.org,
+ Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Subject: vt: use PIT_TICK_RATE in vt beep ioctl
+Date: Tue, 24 Aug 2010 15:53:11 +0200
+Cc: linux-arm-kernel@lists.infradead.org,
+ David Yang <david.yangshuai@gmail.com>,
+ Eric Miao <eric.y.miao@gmail.com>,
+ Emmanuel Colbus <emmanuel.colbus@ensimag.imag.fr>,
+ Andrew Morton <akpm@osdl.org>
+Message-Id: <201008241553.11219.arnd@arndb.de>
+
+The KIOCSOUND and KDMKTONE ioctls are based on the
+CLOCK_TICK_RATE, which is architecture and sometimes
+configuration specific.
+
+In practice, most user applications assume that it
+is actually defined as the i8253 PIT base clock of
+1193182 Hz, which is true on some architectures
+but not on others.
+
+This patch makes the vt code use the PIT frequency
+on all architectures, which is much more well-defined.
+It will change the behavior of user applications
+sending the beep ioctl on all architectures that
+define CLOCK_TICK_RATE different from PIT_TICK_RATE.
+
+The original breakage was introduced in commit bcc8ca099
+"Adapt drivers/char/vt_ioctl.c to non-x86".
+Hopefully, reverting this change will make the frequency
+correct in more cases than it will make it incorrect.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/vt_ioctl.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/drivers/char/vt_ioctl.c
++++ b/drivers/char/vt_ioctl.c
+@@ -533,11 +533,14 @@ int vt_ioctl(struct tty_struct *tty, str
+ case KIOCSOUND:
+ if (!perm)
+ goto eperm;
+- /* FIXME: This is an old broken API but we need to keep it
+- supported and somehow separate the historic advertised
+- tick rate from any real one */
++ /*
++ * The use of PIT_TICK_RATE is historic, it used to be
++ * the platform-dependent CLOCK_TICK_RATE between 2.6.12
++ * and 2.6.36, which was a minor but unfortunate ABI
++ * change.
++ */
+ if (arg)
+- arg = CLOCK_TICK_RATE / arg;
++ arg = PIT_TICK_RATE / arg;
+ kd_mksound(arg, 0);
+ break;
+
+@@ -553,11 +556,8 @@ int vt_ioctl(struct tty_struct *tty, str
+ */
+ ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
+ count = ticks ? (arg & 0xffff) : 0;
+- /* FIXME: This is an old broken API but we need to keep it
+- supported and somehow separate the historic advertised
+- tick rate from any real one */
+ if (count)
+- count = CLOCK_TICK_RATE / count;
++ count = PIT_TICK_RATE / count;
+ kd_mksound(count, ticks);
+ break;
+ }
diff --git a/usb.current/usb-allow-drivers-to-use-allocated-bandwidth-until-unbound.patch b/usb.current/usb-allow-drivers-to-use-allocated-bandwidth-until-unbound.patch
new file mode 100644
index 00000000000000..6930f5143cdf04
--- /dev/null
+++ b/usb.current/usb-allow-drivers-to-use-allocated-bandwidth-until-unbound.patch
@@ -0,0 +1,91 @@
+From linux-usb-owner@vger.kernel.org Wed Sep 1 13:02:44 2010
+From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
+To: linux-usb@vger.kernel.org
+Cc: linux-kernel@vger.kernel.org,
+ Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
+ Alan Stern <stern@rowland.harvard.edu>,
+ Sarah Sharp <sarah.a.sharp@linux.intel.com>,
+ Greg Kroah-Hartman <gregkh@suse.de>
+Subject: usb: allow drivers to use allocated bandwidth until unbound
+Date: Sat, 28 Aug 2010 03:06:29 -0300
+Message-Id: <1282975589-22324-1-git-send-email-cascardo@holoscopio.com>
+
+When using the remove sysfs file, the device configuration is set to -1
+(unconfigured). This eventually unbind drivers with the bandwidth_mutex
+held. Some drivers may call functions that hold said mutex, like
+usb_reset_device. This is the case for rtl8187, for example. This will
+lead to the same process holding the mutex twice, which deadlocks.
+
+Besides, according to Alan Stern:
+"The deadlock problem probably could be handled somehow, but there's a
+separate issue: Until the usb_disable_device call finishes unbinding
+the drivers, the drivers are free to continue using their allocated
+bandwidth. We musn't change the bandwidth allocations until after the
+unbinding is done. So this patch is indeed necessary."
+
+Unbinding the driver before holding the bandwidth_mutex solves the
+problem. If any operation after that fails, drivers are not bound again.
+But that would be a problem anyway that the user may solve resetting the
+device configuration to one that works, just like he would need to do in
+most other failure cases.
+
+Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
+Cc: Alan Stern <stern@rowland.harvard.edu>
+Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/message.c | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/core/message.c
++++ b/drivers/usb/core/message.c
+@@ -1724,6 +1724,15 @@ free_interfaces:
+ if (ret)
+ goto free_interfaces;
+
++ /* if it's already configured, clear out old state first.
++ * getting rid of old interfaces means unbinding their drivers.
++ */
++ if (dev->state != USB_STATE_ADDRESS)
++ usb_disable_device(dev, 1); /* Skip ep0 */
++
++ /* Get rid of pending async Set-Config requests for this device */
++ cancel_async_set_config(dev);
++
+ /* Make sure we have bandwidth (and available HCD resources) for this
+ * configuration. Remove endpoints from the schedule if we're dropping
+ * this configuration to set configuration 0. After this point, the
+@@ -1733,20 +1742,11 @@ free_interfaces:
+ mutex_lock(&hcd->bandwidth_mutex);
+ ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL);
+ if (ret < 0) {
+- usb_autosuspend_device(dev);
+ mutex_unlock(&hcd->bandwidth_mutex);
++ usb_autosuspend_device(dev);
+ goto free_interfaces;
+ }
+
+- /* if it's already configured, clear out old state first.
+- * getting rid of old interfaces means unbinding their drivers.
+- */
+- if (dev->state != USB_STATE_ADDRESS)
+- usb_disable_device(dev, 1); /* Skip ep0 */
+-
+- /* Get rid of pending async Set-Config requests for this device */
+- cancel_async_set_config(dev);
+-
+ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ USB_REQ_SET_CONFIGURATION, 0, configuration, 0,
+ NULL, 0, USB_CTRL_SET_TIMEOUT);
+@@ -1761,8 +1761,8 @@ free_interfaces:
+ if (!cp) {
+ usb_set_device_state(dev, USB_STATE_ADDRESS);
+ usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL);
+- usb_autosuspend_device(dev);
+ mutex_unlock(&hcd->bandwidth_mutex);
++ usb_autosuspend_device(dev);
+ goto free_interfaces;
+ }
+ mutex_unlock(&hcd->bandwidth_mutex);
diff --git a/usb.current/usb-cp210x-add-b-g-h3000-link-cable-id.patch b/usb.current/usb-cp210x-add-b-g-h3000-link-cable-id.patch
new file mode 100644
index 00000000000000..797046e959812f
--- /dev/null
+++ b/usb.current/usb-cp210x-add-b-g-h3000-link-cable-id.patch
@@ -0,0 +1,29 @@
+From jason.detring@navico.com Wed Sep 1 13:00:21 2010
+From: Jason Detring <jason.detring@navico.com>
+To: linux-usb@vger.kernel.org
+Cc: gregkh@suse.de, Jason Detring <jason.detring@navico.com>
+Subject: USB: cp210x: Add B&G H3000 link cable ID
+Date: Thu, 26 Aug 2010 15:08:54 -0500
+Message-Id: <1282853334-27956-2-git-send-email-jason.detring@navico.com>
+
+This is the cable between an H3000 navigation unit and a multi-function display.
+http://www.bandg.com/en/Products/H3000/Spares-and-Accessories/Cables/H3000-CPU-USB-Cable-Pack/
+
+Signed-off-by: Jason Detring <jason.detring@navico.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/cp210x.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -88,6 +88,7 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x10C4, 0x8149) }, /* West Mountain Radio Computerized Battery Analyzer */
+ { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */
+ { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */
++ { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */
+ { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
+ { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */
+ { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
diff --git a/usb.current/usb-cp210x-add-new-device-id.patch b/usb.current/usb-cp210x-add-new-device-id.patch
new file mode 100644
index 00000000000000..1056a7be75223c
--- /dev/null
+++ b/usb.current/usb-cp210x-add-new-device-id.patch
@@ -0,0 +1,47 @@
+From craig@microtron.org.uk Wed Sep 1 12:59:47 2010
+To: greg@kroah.com
+Cc: linux-usb@vger.kernel.org
+Message-Id: <1282596415287486343@teratron>
+From: Craig Shelley <craig@microtron.org.uk>
+Date: Mon, 23 Aug 2010 20:50:57 +0100
+Subject: USB: CP210x Add new device ID
+
+New device ID added for Balluff RFID reader.
+
+Signed-off-by: Craig Shelley <craig@microtron.org.uk>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/cp210x.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -109,6 +109,7 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */
+ { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */
+ { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */
++ { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */
+ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
+ { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
+ { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */
+@@ -122,14 +123,14 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */
+ { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
+ { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
+- { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
+- { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
+- { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
+- { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
+ { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH PL512 Power Supply */
+ { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */
+ { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */
+ { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */
++ { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
++ { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
++ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
++ { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
+ { } /* Terminating Entry */
+ };
+
diff --git a/usb.current/usb-cp210x-usb-driver-add-usb_device-for-pirelli-dp-l10-mobile.patch b/usb.current/usb-cp210x-usb-driver-add-usb_device-for-pirelli-dp-l10-mobile.patch
new file mode 100644
index 00000000000000..c3a79e9546e8c2
--- /dev/null
+++ b/usb.current/usb-cp210x-usb-driver-add-usb_device-for-pirelli-dp-l10-mobile.patch
@@ -0,0 +1,75 @@
+From law_ence.dev@ntlworld.com Wed Sep 1 13:00:40 2010
+Date: Sun, 29 Aug 2010 21:51:52 +0100
+From: ael <law_ence.dev@ntlworld.com>
+To: greg@kroah.com, linux-usb@vger.kernel.org
+Subject: USB: cp210x usb driver: add USB_DEVICE for Pirelli DP-L10 mobile.
+Message-ID: <20100829205152.GB3157@exact.conquest>
+Content-Disposition: inline
+
+From: A E Lawrence <lawrence_a_e@ntlworld.com>
+
+The Pirelli DP-L10 mobile is sold under various brand names. One, already
+supported by cp210x, is the T-COM TC300. Here is the lsusb for that version:
+-------------------------------------------------------------------
+Bus 001 Device 002: ID 0489:e000 Foxconn / Hon Hai T-Com TC 300
+Device Descriptor:
+ bLength 18
+ bDescriptorType 1
+ bcdUSB 1.10
+ bDeviceClass 0 (Defined at Interface level)
+ bDeviceSubClass 0
+ bDeviceProtocol 0
+ bMaxPacketSize0 64
+ idVendor 0x0489 Foxconn / Hon Hai
+ idProduct 0xe000 T-Com TC 300
+ bcdDevice 1.00
+ iManufacturer 1 Silicon Labs
+ iProduct 2 TC 300
+ iSerial 3 0001
+ [snip]
+---------------------------------------------------------------------------
+
+However the native Pirelli DP-L10 is not supported:
+------------------------------------------------------------------
+Bus 001 Device 003: ID 0489:e003 Foxconn / Hon Hai Pirelli DP-L10
+Device Descriptor:
+ bLength 18
+ bDescriptorType 1
+ bcdUSB 1.10
+ bDeviceClass 0 (Defined at Interface level)
+ bDeviceSubClass 0
+ bDeviceProtocol 0
+ bMaxPacketSize0 64
+ idVendor 0x0489 Foxconn / Hon Hai
+ idProduct 0xe003 Pirelli DP-L10
+ bcdDevice 1.00
+ iManufacturer 1 Silicon Labs
+ iProduct 2 DP-L10
+ iSerial 3 0001
+ [snip]
+-------------------------------------------------------------------------
+
+All that is required is an extra USB_DEVICE entry:
+
+{ USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM
++Mobile */
+
+The patch adds that entry. Tested under 2.6.36-rc2 from git.
+
+Signed-off-by: A E Lawrence <lawrence_a_e@ntlworld.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/cp210x.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -56,6 +56,7 @@ static int debug;
+ static const struct usb_device_id id_table[] = {
+ { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */
+ { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
++ { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
+ { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */
+ { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
+ { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
diff --git a/usb.current/usb-ehci-ppc-of-problems-in-unwind.patch b/usb.current/usb-ehci-ppc-of-problems-in-unwind.patch
new file mode 100644
index 00000000000000..045db42a9f1fcb
--- /dev/null
+++ b/usb.current/usb-ehci-ppc-of-problems-in-unwind.patch
@@ -0,0 +1,60 @@
+From error27@gmail.com Wed Sep 1 12:41:29 2010
+Date: Sat, 14 Aug 2010 11:06:19 +0200
+From: Dan Carpenter <error27@gmail.com>
+To: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Greg Kroah-Hartman <gregkh@suse.de>,
+ Grant Likely <grant.likely@secretlab.ca>,
+ Sean MacLennan <smaclennan@pikatech.com>,
+ "David S. Miller" <davem@davemloft.net>, linux-usb@vger.kernel.org,
+ devicetree-discuss@lists.ozlabs.org,
+ Vitaly Bordug <vitb@kernel.crashing.org>,
+ kernel-janitors@vger.kernel.org
+Subject: USB: ehci-ppc-of: problems in unwind
+Message-ID: <20100814090619.GY645@bicker>
+Content-Disposition: inline
+
+The iounmap(ehci->ohci_hcctrl_reg); should be the first thing we do
+because the ioremap() was the last thing we did. Also if we hit any of
+the goto statements in the original code then it would have led to a
+NULL dereference of "ehci". This bug was introduced in: 796bcae7361c
+"USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]"
+
+I modified the few lines in front a little so that my code didn't
+obscure the return success code path.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-ppc-of.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/host/ehci-ppc-of.c
++++ b/drivers/usb/host/ehci-ppc-of.c
+@@ -192,17 +192,19 @@ ehci_hcd_ppc_of_probe(struct platform_de
+ }
+
+ rv = usb_add_hcd(hcd, irq, 0);
+- if (rv == 0)
+- return 0;
++ if (rv)
++ goto err_ehci;
+
++ return 0;
++
++err_ehci:
++ if (ehci->has_amcc_usb23)
++ iounmap(ehci->ohci_hcctrl_reg);
+ iounmap(hcd->regs);
+ err_ioremap:
+ irq_dispose_mapping(irq);
+ err_irq:
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+-
+- if (ehci->has_amcc_usb23)
+- iounmap(ehci->ohci_hcctrl_reg);
+ err_rmr:
+ usb_put_hcd(hcd);
+
diff --git a/usb.current/usb-fix-kernel-oops-with-g_ether-and-windows.patch b/usb.current/usb-fix-kernel-oops-with-g_ether-and-windows.patch
new file mode 100644
index 00000000000000..f4e0712bdef55a
--- /dev/null
+++ b/usb.current/usb-fix-kernel-oops-with-g_ether-and-windows.patch
@@ -0,0 +1,42 @@
+From linux-usb-owner@vger.kernel.org Wed Sep 1 12:45:40 2010
+Date: Sat, 21 Aug 2010 14:54:06 +0400
+Message-ID: <AANLkTinKBYzMwxEJarwN_HmKAORqJ7oiauj5JuXCo+rm@mail.gmail.com>
+Subject: USB: Fix kernel oops with g_ether and Windows
+From: Maxim Osipov <maxim.osipov@gmail.com>
+To: David Brownell <dbrownell@users.sourceforge.net>,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Maxim Osipov <maxim.osipov@gmail.com>,
+ linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
+
+
+Please find attached patch for
+https://bugzilla.kernel.org/show_bug.cgi?id=16023 problem.
+
+
+Signed-off-by: Maxim Osipov <maxim.osipov@gmail.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/rndis.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/gadget/rndis.c
++++ b/drivers/usb/gadget/rndis.c
+@@ -293,9 +293,13 @@ gen_ndis_query_resp (int configNr, u32 O
+ /* mandatory */
+ case OID_GEN_VENDOR_DESCRIPTION:
+ pr_debug("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__);
+- length = strlen (rndis_per_dev_params [configNr].vendorDescr);
+- memcpy (outbuf,
+- rndis_per_dev_params [configNr].vendorDescr, length);
++ if ( rndis_per_dev_params [configNr].vendorDescr ) {
++ length = strlen (rndis_per_dev_params [configNr].vendorDescr);
++ memcpy (outbuf,
++ rndis_per_dev_params [configNr].vendorDescr, length);
++ } else {
++ outbuf[0] = 0;
++ }
+ retval = 0;
+ break;
+
diff --git a/usb.current/usb-option-fix-incorrect-novatel-entries.patch b/usb.current/usb-option-fix-incorrect-novatel-entries.patch
new file mode 100644
index 00000000000000..06d2af208f29e1
--- /dev/null
+++ b/usb.current/usb-option-fix-incorrect-novatel-entries.patch
@@ -0,0 +1,172 @@
+From ddeschepper@nvtl.com Wed Sep 1 12:50:22 2010
+Subject: USB: option: fix incorrect novatel entries
+Date: Tue, 24 Aug 2010 20:38:35 +0100
+From: "Dirk De Schepper" <ddeschepper@nvtl.com>
+To: gregkh@suse.de
+Message-ID: <B29F014DE7B1F949B0BC4C1EBCF29DD67B0ECB@Vectra.nvtl.local>
+
+Unfortunately some of the hardware PID belonging to auto-install CDROM
+(AICD) of Novatel modems found their way into the option module. This
+causes the AICD to be treated as a modem in stead of a disk. Since the
+modem ports do not appear until after the AICD is ejected, this
+essentially disables the modem. After a couple of minutes the AICD
+should auto-eject, but it is just too long a wait. The frequency of the
+failure seems to depend on both the hardware and the linux distribution.
+
+Here is a patch that fixes this up, and also adds a couple of new PID,
+offering some explanations and removing some incomplete and unnecessary
+comments.
+
+Signed-off-by: Dirk De Schepper <ddeschepper@nvtl.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/option.c | 119 +++++++++++++++++++++++++++-----------------
+ 1 file changed, 75 insertions(+), 44 deletions(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -164,6 +164,14 @@ static void option_instat_callback(struc
+ #define YISO_VENDOR_ID 0x0EAB
+ #define YISO_PRODUCT_U893 0xC893
+
++/*
++ * NOVATEL WIRELESS PRODUCTS
++ *
++ * Note from Novatel Wireless:
++ * If your Novatel modem does not work on linux, don't
++ * change the option module, but check our website. If
++ * that does not help, contact ddeschepper@nvtl.com
++*/
+ /* MERLIN EVDO PRODUCTS */
+ #define NOVATELWIRELESS_PRODUCT_V640 0x1100
+ #define NOVATELWIRELESS_PRODUCT_V620 0x1110
+@@ -185,24 +193,39 @@ static void option_instat_callback(struc
+ #define NOVATELWIRELESS_PRODUCT_EU730 0x2400
+ #define NOVATELWIRELESS_PRODUCT_EU740 0x2410
+ #define NOVATELWIRELESS_PRODUCT_EU870D 0x2420
+-
+ /* OVATION PRODUCTS */
+ #define NOVATELWIRELESS_PRODUCT_MC727 0x4100
+ #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400
+-#define NOVATELWIRELESS_PRODUCT_U727 0x5010
+-#define NOVATELWIRELESS_PRODUCT_MC727_NEW 0x5100
+-#define NOVATELWIRELESS_PRODUCT_MC760 0x6000
++/*
++ * Note from Novatel Wireless:
++ * All PID in the 5xxx range are currently reserved for
++ * auto-install CDROMs, and should not be added to this
++ * module.
++ *
++ * #define NOVATELWIRELESS_PRODUCT_U727 0x5010
++ * #define NOVATELWIRELESS_PRODUCT_MC727_NEW 0x5100
++*/
+ #define NOVATELWIRELESS_PRODUCT_OVMC760 0x6002
+-
+-/* FUTURE NOVATEL PRODUCTS */
+-#define NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED 0X6001
+-#define NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED 0X7000
+-#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED 0X7001
+-#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED 0X8000
+-#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0X8001
+-#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0X9000
+-#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0X9001
+-#define NOVATELWIRELESS_PRODUCT_GLOBAL 0XA001
++#define NOVATELWIRELESS_PRODUCT_MC780 0x6010
++#define NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED 0x6000
++#define NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED 0x6001
++#define NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED 0x7000
++#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED 0x7001
++#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED3 0x7003
++#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED4 0x7004
++#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED5 0x7005
++#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED6 0x7006
++#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED7 0x7007
++#define NOVATELWIRELESS_PRODUCT_MC996D 0x7030
++#define NOVATELWIRELESS_PRODUCT_MF3470 0x7041
++#define NOVATELWIRELESS_PRODUCT_MC547 0x7042
++#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED 0x8000
++#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0x8001
++#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000
++#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001
++#define NOVATELWIRELESS_PRODUCT_G1 0xA001
++#define NOVATELWIRELESS_PRODUCT_G1_M 0xA002
++#define NOVATELWIRELESS_PRODUCT_G2 0xA010
+
+ /* AMOI PRODUCTS */
+ #define AMOI_VENDOR_ID 0x1614
+@@ -490,36 +513,44 @@ static const struct usb_device_id option
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) },
+ { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC) },
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, /* Novatel Merlin EX720/V740/X720 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V720) }, /* Novatel Merlin V720/S720/PC720 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U730) }, /* Novatel U730/U740 (VF version) */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U740) }, /* Novatel U740 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U870) }, /* Novatel U870 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_XU870) }, /* Novatel Merlin XU870 HSDPA/3G */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_X950D) }, /* Novatel X950D */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) }, /* Novatel EV620/ES620 CDMA/EV-DO */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) }, /* Novatel ES620/ES720/U720/USB720 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) }, /* Novatel E725/E726 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES620) }, /* Novatel Merlin ES620 SM Bus */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) }, /* Novatel EU730 and Vodafone EU740 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) }, /* Novatel non-Vodafone EU740 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727_NEW) }, /* Novatel MC727/U727/USB727 refresh */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC760) }, /* Novatel MC760/U760/USB760 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_OVMC760) }, /* Novatel Ovation MC760 */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED) }, /* Novatel HSPA Embedded product */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED) }, /* Novatel EVDO product */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED) }, /* Novatel HSPA product */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED) }, /* Novatel EVDO Embedded product */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED) }, /* Novatel HSPA Embedded product */
+- { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL) }, /* Novatel Global product */
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V720) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U730) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U740) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U870) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_XU870) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_X950D) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES620) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_OVMC760) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC780) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED3) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED4) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED5) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED6) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED7) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC996D) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MF3470) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC547) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1_M) },
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) },
+
+ { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) },
+ { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
diff --git a/usb.current/usb-rndis-section-mismatch-fix.patch b/usb.current/usb-rndis-section-mismatch-fix.patch
new file mode 100644
index 00000000000000..892b655ff42ac2
--- /dev/null
+++ b/usb.current/usb-rndis-section-mismatch-fix.patch
@@ -0,0 +1,49 @@
+From henne@nachtwindheim.de Wed Sep 1 12:44:37 2010
+From: Henrik Kretzschmar <henne@nachtwindheim.de>
+To: dbrownell@users.sourceforge.net
+Cc: gregkh@suse.de, davem@davemloft.net, eric.dumazet@gmail.com,
+ henne@nachtwindheim.de, tj@kernel.org, bniebuhr@efjohnson.com,
+ linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
+Subject: USB: rndis: section mismatch fix
+Date: Fri, 20 Aug 2010 19:57:50 +0200
+Message-Id: <1282327070-5100-1-git-send-email-henne@nachtwindheim.de>
+
+This patch removes the following section mismatch warning,
+by moving the function rndis_init() from .init.text to .text.
+
+WARNING: vmlinux.o(.text+0x1aeca5a): Section mismatch in reference from the function rndis_bind_config() to the function .init.text:rndis_init()
+The function rndis_bind_config() references
+the function __init rndis_init().
+This is often because rndis_bind_config lacks a __init
+annotation or the annotation of rndis_init is wrong.
+
+Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/rndis.c | 2 +-
+ drivers/usb/gadget/rndis.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/rndis.c
++++ b/drivers/usb/gadget/rndis.c
+@@ -1148,7 +1148,7 @@ static struct proc_dir_entry *rndis_conn
+ #endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+
+-int __init rndis_init (void)
++int rndis_init(void)
+ {
+ u8 i;
+
+--- a/drivers/usb/gadget/rndis.h
++++ b/drivers/usb/gadget/rndis.h
+@@ -262,7 +262,7 @@ int rndis_signal_disconnect (int config
+ int rndis_state (int configNr);
+ extern void rndis_set_host_mac (int configNr, const u8 *addr);
+
+-int __devinit rndis_init (void);
++int rndis_init(void);
+ void rndis_exit (void);
+
+ #endif /* _LINUX_RNDIS_H */
diff --git a/usb.current/usb-s3c-hsotg-remove-debug-define.patch b/usb.current/usb-s3c-hsotg-remove-debug-define.patch
new file mode 100644
index 00000000000000..79a2a4ede123d5
--- /dev/null
+++ b/usb.current/usb-s3c-hsotg-remove-debug-define.patch
@@ -0,0 +1,29 @@
+From mcuelenaere@gmail.com Wed Sep 1 12:41:09 2010
+Message-ID: <4c659d1c.487e0e0a.037b.ffffcf6a@mx.google.com>
+Date: Fri, 13 Aug 2010 21:29:30 +0200
+From: Maurus Cuelenaere <mcuelenaere@gmail.com>
+Subject: USB: s3c-hsotg: Remove DEBUG define
+To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org
+Cc: ben-linux@fluff.org, dbrownell@users.sourceforge.net,
+ gregkh@suse.de
+
+DEBUG is defined unconditionally, remove it as this clutters the message log.
+
+Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/s3c-hsotg.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/usb/gadget/s3c-hsotg.c
++++ b/drivers/usb/gadget/s3c-hsotg.c
+@@ -12,8 +12,6 @@
+ * published by the Free Software Foundation.
+ */
+
+-#define DEBUG
+-
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/spinlock.h>
diff --git a/usb.current/usb-ssu100-turn-off-debug-flag.patch b/usb.current/usb-ssu100-turn-off-debug-flag.patch
new file mode 100644
index 00000000000000..64aea33b845cf6
--- /dev/null
+++ b/usb.current/usb-ssu100-turn-off-debug-flag.patch
@@ -0,0 +1,27 @@
+From wfp5p@viridian.itc.virginia.edu Wed Sep 1 13:03:28 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: greg@kroah.com
+Subject: USB: ssu100: turn off debug flag
+Date: Wed, 25 Aug 2010 18:21:23 -0400
+Message-Id: <1282774883-26018-1-git-send-email-wfp5p@virginia.edu>
+
+Remove the hard coding of the debug flag to 1.
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -46,7 +46,7 @@
+ #define FULLPWRBIT 0x00000080
+ #define NEXT_BOARD_POWER_BIT 0x00000004
+
+-static int debug = 1;
++static int debug;
+
+ /* Version Information */
+ #define DRIVER_VERSION "v0.1"
diff --git a/usb/usb-core-update-comment-to-match-current-function-name.patch b/usb/usb-core-update-comment-to-match-current-function-name.patch
new file mode 100644
index 00000000000000..abc9ca8cb47a37
--- /dev/null
+++ b/usb/usb-core-update-comment-to-match-current-function-name.patch
@@ -0,0 +1,28 @@
+From w.sang@pengutronix.de Wed Sep 1 13:01:41 2010
+From: Wolfram Sang <w.sang@pengutronix.de>
+To: linux-usb@vger.kernel.org
+Cc: Wolfram Sang <w.sang@pengutronix.de>, Greg KH <gregkh@suse.de>
+Subject: USB: core: update comment to match current function name
+Date: Sun, 29 Aug 2010 18:17:14 +0200
+Message-Id: <1283098634-17986-1-git-send-email-w.sang@pengutronix.de>
+
+Found while debugging a USB problem and trying to find the mentioned function.
+
+Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hub.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -3629,7 +3629,7 @@ static int usb_reset_and_verify_device(s
+ }
+
+ if (!parent_hdev) {
+- /* this requires hcd-specific logic; see OHCI hc_restart() */
++ /* this requires hcd-specific logic; see ohci_restart() */
+ dev_dbg(&udev->dev, "%s for root hub!\n", __func__);
+ return -EISDIR;
+ }
diff --git a/usb/usb-gadget-dbgp-cleanup-remove-unneeded-check.patch b/usb/usb-gadget-dbgp-cleanup-remove-unneeded-check.patch
new file mode 100644
index 00000000000000..423fdf8916189e
--- /dev/null
+++ b/usb/usb-gadget-dbgp-cleanup-remove-unneeded-check.patch
@@ -0,0 +1,48 @@
+From linux-usb-owner@vger.kernel.org Wed Sep 1 12:39:47 2010
+Date: Thu, 12 Aug 2010 09:40:30 +0200
+From: Dan Carpenter <error27@gmail.com>
+To: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Greg Kroah-Hartman <gregkh@suse.de>,
+ Stephane Duverger <stephane.duverger@gmail.com>,
+ linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org
+Subject: USB: gadget: dbgp: cleanup: remove unneeded check
+Message-ID: <20100812074030.GG645@bicker>
+
+len is always greater than or equal to zero here. First of all, it's
+type is unsigned and also we only assign it numbers which are greater
+than or equal to zero.
+
+Removing the check lets us pull everything in an indent level.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Acked-by: Stephane duverger <stephane.duverger@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/dbgp.c | 14 ++++++--------
+ 1 file changed, 6 insertions(+), 8 deletions(-)
+
+--- a/drivers/usb/gadget/dbgp.c
++++ b/drivers/usb/gadget/dbgp.c
+@@ -386,15 +386,13 @@ static int dbgp_setup(struct usb_gadget
+ } else
+ goto fail;
+
+- if (len >= 0) {
+- req->length = min(length, len);
+- req->zero = len < req->length;
+- if (data && req->length)
+- memcpy(req->buf, data, req->length);
++ req->length = min(length, len);
++ req->zero = len < req->length;
++ if (data && req->length)
++ memcpy(req->buf, data, req->length);
+
+- req->complete = dbgp_setup_complete;
+- return usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
+- }
++ req->complete = dbgp_setup_complete;
++ return usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
+
+ fail:
+ dev_dbg(&dbgp.gadget->dev,
diff --git a/usb/usb-gadget-verify-vbus-current-before-setting-the-device-self-powered-bit.patch b/usb/usb-gadget-verify-vbus-current-before-setting-the-device-self-powered-bit.patch
new file mode 100644
index 00000000000000..7e876a76004cf3
--- /dev/null
+++ b/usb/usb-gadget-verify-vbus-current-before-setting-the-device-self-powered-bit.patch
@@ -0,0 +1,59 @@
+From linux-usb-owner@vger.kernel.org Wed Sep 1 12:48:46 2010
+From: Praveena Nadahally <praveen.nadahally@stericsson.com>
+To: <linux-usb@vger.kernel.org>
+Cc: <STEricsson_nomadik_linux@list.st.com>,
+ <linus.walleij@stericsson.com>, <dbrownell@users.sourceforge.net>,
+ Parirajan Muthalagu <parirajan.muthalagu@stericsson.com>,
+ Praveena Nadahally <praveen.nadahally@stericsson.com>
+Subject: USB Gadget: Verify VBUS current before setting the device self-powered bit
+Date: Wed, 25 Aug 2010 16:33:26 +0530
+Message-ID: <1282734206-29760-1-git-send-email-praveen.nadahally@stericsson.com>
+
+From: Parirajan Muthalagu <parirajan.muthalagu@stericsson.com>
+
+
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Acked-by: Linus Walleij <linus.walleij@stericsson.com>
+Signed-off-by: Praveena Nadahally <praveen.nadahally@stericsson.com>
+Signed-off-by: Parirajan Muthalagu <parirajan.muthalagu@stericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/composite.c | 8 +++++++-
+ include/linux/usb/ch9.h | 10 ++++++++++
+ 2 files changed, 17 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/composite.c
++++ b/drivers/usb/gadget/composite.c
+@@ -1074,7 +1074,13 @@ static int composite_bind(struct usb_gad
+ cdev->bufsiz = USB_BUFSIZ;
+ cdev->driver = composite;
+
+- usb_gadget_set_selfpowered(gadget);
++ /*
++ * As per USB compliance update, a device that is actively drawing
++ * more than 100mA from USB must report itself as bus-powered in
++ * the GetStatus(DEVICE) call.
++ */
++ if (CONFIG_USB_GADGET_VBUS_DRAW <= USB_SELF_POWER_VBUS_MAX_DRAW)
++ usb_gadget_set_selfpowered(gadget);
+
+ /* interface and string IDs start at zero via kzalloc.
+ * we force endpoints to start unassigned; few controller
+--- a/include/linux/usb/ch9.h
++++ b/include/linux/usb/ch9.h
+@@ -808,4 +808,14 @@ enum usb_device_state {
+ */
+ };
+
++/*-------------------------------------------------------------------------*/
++
++/*
++ * As per USB compliance update, a device that is actively drawing
++ * more than 100mA from USB must report itself as bus-powered in
++ * the GetStatus(DEVICE) call.
++ * http://compliance.usb.org/index.asp?UpdateFile=Electrical&Format=Standard#34
++ */
++#define USB_SELF_POWER_VBUS_MAX_DRAW 100
++
+ #endif /* __LINUX_USB_CH9_H */
diff --git a/usb/usb-sam-ba-add-driver-for-atmel-sam-boot-assistant-sam-ba.patch b/usb/usb-sam-ba-add-driver-for-atmel-sam-boot-assistant-sam-ba.patch
new file mode 100644
index 00000000000000..ac26d9bb5beca8
--- /dev/null
+++ b/usb/usb-sam-ba-add-driver-for-atmel-sam-boot-assistant-sam-ba.patch
@@ -0,0 +1,265 @@
+From jhovold@gmail.com Wed Sep 1 12:43:52 2010
+From: Johan Hovold <jhovold@gmail.com>
+To: Greg KH <greg@kroah.com>
+Cc: Alexander Stein <alexander.stein@systec-electronic.com>,
+ David VomLehn <dvomlehn@cisco.com>,
+ linux-usb@vger.kernel.org,
+ Johan Hovold <jhovold@gmail.com>
+Subject: USB: sam-ba: add driver for Atmel SAM Boot Assistant (SAM-BA)
+Date: Thu, 19 Aug 2010 00:13:48 +0200
+Message-Id: <1282169628-15136-1-git-send-email-jhovold@gmail.com>
+
+Add new driver to access the SAM-BA boot application of Atmel AT91SAM
+devices.
+
+The SAM-BA firmware cannot handle merged write requests so we cannot use
+the generic write implementation (which uses the port write fifo).
+
+Tested with the SAM-BA 2.10 tools and an Atmel at91sam9260-ek.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/Kconfig | 9 +
+ drivers/usb/serial/Makefile | 1
+ drivers/usb/serial/sam-ba.c | 206 ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 216 insertions(+)
+
+--- a/drivers/usb/serial/Kconfig
++++ b/drivers/usb/serial/Kconfig
+@@ -527,6 +527,15 @@ config USB_SERIAL_SAFE_PADDED
+ bool "USB Secure Encapsulated Driver - Padded"
+ depends on USB_SERIAL_SAFE
+
++config USB_SERIAL_SAMBA
++ tristate "USB Atmel SAM Boot Assistant (SAM-BA) driver"
++ help
++ Say Y here if you want to access the SAM-BA boot application of an
++ Atmel AT91SAM device.
++
++ To compile this driver as a module, choose M here: the
++ module will be called sam-ba.
++
+ config USB_SERIAL_SIEMENS_MPI
+ tristate "USB Siemens MPI driver"
+ help
+--- a/drivers/usb/serial/Makefile
++++ b/drivers/usb/serial/Makefile
+@@ -48,6 +48,7 @@ obj-$(CONFIG_USB_SERIAL_PL2303) += pl2
+ obj-$(CONFIG_USB_SERIAL_QCAUX) += qcaux.o
+ obj-$(CONFIG_USB_SERIAL_QUALCOMM) += qcserial.o
+ obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o
++obj-$(CONFIG_USB_SERIAL_SAMBA) += sam-ba.o
+ obj-$(CONFIG_USB_SERIAL_SIEMENS_MPI) += siemens_mpi.o
+ obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o
+ obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o
+--- /dev/null
++++ b/drivers/usb/serial/sam-ba.c
+@@ -0,0 +1,206 @@
++/*
++ * Atmel SAM Boot Assistant (SAM-BA) driver
++ *
++ * Copyright (C) 2010 Johan Hovold <jhovold@gmail.com>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License version
++ * 2 as published by the Free Software Foundation.
++ */
++
++#include <linux/kernel.h>
++#include <linux/tty.h>
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/usb.h>
++#include <linux/usb/serial.h>
++
++
++#define DRIVER_VERSION "v1.0"
++#define DRIVER_AUTHOR "Johan Hovold <jhovold@gmail.com>"
++#define DRIVER_DESC "Atmel SAM Boot Assistant (SAM-BA) driver"
++
++#define SAMBA_VENDOR_ID 0x3eb
++#define SAMBA_PRODUCT_ID 0x6124
++
++
++static int debug;
++
++static const struct usb_device_id id_table[] = {
++ /*
++ * NOTE: Only match the CDC Data interface.
++ */
++ { USB_DEVICE_AND_INTERFACE_INFO(SAMBA_VENDOR_ID, SAMBA_PRODUCT_ID,
++ USB_CLASS_CDC_DATA, 0, 0) },
++ { }
++};
++MODULE_DEVICE_TABLE(usb, id_table);
++
++static struct usb_driver samba_driver = {
++ .name = "sam-ba",
++ .probe = usb_serial_probe,
++ .disconnect = usb_serial_disconnect,
++ .id_table = id_table,
++ .no_dynamic_id = 1,
++};
++
++
++/*
++ * NOTE: The SAM-BA firmware cannot handle merged write requests so we cannot
++ * use the generic write implementation (which uses the port write fifo).
++ */
++static int samba_write(struct tty_struct *tty, struct usb_serial_port *port,
++ const unsigned char *buf, int count)
++{
++ struct urb *urb;
++ unsigned long flags;
++ int result;
++ int i;
++
++ if (!count)
++ return 0;
++
++ count = min_t(int, count, port->bulk_out_size);
++
++ spin_lock_irqsave(&port->lock, flags);
++ if (!port->write_urbs_free) {
++ spin_unlock_irqrestore(&port->lock, flags);
++ return 0;
++ }
++ i = find_first_bit(&port->write_urbs_free,
++ ARRAY_SIZE(port->write_urbs));
++ __clear_bit(i, &port->write_urbs_free);
++ port->tx_bytes += count;
++ spin_unlock_irqrestore(&port->lock, flags);
++
++ urb = port->write_urbs[i];
++ memcpy(urb->transfer_buffer, buf, count);
++ urb->transfer_buffer_length = count;
++ usb_serial_debug_data(debug, &port->dev, __func__, count,
++ urb->transfer_buffer);
++ result = usb_submit_urb(urb, GFP_ATOMIC);
++ if (result) {
++ dev_err(&port->dev, "%s - error submitting urb: %d\n",
++ __func__, result);
++ spin_lock_irqsave(&port->lock, flags);
++ __set_bit(i, &port->write_urbs_free);
++ port->tx_bytes -= count;
++ spin_unlock_irqrestore(&port->lock, flags);
++
++ return result;
++ }
++
++ return count;
++}
++
++static int samba_write_room(struct tty_struct *tty)
++{
++ struct usb_serial_port *port = tty->driver_data;
++ unsigned long flags;
++ unsigned long free;
++ int count;
++ int room;
++
++ spin_lock_irqsave(&port->lock, flags);
++ free = port->write_urbs_free;
++ spin_unlock_irqrestore(&port->lock, flags);
++
++ count = hweight_long(free);
++ room = count * port->bulk_out_size;
++
++ dbg("%s - returns %d", __func__, room);
++
++ return room;
++}
++
++static int samba_chars_in_buffer(struct tty_struct *tty)
++{
++ struct usb_serial_port *port = tty->driver_data;
++ unsigned long flags;
++ int chars;
++
++ spin_lock_irqsave(&port->lock, flags);
++ chars = port->tx_bytes;
++ spin_unlock_irqrestore(&port->lock, flags);
++
++ dbg("%s - returns %d", __func__, chars);
++
++ return chars;
++}
++
++static void samba_write_bulk_callback(struct urb *urb)
++{
++ struct usb_serial_port *port = urb->context;
++ unsigned long flags;
++ int i;
++
++ dbg("%s - port %d", __func__, port->number);
++
++ for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i) {
++ if (port->write_urbs[i] == urb)
++ break;
++ }
++ spin_lock_irqsave(&port->lock, flags);
++ __set_bit(i, &port->write_urbs_free);
++ port->tx_bytes -= urb->transfer_buffer_length;
++ spin_unlock_irqrestore(&port->lock, flags);
++
++ if (urb->status)
++ dbg("%s - non-zero urb status: %d", __func__, urb->status);
++
++ usb_serial_port_softint(port);
++}
++
++static struct usb_serial_driver samba_device = {
++ .driver = {
++ .owner = THIS_MODULE,
++ .name = "sam-ba",
++ },
++ .usb_driver = &samba_driver,
++ .id_table = id_table,
++ .num_ports = 1,
++ .bulk_in_size = 512,
++ .bulk_out_size = 2048,
++ .write = samba_write,
++ .write_room = samba_write_room,
++ .chars_in_buffer = samba_chars_in_buffer,
++ .write_bulk_callback = samba_write_bulk_callback,
++ .throttle = usb_serial_generic_throttle,
++ .unthrottle = usb_serial_generic_unthrottle,
++};
++
++static int __init samba_init(void)
++{
++ int retval;
++
++ retval = usb_serial_register(&samba_device);
++ if (retval)
++ return retval;
++
++ retval = usb_register(&samba_driver);
++ if (retval) {
++ usb_serial_deregister(&samba_device);
++ return retval;
++ }
++
++ printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ": "
++ DRIVER_DESC "\n");
++ return 0;
++}
++
++static void __exit samba_exit(void)
++{
++ usb_deregister(&samba_driver);
++ usb_serial_deregister(&samba_device);
++}
++
++module_init(samba_init);
++module_exit(samba_exit);
++
++MODULE_AUTHOR(DRIVER_AUTHOR);
++MODULE_DESCRIPTION(DRIVER_DESC);
++MODULE_VERSION(DRIVER_VERSION);
++MODULE_LICENSE("GPL");
++
++module_param(debug, bool, S_IRUGO | S_IWUSR);
++MODULE_PARM_DESC(debug, "Enable verbose debugging messages");