aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-09-24 10:09:35 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-24 10:09:35 -0700
commit531654809bd4718f6804e19b075a5cb005cf750e (patch)
treef3f65e516a8137025bf248fc1c7e34548af5ce74
parent1aad7fb88d76b618460fbfd584d12193ed4ae3a0 (diff)
downloadpatches-531654809bd4718f6804e19b075a5cb005cf750e.tar.gz
some more patches
-rw-r--r--series9
-rw-r--r--tty/8250-pm-callback-for-platform-uarts.patch100
-rw-r--r--tty/alchemy-uart-pm-through-serial-framework.patch123
-rw-r--r--tty/tty-add-a-new-file-proc-tty-consoles.patch253
-rw-r--r--tty/tty-fix-warning-left-over-from-tiocgicount-changes.patch25
-rw-r--r--usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch1
-rw-r--r--usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch36
-rw-r--r--usb/usb-cdc.h-ncm-fix-one-more-typo.patch35
-rw-r--r--usb/usb-qcserial-enable-diagnostics-monitor-and-gps-ports-on-gobi-2000.patch90
9 files changed, 672 insertions, 0 deletions
diff --git a/series b/series
index bb2447605fe75a..9787c87096d2b9 100644
--- a/series
+++ b/series
@@ -27,6 +27,7 @@ usb.current/usb-musb-gadget-complete-request-only-if-data-is-transfered-over.pat
usb.current/usb-musb-gadget-fix-dma-length-in-txstate.patch
usb.current/usb-musb-host-issue-a-memory-barrier-before-starting-dma.patch
usb.current/usb-musb-gadget-restart-request-on-clearing-endpoint-halt.patch
+usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch
#################################
@@ -96,6 +97,10 @@ tty/serial-max3107-fix-memory-leaks-when-returning-on-error.patch
tty/tty-make-tiocgicount-a-handler.patch
tty/tty-convert-the-usb-drivers-to-the-new-icount-interface.patch
tty/tty-icount-changeover-for-other-main-devices.patch
+tty/tty-fix-warning-left-over-from-tiocgicount-changes.patch
+tty/8250-pm-callback-for-platform-uarts.patch
+tty/alchemy-uart-pm-through-serial-framework.patch
+tty/tty-add-a-new-file-proc-tty-consoles.patch
###################################
# USB stuff for after 2.6.36 is out
@@ -155,8 +160,12 @@ usb/usb-cdc.h-ncm-add-missed-constants-and-structures.patch
usb/usb-atmel_usba_udc-force-vbus_pin-at-einval-when-gpio_request-failled.patch
usb/usb-serial-enable-usb-autosuspend-by-default-on-qcserial.patch
usb/usb-ftdi_sio-revert-usb-ftdi_sio-fix-dtr-rts-line-modes.patch
+usb/usb-cdc.h-ncm-fix-one-more-typo.patch
+usb/usb-qcserial-enable-diagnostics-monitor-and-gps-ports-on-gobi-2000.patch
# staging stuff for next is now in the staging-next tree on git.kernel.org
+
+
diff --git a/tty/8250-pm-callback-for-platform-uarts.patch b/tty/8250-pm-callback-for-platform-uarts.patch
new file mode 100644
index 00000000000000..e1e14644b73e5c
--- /dev/null
+++ b/tty/8250-pm-callback-for-platform-uarts.patch
@@ -0,0 +1,100 @@
+From manuel.lauss@googlemail.com Fri Sep 24 09:43:36 2010
+From: Manuel Lauss <manuel.lauss@googlemail.com>
+To: linux-serial@vger.kernel.org
+Cc: Greg KH <greg@kroah.com>,
+ Andrew Morton <akpm@linux-foundation.org>,
+ Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ Manuel Lauss <manuel.lauss@googlemail.com>
+Subject: 8250: pm callback for platform uarts
+Date: Fri, 24 Sep 2010 18:13:28 +0200
+Message-Id: <1285344809-16839-1-git-send-email-manuel.lauss@googlemail.com>
+
+The 8250 driver provides in its uart_ops a pm callback which in turn
+handles 8250 pm and, if it exists, calls a private callback.
+However there's no way for platform 8250 devices to assign anything
+to this callback.
+
+This patch adds a new pm field to the plat_8250_port and uart_port
+structures and modifies the 8250 pm callback to call the platform
+method before powering up and after powering down (if the platform
+is capable of cutting power/clks to the block).
+
+Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
+Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/8250.c | 15 +++++++--------
+ include/linux/serial_8250.h | 2 ++
+ include/linux/serial_core.h | 2 ++
+ 3 files changed, 11 insertions(+), 8 deletions(-)
+
+--- a/drivers/serial/8250.c
++++ b/drivers/serial/8250.c
+@@ -154,12 +154,6 @@ struct uart_8250_port {
+ unsigned char lsr_saved_flags;
+ #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA
+ unsigned char msr_saved_flags;
+-
+- /*
+- * We provide a per-port pm hook.
+- */
+- void (*pm)(struct uart_port *port,
+- unsigned int state, unsigned int old);
+ };
+
+ struct irq_info {
+@@ -2446,10 +2440,13 @@ serial8250_pm(struct uart_port *port, un
+ {
+ struct uart_8250_port *p = (struct uart_8250_port *)port;
+
++ if ((p->port.pm) && (state == 0)) /* power up: call platform first */
++ p->port.pm(port, state, oldstate);
++
+ serial8250_set_sleep(p, state != 0);
+
+- if (p->pm)
+- p->pm(port, state, oldstate);
++ if ((p->port.pm) && (state != 0)) /* power down */
++ p->port.pm(port, state, oldstate);
+ }
+
+ static unsigned int serial8250_port_size(struct uart_8250_port *pt)
+@@ -3010,6 +3007,7 @@ static int __devinit serial8250_probe(st
+ port.serial_in = p->serial_in;
+ port.serial_out = p->serial_out;
+ port.set_termios = p->set_termios;
++ port.pm = p->pm;
+ port.dev = &dev->dev;
+ port.irqflags |= irqflag;
+ ret = serial8250_register_port(&port);
+@@ -3161,6 +3159,7 @@ int serial8250_register_port(struct uart
+ uart->port.flags = port->flags | UPF_BOOT_AUTOCONF;
+ uart->port.mapbase = port->mapbase;
+ uart->port.private_data = port->private_data;
++ uart->port.pm = port->pm;
+ if (port->dev)
+ uart->port.dev = port->dev;
+
+--- a/include/linux/serial_8250.h
++++ b/include/linux/serial_8250.h
+@@ -35,6 +35,8 @@ struct plat_serial8250_port {
+ void (*set_termios)(struct uart_port *,
+ struct ktermios *new,
+ struct ktermios *old);
++ void (*pm)(struct uart_port *, unsigned int state,
++ unsigned old);
+ };
+
+ /*
+--- a/include/linux/serial_core.h
++++ b/include/linux/serial_core.h
+@@ -289,6 +289,8 @@ struct uart_port {
+ void (*set_termios)(struct uart_port *,
+ struct ktermios *new,
+ struct ktermios *old);
++ void (*pm)(struct uart_port *, unsigned int state,
++ unsigned int old);
+ unsigned int irq; /* irq number */
+ unsigned long irqflags; /* irq flags */
+ unsigned int uartclk; /* base uart clock */
diff --git a/tty/alchemy-uart-pm-through-serial-framework.patch b/tty/alchemy-uart-pm-through-serial-framework.patch
new file mode 100644
index 00000000000000..f7ef77c2e51c1e
--- /dev/null
+++ b/tty/alchemy-uart-pm-through-serial-framework.patch
@@ -0,0 +1,123 @@
+From manuel.lauss@googlemail.com Fri Sep 24 09:43:55 2010
+From: Manuel Lauss <manuel.lauss@googlemail.com>
+To: linux-serial@vger.kernel.org
+Cc: Greg KH <greg@kroah.com>,
+ Andrew Morton <akpm@linux-foundation.org>,
+ Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ Manuel Lauss <manuel.lauss@googlemail.com>
+Subject: Alchemy: UART PM through serial framework.
+Date: Fri, 24 Sep 2010 18:13:29 +0200
+Message-Id: <1285344809-16839-2-git-send-email-manuel.lauss@googlemail.com>
+
+Hook up the Alchemy on-chip uarts with the platform 8250 PM callback and
+enable/disable clocks to the uart blocks as needed. This also allows to
+get rid of the UART1 PM hack in the Alchemy PM code.
+
+Tested on Au1200.
+
+Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
+Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/mips/alchemy/common/platform.c | 23 +++++++++++++++++++++++
+ arch/mips/alchemy/common/power.c | 35 -----------------------------------
+ 2 files changed, 23 insertions(+), 35 deletions(-)
+
+--- a/arch/mips/alchemy/common/platform.c
++++ b/arch/mips/alchemy/common/platform.c
+@@ -24,6 +24,28 @@
+
+ #include <prom.h>
+
++static void alchemy_8250_pm(struct uart_port *port, unsigned int state,
++ unsigned int old_state)
++{
++ switch (state) {
++ case 0:
++ if ((__raw_readl(port->membase + UART_MOD_CNTRL) & 3) != 3) {
++ /* power-on sequence as suggested in the databooks */
++ __raw_writel(0, port->membase + UART_MOD_CNTRL);
++ wmb();
++ __raw_writel(1, port->membase + UART_MOD_CNTRL);
++ wmb();
++ }
++ __raw_writel(3, port->membase + UART_MOD_CNTRL); /* full on */
++ wmb();
++ break;
++ case 3: /* power off */
++ __raw_writel(0, port->membase + UART_MOD_CNTRL);
++ wmb();
++ break;
++ }
++}
++
+ #define PORT(_base, _irq) \
+ { \
+ .mapbase = _base, \
+@@ -33,6 +55,7 @@
+ .flags = UPF_SKIP_TEST | UPF_IOREMAP | \
+ UPF_FIXED_TYPE, \
+ .type = PORT_16550A, \
++ .pm = alchemy_8250_pm, \
+ }
+
+ static struct plat_serial8250_port au1x00_uart_data[] = {
+--- a/arch/mips/alchemy/common/power.c
++++ b/arch/mips/alchemy/common/power.c
+@@ -49,11 +49,6 @@
+ * We only have to save/restore registers that aren't otherwise
+ * done as part of a driver pm_* function.
+ */
+-static unsigned int sleep_uart0_inten;
+-static unsigned int sleep_uart0_fifoctl;
+-static unsigned int sleep_uart0_linectl;
+-static unsigned int sleep_uart0_clkdiv;
+-static unsigned int sleep_uart0_enable;
+ static unsigned int sleep_usb[2];
+ static unsigned int sleep_sys_clocks[5];
+ static unsigned int sleep_sys_pinfunc;
+@@ -62,22 +57,6 @@ static unsigned int sleep_static_memctlr
+
+ static void save_core_regs(void)
+ {
+- extern void save_au1xxx_intctl(void);
+- extern void pm_eth0_shutdown(void);
+-
+- /*
+- * Do the serial ports.....these really should be a pm_*
+- * registered function by the driver......but of course the
+- * standard serial driver doesn't understand our Au1xxx
+- * unique registers.
+- */
+- sleep_uart0_inten = au_readl(UART0_ADDR + UART_IER);
+- sleep_uart0_fifoctl = au_readl(UART0_ADDR + UART_FCR);
+- sleep_uart0_linectl = au_readl(UART0_ADDR + UART_LCR);
+- sleep_uart0_clkdiv = au_readl(UART0_ADDR + UART_CLK);
+- sleep_uart0_enable = au_readl(UART0_ADDR + UART_MOD_CNTRL);
+- au_sync();
+-
+ #ifndef CONFIG_SOC_AU1200
+ /* Shutdown USB host/device. */
+ sleep_usb[0] = au_readl(USB_HOST_CONFIG);
+@@ -175,20 +154,6 @@ static void restore_core_regs(void)
+ au_writel(sleep_static_memctlr[3][0], MEM_STCFG3);
+ au_writel(sleep_static_memctlr[3][1], MEM_STTIME3);
+ au_writel(sleep_static_memctlr[3][2], MEM_STADDR3);
+-
+- /*
+- * Enable the UART if it was enabled before sleep.
+- * I guess I should define module control bits........
+- */
+- if (sleep_uart0_enable & 0x02) {
+- au_writel(0, UART0_ADDR + UART_MOD_CNTRL); au_sync();
+- au_writel(1, UART0_ADDR + UART_MOD_CNTRL); au_sync();
+- au_writel(3, UART0_ADDR + UART_MOD_CNTRL); au_sync();
+- au_writel(sleep_uart0_inten, UART0_ADDR + UART_IER); au_sync();
+- au_writel(sleep_uart0_fifoctl, UART0_ADDR + UART_FCR); au_sync();
+- au_writel(sleep_uart0_linectl, UART0_ADDR + UART_LCR); au_sync();
+- au_writel(sleep_uart0_clkdiv, UART0_ADDR + UART_CLK); au_sync();
+- }
+ }
+
+ void au_sleep(void)
diff --git a/tty/tty-add-a-new-file-proc-tty-consoles.patch b/tty/tty-add-a-new-file-proc-tty-consoles.patch
new file mode 100644
index 00000000000000..a7950df1ba18af
--- /dev/null
+++ b/tty/tty-add-a-new-file-proc-tty-consoles.patch
@@ -0,0 +1,253 @@
+From werner@suse.de Fri Sep 24 09:45:02 2010
+Date: Wed, 22 Sep 2010 12:45:40 +0200
+From: "Dr. Werner Fink" <werner@suse.de>
+To: Randy Dunlap <randy.dunlap@oracle.com>
+Cc: Greg KH <gregkh@suse.de>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ linux-kernel@vger.kernel.org, linux-api@vger.kernel.org
+Subject: tty: Add a new file /proc/tty/consoles
+Message-ID: <20100922104540.GA14008@boole.suse.de>
+Content-Disposition: inline
+
+Add a new file /proc/tty/consoles to be able to determine the registered
+system console lines. If the reading process holds /dev/console open at
+the regular standard input stream the active device will be marked by an
+asterisk. Show possible operations and also decode the used flags of
+the listed console lines.
+
+Signed-off-by: Werner Fink <werner@suse.de>
+Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/filesystems/proc.txt | 32 +++++++
+ fs/proc/proc_tty.c | 158 +++++++++++++++++++++++++++++++++++++
+ 2 files changed, 190 insertions(+)
+
+--- a/Documentation/filesystems/proc.txt
++++ b/Documentation/filesystems/proc.txt
+@@ -1075,6 +1075,7 @@ Table 1-11: Files in /proc/tty
+ drivers list of drivers and their usage
+ ldiscs registered line disciplines
+ driver/serial usage statistic and status of single tty lines
++ consoles registered system console lines
+ ..............................................................................
+
+ To see which tty's are currently in use, you can simply look into the file
+@@ -1093,6 +1094,37 @@ To see which tty's are currently in
+ /dev/tty /dev/tty 5 0 system:/dev/tty
+ unknown /dev/tty 4 1-63 console
+
++To see which character device lines are currently used for the system console
++/dev/console, you may simply look into the file /proc/tty/consoles:
++
++ > cat /proc/tty/consoles
++ tty0 -WU (ECp) 4:7
++ ttyS0 -W- (Ep) 4:64
++
++The columns are:
++
++ device name of the device
++ operations R = can do read operations
++ W = can do write operations
++ U = can do unblank
++ flags E = it is enabled
++ C = it is prefered console
++ B = it is primary boot console
++ p = it is used for printk buffer
++ b = it is not a TTY but a Braille device
++ a = it is safe to use when cpu is offline
++ * = it is standard input of the reading process
++ major:minor major and minor number of the device separated by a colon
++
++If the reading process holds /dev/console open at the regular standard input
++stream the active device will be marked by an asterisk:
++
++ > cat /proc/tty/consoles < /dev/console
++ tty0 -WU (ECp*) 4:7
++ ttyS0 -W- (Ep) 4:64
++ > tty
++ /dev/pts/3
++
+
+ 1.8 Miscellaneous kernel statistics in /proc/stat
+ -------------------------------------------------
+--- a/fs/proc/proc_tty.c
++++ b/fs/proc/proc_tty.c
+@@ -12,7 +12,10 @@
+ #include <linux/proc_fs.h>
+ #include <linux/stat.h>
+ #include <linux/tty.h>
++#include <linux/tty_driver.h>
++#include <linux/console.h>
+ #include <linux/seq_file.h>
++#include <linux/fdtable.h>
+ #include <linux/bitops.h>
+
+ /*
+@@ -137,6 +140,160 @@ static const struct file_operations proc
+ };
+
+ /*
++ * The device ID of file descriptor 0 of the current reading
++ * task if a character device...
++ */
++static dev_t current_dev;
++
++/*
++ * This is the handler for /proc/tty/consoles
++ */
++static int show_console_dev(struct seq_file *m, void *v)
++{
++ const struct tty_driver *driver;
++ struct console *con;
++ int index, len;
++ char flags[10];
++ dev_t dev;
++
++ if (v == SEQ_START_TOKEN)
++ return 0;
++ con = (struct console *)v;
++ if (!con)
++ return 0;
++ driver = con->device(con, &index);
++ if (!driver)
++ return 0;
++ dev = MKDEV(driver->major, driver->minor_start) + index;
++
++ index = 0;
++ if (con->flags & CON_ENABLED)
++ flags[index++] = 'E';
++ if (con->flags & CON_CONSDEV)
++ flags[index++] = 'C';
++ if (con->flags & CON_BOOT)
++ flags[index++] = 'B';
++ if (con->flags & CON_PRINTBUFFER)
++ flags[index++] = 'p';
++ if (con->flags & CON_BRL)
++ flags[index++] = 'b';
++ if (con->flags & CON_ANYTIME)
++ flags[index++] = 'a';
++ if (current_dev == dev)
++ flags[index++] = '*';
++ flags[index] = 0;
++
++ seq_printf(m, "%s%d%n", con->name, con->index, &len);
++ len = 21 - len;
++ if (len < 1)
++ len = 1;
++ seq_printf(m, "%*c", len, ' ');
++ seq_printf(m, "%c%c%c (%s)%n", con->read ? 'R' : '-',
++ con->write ? 'W' : '-', con->unblank ? 'U' : '-',
++ flags, &len);
++ len = 13 - len;
++ if (len < 1)
++ len = 1;
++ seq_printf(m, "%*c%4d:%d\n", len, ' ', MAJOR(dev), MINOR(dev));
++
++ return 0;
++}
++
++/* iterator for consoles */
++static void *c_start(struct seq_file *m, loff_t *pos)
++{
++ struct console *con;
++ loff_t off = 0;
++
++ if (*pos == 0)
++ return SEQ_START_TOKEN;
++
++ acquire_console_sem();
++ for (con = console_drivers; con; con = con->next) {
++ if (!con->device)
++ continue;
++ if (++off == *pos)
++ break;
++ }
++ release_console_sem();
++
++ return con;
++}
++
++static void *c_next(struct seq_file *m, void *v, loff_t *pos)
++{
++ struct console *con;
++
++ acquire_console_sem();
++ if (v == SEQ_START_TOKEN)
++ con = console_drivers;
++ else
++ con = ((struct console *)v)->next;
++ for (; con; con = con->next) {
++ if (!con->device)
++ continue;
++ ++*pos;
++ break;
++ }
++ release_console_sem();
++
++ return con;
++}
++
++static void c_stop(struct seq_file *m, void *v)
++{
++}
++
++static const struct seq_operations tty_consoles_op = {
++ .start = c_start,
++ .next = c_next,
++ .stop = c_stop,
++ .show = show_console_dev
++};
++
++/*
++ * Used for open /proc/tty/consoles. Before this detect
++ * the device ID of file descriptor 0 of the current
++ * reading task if a character device...
++ */
++static int tty_consoles_open(struct inode *inode, struct file *file)
++{
++ struct files_struct *curfiles;
++
++ current_dev = 0;
++ curfiles = get_files_struct(current);
++ if (curfiles) {
++ const struct file *curfp;
++ spin_lock(&curfiles->file_lock);
++ curfp = fcheck_files(curfiles, 0);
++ if (curfp && curfp->private_data) {
++ const struct inode *inode;
++ dget(curfp->f_dentry);
++ inode = curfp->f_dentry->d_inode;
++ if (S_ISCHR(inode->i_mode)) {
++ struct tty_struct *tty;
++ tty = (struct tty_struct *)curfp->private_data;
++ if (tty && tty->magic == TTY_MAGIC) {
++ tty = tty_pair_get_tty(tty);
++ current_dev = tty_devnum(tty);
++ }
++ }
++ dput(curfp->f_dentry);
++ }
++ spin_unlock(&curfiles->file_lock);
++ put_files_struct(curfiles);
++ }
++ return seq_open(file, &tty_consoles_op);
++}
++
++static const struct file_operations proc_tty_consoles_operations = {
++ .open = tty_consoles_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = seq_release,
++};
++
++/*
+ * This function is called by tty_register_driver() to handle
+ * registering the driver's /proc handler into /proc/tty/driver/<foo>
+ */
+@@ -186,4 +343,5 @@ void __init proc_tty_init(void)
+ proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR|S_IXUSR, NULL);
+ proc_create("tty/ldiscs", 0, NULL, &tty_ldiscs_proc_fops);
+ proc_create("tty/drivers", 0, NULL, &proc_tty_drivers_operations);
++ proc_create("tty/consoles", 0, NULL, &proc_tty_consoles_operations);
+ }
diff --git a/tty/tty-fix-warning-left-over-from-tiocgicount-changes.patch b/tty/tty-fix-warning-left-over-from-tiocgicount-changes.patch
new file mode 100644
index 00000000000000..8df4d1d817f67f
--- /dev/null
+++ b/tty/tty-fix-warning-left-over-from-tiocgicount-changes.patch
@@ -0,0 +1,25 @@
+From alan@linux.intel.com Fri Sep 24 09:42:12 2010
+From: Alan Cox <alan@linux.intel.com>
+Subject: tty: Fix warning left over from TIOCGICOUNT changes
+To: linux-next@vger.kernel.org, greg@kroah.com, linux-serial@vger.kernel.org
+Date: Fri, 24 Sep 2010 15:49:18 +0100
+Message-ID: <20100924144750.11385.24596.stgit@localhost.localdomain>
+
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -444,8 +444,6 @@ static int ssu100_ioctl(struct tty_struc
+ unsigned int cmd, unsigned long arg)
+ {
+ struct usb_serial_port *port = tty->driver_data;
+- struct ssu100_port_private *priv = usb_get_serial_port_data(port);
+- void __user *user_arg = (void __user *)arg;
+
+ dbg("%s cmd 0x%04x", __func__, cmd);
+
diff --git a/usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch b/usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch
index 1306cdae854528..2a6707ea411f8a 100644
--- a/usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch
+++ b/usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch
@@ -25,6 +25,7 @@ Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Philip J. Turmel <philip@turmel.org>
Tested-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Tested-by: Alex Riesen <raa.lkml@gmail.com>
+Tested-by: Matthias Bayer <jackdachef@gmail.com>
CC: Jiri Kosina <jkosina@suse.cz>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch b/usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch
new file mode 100644
index 00000000000000..4fa12c0ba435a0
--- /dev/null
+++ b/usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch
@@ -0,0 +1,36 @@
+From stern+4c863d94@rowland.harvard.edu Fri Sep 24 09:41:42 2010
+Date: Fri, 24 Sep 2010 11:41:46 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+Subject: USB: update Kconfig help text for CONFIG_USB_SUSPEND
+Message-ID: <Pine.LNX.4.44L0.1009241127590.1744-100000@iolanthe.rowland.org>
+
+This patch (as1429) updates the Kconfig help text for
+CONFIG_USB_SUSPEND. The power/level file is now deprecated; we should
+tell people to use power/control instead.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/Kconfig | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/core/Kconfig
++++ b/drivers/usb/core/Kconfig
+@@ -91,12 +91,12 @@ config USB_DYNAMIC_MINORS
+ If you are unsure about this, say N here.
+
+ config USB_SUSPEND
+- bool "USB runtime power management (suspend/resume and wakeup)"
++ bool "USB runtime power management (autosuspend) and wakeup"
+ depends on USB && PM_RUNTIME
+ help
+ If you say Y here, you can use driver calls or the sysfs
+- "power/level" file to suspend or resume individual USB
+- peripherals and to enable or disable autosuspend (see
++ "power/control" file to enable or disable autosuspend for
++ individual USB peripherals (see
+ Documentation/usb/power-management.txt for more details).
+
+ Also, USB "remote wakeup" signaling is supported, whereby some
diff --git a/usb/usb-cdc.h-ncm-fix-one-more-typo.patch b/usb/usb-cdc.h-ncm-fix-one-more-typo.patch
new file mode 100644
index 00000000000000..4963a21d7c2d90
--- /dev/null
+++ b/usb/usb-cdc.h-ncm-fix-one-more-typo.patch
@@ -0,0 +1,35 @@
+From linux-usb-owner@vger.kernel.org Fri Sep 24 09:42:29 2010
+From: yauheni.kaliuta@nokia.com
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com, hans.petter.selasky@stericsson.com
+Subject: USB: cdc.h: ncm: fix one more typo
+Date: Fri, 24 Sep 2010 09:43:27 +0300
+Message-Id: <1285310607-22955-1-git-send-email-yauheni.kaliuta@nokia.com>
+
+From: Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
+
+In usb_cdc_ncm_dpe32 the fields are 32 bit long and according
+to usb style (hungarian notation) should be called dwDatagramIndex
+and dwDatagramLength (see CDC NCM subclass spec, 3.3.2). Actually,
+they were called wDatagramIndex, wDatagramLength.
+
+Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/usb/cdc.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/include/linux/usb/cdc.h
++++ b/include/linux/usb/cdc.h
+@@ -343,8 +343,8 @@ struct usb_cdc_ncm_ndp16 {
+
+ /* 32-bit NCM Datagram Pointer Entry */
+ struct usb_cdc_ncm_dpe32 {
+- __le32 wDatagramIndex;
+- __le32 wDatagramLength;
++ __le32 dwDatagramIndex;
++ __le32 dwDatagramLength;
+ } __attribute__((__packed__));
+
+ /* 32-bit NCM Datagram Pointer Table */
diff --git a/usb/usb-qcserial-enable-diagnostics-monitor-and-gps-ports-on-gobi-2000.patch b/usb/usb-qcserial-enable-diagnostics-monitor-and-gps-ports-on-gobi-2000.patch
new file mode 100644
index 00000000000000..13e404986bad39
--- /dev/null
+++ b/usb/usb-qcserial-enable-diagnostics-monitor-and-gps-ports-on-gobi-2000.patch
@@ -0,0 +1,90 @@
+From mge@arcor.de Fri Sep 24 09:43:10 2010
+Date: Fri, 24 Sep 2010 18:12:01 +0200
+From: "Matthias G. Eckermann" <mge@arcor.de>
+To: Greg Kroah-Hartman <gregkh@suse.de>,
+ Matthew Garrett <mjg@redhat.com>,
+ Anssi Hannula <anssi.hannula@gmail.com>,
+ Bernhard Rosenkraenzer <bero@arklinux.org>,
+ Andrew Bird <ajb@spheresytems.co.uk>
+Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
+Subject: USB: qcserial: Enable Diagnostics Monitor and GPS ports on Gobi 2000
+Message-ID: <20100924161201.GA10482@arcor.de>
+Content-Disposition: inline
+
+this patch to qcserial.c enables the Diagnostics Monitor
+and NMEA GPS ports on Qualcomm Gobi 2000 devices.
+
+A Gobi 2000 device will provide 3 serial ports:
+ # /dev/ttyUSB0 -> Diagnostics
+ # /dev/ttyUSB1 -> 3G Modem
+ # /dev/ttyUSB2 -> NMEA GPS port
+
+* The Diagnostics Monitor uses Qualcomm's DM protocol; I used
+ libqcdm (ModemManager) to talk to it, found it working, but at
+ least DM commands 12 and 64 are not implemented on my device
+ (Gobi 2000 built into Thinkpad x100e).
+
+* Functionality of the 3G Modem port remains unchanged.
+
+* The GPS port and how to enable it has been confirmed now in the
+ Gobi 3000 source code at:
+ https://www.codeaurora.org/patches/quic/gobi/
+ Enable/disable GPS via:
+ echo "\$GPS_START" > /dev/ttyUSB2
+ # use GPS
+ echo "\$GPS_STOP" > /dev/ttyUSB2
+
+
+Signed-off-by: Matthias G. Eckermann <mge@arcor.de>
+
+---
+ drivers/usb/serial/qcserial.c | 31 ++++++++++++++++++++++++++++++-
+ 1 file changed, 30 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/qcserial.c
++++ b/drivers/usb/serial/qcserial.c
+@@ -152,7 +152,22 @@ static int qcprobe(struct usb_serial *se
+ case 3:
+ case 4:
+ /* Composite mode */
+- if (ifnum == 2) {
++ /* ifnum == 0 is a broadband network adapter */
++ if (ifnum == 1) {
++ /*
++ * Diagnostics Monitor (serial line 9600 8N1)
++ * Qualcomm DM protocol
++ * use "libqcdm" (ModemManager) for communication
++ */
++ dbg("Diagnostics Monitor found");
++ retval = usb_set_interface(serial->dev, ifnum, 0);
++ if (retval < 0) {
++ dev_err(&serial->dev->dev,
++ "Could not set interface, error %d\n",
++ retval);
++ retval = -ENODEV;
++ }
++ } else if (ifnum == 2) {
+ dbg("Modem port found");
+ retval = usb_set_interface(serial->dev, ifnum, 0);
+ if (retval < 0) {
+@@ -163,6 +178,20 @@ static int qcprobe(struct usb_serial *se
+ kfree(data);
+ }
+ return retval;
++ } else if (ifnum==3) {
++ /*
++ * NMEA (serial line 9600 8N1)
++ * # echo "\$GPS_START" > /dev/ttyUSBx
++ * # echo "\$GPS_STOP" > /dev/ttyUSBx
++ */
++ dbg("NMEA GPS interface found");
++ retval = usb_set_interface(serial->dev, ifnum, 0);
++ if (retval < 0) {
++ dev_err(&serial->dev->dev,
++ "Could not set interface, error %d\n",
++ retval);
++ retval = -ENODEV;
++ }
+ }
+ break;
+