nohz-fix-stale-jiffies-update-in-tick_nohz_restart.patch
pch_uart-fix-msi-setting-issue.patch
usb-serial-fix-race-between-probe-and-open.patch
+usb-pl2303-fix-dtr-rts-being-raised-on-baud-rate-change.patch
+usb-option-re-add-novatelwireless_product_hspa_highspeed-to-option_id-array.patch
+usb-ftdi_sio-fix-status-line-change-handling-for-tiocmiwait-and-tiocgicount.patch
+usb-ftdi_sio-fix-race-condition-in-tiocmiwait-and-abort-of-tiocmiwait-when-the-device-is-removed.patch
+usb-sierra-add-support-for-sierra-wireless-mc7710.patch
+usb-don-t-clear-urb-dev-in-scatter-gather-library.patch
+usb-don-t-ignore-suspend-errors-for-root-hubs.patch
--- /dev/null
+From bcf398537630bf20b4dbe59ba855b69f404c93cf Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Thu, 22 Mar 2012 11:00:21 -0400
+Subject: USB: don't clear urb->dev in scatter-gather library
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit bcf398537630bf20b4dbe59ba855b69f404c93cf upstream.
+
+This patch (as1517b) fixes an error in the USB scatter-gather library.
+The library code uses urb->dev to determine whether or nor an URB is
+currently active; the completion handler sets urb->dev to NULL.
+However the core unlinking routines need to use urb->dev. Since
+unlinking always racing with completion, the completion handler must
+not clear urb->dev -- it can lead to invalid memory accesses when a
+transfer has to be cancelled.
+
+This patch fixes the problem by getting rid of the lines that clear
+urb->dev after urb has been submitted. As a result we may end up
+trying to unlink an URB that failed in submission or that has already
+completed, so an extra check is added after each unlink to avoid
+printing an error message when this happens. The checks are updated
+in both sg_complete() and sg_cancel(), and the second is updated to
+match the first (currently it prints out unnecessary warning messages
+if a device is unplugged while a transfer is in progress).
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Reported-and-tested-by: Illia Zaitsev <I.Zaitsev@adbglobal.com>
+CC: Ming Lei <tom.leiming@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/message.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/core/message.c
++++ b/drivers/usb/core/message.c
+@@ -308,7 +308,8 @@ static void sg_complete(struct urb *urb)
+ retval = usb_unlink_urb(io->urbs [i]);
+ if (retval != -EINPROGRESS &&
+ retval != -ENODEV &&
+- retval != -EBUSY)
++ retval != -EBUSY &&
++ retval != -EIDRM)
+ dev_err(&io->dev->dev,
+ "%s, unlink --> %d\n",
+ __func__, retval);
+@@ -317,7 +318,6 @@ static void sg_complete(struct urb *urb)
+ }
+ spin_lock(&io->lock);
+ }
+- urb->dev = NULL;
+
+ /* on the last completion, signal usb_sg_wait() */
+ io->bytes += urb->actual_length;
+@@ -524,7 +524,6 @@ void usb_sg_wait(struct usb_sg_request *
+ case -ENXIO: /* hc didn't queue this one */
+ case -EAGAIN:
+ case -ENOMEM:
+- io->urbs[i]->dev = NULL;
+ retval = 0;
+ yield();
+ break;
+@@ -542,7 +541,6 @@ void usb_sg_wait(struct usb_sg_request *
+
+ /* fail any uncompleted urbs */
+ default:
+- io->urbs[i]->dev = NULL;
+ io->urbs[i]->status = retval;
+ dev_dbg(&io->dev->dev, "%s, submit --> %d\n",
+ __func__, retval);
+@@ -593,7 +591,10 @@ void usb_sg_cancel(struct usb_sg_request
+ if (!io->urbs [i]->dev)
+ continue;
+ retval = usb_unlink_urb(io->urbs [i]);
+- if (retval != -EINPROGRESS && retval != -EBUSY)
++ if (retval != -EINPROGRESS
++ && retval != -ENODEV
++ && retval != -EBUSY
++ && retval != -EIDRM)
+ dev_warn(&io->dev->dev, "%s, unlink --> %d\n",
+ __func__, retval);
+ }
--- /dev/null
+From cd4376e23a59a2adf3084cb5f4a523e6d5fd4e49 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Wed, 28 Mar 2012 15:56:17 -0400
+Subject: USB: don't ignore suspend errors for root hubs
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit cd4376e23a59a2adf3084cb5f4a523e6d5fd4e49 upstream.
+
+This patch (as1532) fixes a mistake in the USB suspend code. When the
+system is going to sleep, we should ignore errors in powering down USB
+devices, because they don't really matter. The devices will go to low
+power anyway when the entire USB bus gets suspended (except for
+SuperSpeed devices; maybe they will need special treatment later).
+
+However we should not ignore errors in suspending root hubs,
+especially if the error indicates that the suspend raced with a wakeup
+request. Doing so might leave the bus powered on while the system was
+supposed to be asleep, or it might cause the suspend of the root hub's
+parent controller device to fail, or it might cause a wakeup request
+to be ignored.
+
+The patch fixes the problem by ignoring errors only when the device in
+question is not a root hub.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Reported-by: Chen Peter <B29397@freescale.com>
+Tested-by: Chen Peter <peter.chen@freescale.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/driver.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/core/driver.c
++++ b/drivers/usb/core/driver.c
+@@ -1198,8 +1198,13 @@ static int usb_suspend_both(struct usb_d
+ if (status == 0) {
+ status = usb_suspend_device(udev, msg);
+
+- /* Again, ignore errors during system sleep transitions */
+- if (!PMSG_IS_AUTO(msg))
++ /*
++ * Ignore errors from non-root-hub devices during
++ * system sleep transitions. For the most part,
++ * these devices should go to low power anyway when
++ * the entire bus is suspended.
++ */
++ if (udev->parent && !PMSG_IS_AUTO(msg))
+ status = 0;
+ }
+
--- /dev/null
+From 876ae50d94b02f3f523aa451b45ec5fb9c25d221 Mon Sep 17 00:00:00 2001
+From: Simon Arlott <simon@fire.lp0.eu>
+Date: Mon, 26 Mar 2012 23:27:59 +0100
+Subject: USB: ftdi_sio: fix race condition in TIOCMIWAIT, and abort of TIOCMIWAIT when the device is removed
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Simon Arlott <simon@fire.lp0.eu>
+
+commit 876ae50d94b02f3f523aa451b45ec5fb9c25d221 upstream.
+
+There are two issues here, one is that the device is generating
+spurious very fast modem status line changes somewhere:
+
+CTS becomes high then low 18µs later:
+[121226.924373] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=6
+[121226.924378] ftdi_process_packet: status=10 prev=00 diff=10
+[121226.924382] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=7
+(wake_up_interruptible is called)
+[121226.924391] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=7
+[121226.924394] ftdi_process_packet: status=00 prev=10 diff=10
+[121226.924397] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=8
+(wake_up_interruptible is called)
+
+This wakes up the task in TIOCMIWAIT:
+[121226.924405] ftdi_ioctl: 19451 rng=0->0 dsr=10->10 dcd=0->0 cts=6->8
+(wait from 20:51:46 returns and observes both changes)
+
+Which then calls TIOCMIWAIT again:
+20:51:46.400239 ioctl(3, TIOCMIWAIT, 0x20) = 0
+22:11:09.441818 ioctl(3, TIOCMGET, [TIOCM_DTR|TIOCM_RTS]) = 0
+22:11:09.442812 ioctl(3, TIOCMIWAIT, 0x20) = -1 EIO (Input/output error)
+(the second wake_up_interruptible takes effect and an I/O error occurs)
+
+The other issue is that TIOCMIWAIT will wait forever (unless the task is
+interrupted) if the device is removed.
+
+This change removes the -EIO return that occurs if the counts don't
+appear to have changed. Multiple counts may have been processed as
+one or the waiting task may have started waiting after recording the
+current count.
+
+It adds a bool to indicate that the device has been removed so that
+TIOCMIWAIT doesn't wait forever, and wakes up any tasks so that they can
+return -EIO.
+
+Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -76,6 +76,7 @@ struct ftdi_private {
+ struct async_icount icount;
+ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
+ char prev_status; /* Used for TIOCMIWAIT */
++ bool dev_gone; /* Used to abort TIOCMIWAIT */
+ char transmit_empty; /* If transmitter is empty or not */
+ struct usb_serial_port *port;
+ __u16 interface; /* FT2232C, FT2232H or FT4232H port interface
+@@ -1679,6 +1680,7 @@ static int ftdi_sio_port_probe(struct us
+ init_waitqueue_head(&priv->delta_msr_wait);
+
+ priv->flags = ASYNC_LOW_LATENCY;
++ priv->dev_gone = false;
+
+ if (quirk && quirk->port_probe)
+ quirk->port_probe(priv);
+@@ -1836,6 +1838,9 @@ static int ftdi_sio_port_remove(struct u
+
+ dbg("%s", __func__);
+
++ priv->dev_gone = true;
++ wake_up_interruptible_all(&priv->delta_msr_wait);
++
+ remove_sysfs_attrs(port);
+
+ kref_put(&priv->kref, ftdi_sio_priv_release);
+@@ -2390,15 +2395,12 @@ static int ftdi_ioctl(struct tty_struct
+ */
+ case TIOCMIWAIT:
+ cprev = priv->icount;
+- while (1) {
++ while (!priv->dev_gone) {
+ interruptible_sleep_on(&priv->delta_msr_wait);
+ /* see if a signal did it */
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+ cnow = priv->icount;
+- if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
+- cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
+- return -EIO; /* no change => error */
+ if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
+ ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
+ ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) ||
+@@ -2407,7 +2409,7 @@ static int ftdi_ioctl(struct tty_struct
+ }
+ cprev = cnow;
+ }
+- /* not reached */
++ return -EIO;
+ break;
+ case TIOCSERGETLSR:
+ return get_lsr_info(port, (struct serial_struct __user *)arg);
--- /dev/null
+From fca5430d48d53eaf103498c33fd0d1984b9f448b Mon Sep 17 00:00:00 2001
+From: Simon Arlott <simon@fire.lp0.eu>
+Date: Mon, 26 Mar 2012 21:19:40 +0100
+Subject: USB: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT
+
+From: Simon Arlott <simon@fire.lp0.eu>
+
+commit fca5430d48d53eaf103498c33fd0d1984b9f448b upstream.
+
+Handling of TIOCMIWAIT was changed by commit 1d749f9afa657f6ee9336b2bc1fcd750a647d157
+ USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers
+
+FTDI_STATUS_B0_MASK does not indicate the changed modem status lines,
+it indicates the value of the current modem status lines. An xor is
+still required to determine which lines have changed.
+
+The count was only being incremented if the line was high. The only
+reason TIOCMIWAIT still worked was because the status packet is
+repeated every 1ms, so the count was always changing. The wakeup
+itself still ran based on the status lines changing.
+
+This change fixes handling of updates to the modem status lines and
+allows multiple processes to use TIOCMIWAIT concurrently.
+
+Tested with two processes waiting on different status lines being
+toggled independently.
+
+Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
+Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++-----------
+ 1 file changed, 13 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -75,7 +75,7 @@ struct ftdi_private {
+ unsigned long last_dtr_rts; /* saved modem control outputs */
+ struct async_icount icount;
+ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
+- char prev_status, diff_status; /* Used for TIOCMIWAIT */
++ char prev_status; /* Used for TIOCMIWAIT */
+ char transmit_empty; /* If transmitter is empty or not */
+ struct usb_serial_port *port;
+ __u16 interface; /* FT2232C, FT2232H or FT4232H port interface
+@@ -1979,17 +1979,19 @@ static int ftdi_process_packet(struct tt
+ N.B. packet may be processed more than once, but differences
+ are only processed once. */
+ status = packet[0] & FTDI_STATUS_B0_MASK;
+- if (status & FTDI_RS0_CTS)
+- priv->icount.cts++;
+- if (status & FTDI_RS0_DSR)
+- priv->icount.dsr++;
+- if (status & FTDI_RS0_RI)
+- priv->icount.rng++;
+- if (status & FTDI_RS0_RLSD)
+- priv->icount.dcd++;
+ if (status != priv->prev_status) {
+- priv->diff_status |= status ^ priv->prev_status;
+- wake_up_interruptible(&priv->delta_msr_wait);
++ char diff_status = status ^ priv->prev_status;
++
++ if (diff_status & FTDI_RS0_CTS)
++ priv->icount.cts++;
++ if (diff_status & FTDI_RS0_DSR)
++ priv->icount.dsr++;
++ if (diff_status & FTDI_RS0_RI)
++ priv->icount.rng++;
++ if (diff_status & FTDI_RS0_RLSD)
++ priv->icount.dcd++;
++
++ wake_up_interruptible_all(&priv->delta_msr_wait);
+ priv->prev_status = status;
+ }
+
--- /dev/null
+From 9ac2feb22b5b821d81463bef92698ef7682a3145 Mon Sep 17 00:00:00 2001
+From: Santiago Garcia Mantinan <manty@debian.org>
+Date: Mon, 19 Mar 2012 18:17:00 +0100
+Subject: USB: option: re-add NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED to option_id array
+
+From: Santiago Garcia Mantinan <manty@debian.org>
+
+commit 9ac2feb22b5b821d81463bef92698ef7682a3145 upstream.
+
+Re-add NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED to option_id array
+
+Signed-off-by: Santiago Garcia Mantinan <manty@debian.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -708,6 +708,7 @@ static const struct usb_device_id option
+ { 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_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) },
--- /dev/null
+From ce5c9851855bab190c9a142761d54ba583ab094c Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Fri, 23 Mar 2012 15:23:18 +0100
+Subject: USB: pl2303: fix DTR/RTS being raised on baud rate change
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit ce5c9851855bab190c9a142761d54ba583ab094c upstream.
+
+DTR/RTS should only be raised when changing baudrate from B0 and not on
+any baud rate change (> B0).
+
+Reported-by: Søren Holm <sgh@sgh.dk>
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/pl2303.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/pl2303.c
++++ b/drivers/usb/serial/pl2303.c
+@@ -421,7 +421,7 @@ static void pl2303_set_termios(struct tt
+ control = priv->line_control;
+ if ((cflag & CBAUD) == B0)
+ priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
+- else
++ else if ((old_termios->c_cflag & CBAUD) == B0)
+ priv->line_control |= (CONTROL_DTR | CONTROL_RTS);
+ if (control != priv->line_control) {
+ control = priv->line_control;
--- /dev/null
+From c5d703dcc776cb542b41665f2b7e2ba054efb4a7 Mon Sep 17 00:00:00 2001
+From: Anton Samokhvalov <pg83@yandex.ru>
+Date: Wed, 4 Apr 2012 22:26:01 +0400
+Subject: USB: sierra: add support for Sierra Wireless MC7710
+
+From: Anton Samokhvalov <pg83@yandex.ru>
+
+commit c5d703dcc776cb542b41665f2b7e2ba054efb4a7 upstream.
+
+Just add new device id. 3G works fine, LTE not tested.
+
+Signed-off-by: Anton Samokhvalov <pg83@yandex.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/sierra.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/sierra.c
++++ b/drivers/usb/serial/sierra.c
+@@ -289,6 +289,7 @@ static const struct usb_device_id id_tab
+ { USB_DEVICE(0x1199, 0x6856) }, /* Sierra Wireless AirCard 881 U */
+ { USB_DEVICE(0x1199, 0x6859) }, /* Sierra Wireless AirCard 885 E */
+ { USB_DEVICE(0x1199, 0x685A) }, /* Sierra Wireless AirCard 885 E */
++ { USB_DEVICE(0x1199, 0x68A2) }, /* Sierra Wireless MC7710 */
+ /* Sierra Wireless C885 */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6880, 0xFF, 0xFF, 0xFF)},
+ /* Sierra Wireless C888, Air Card 501, USB 303, USB 304 */