]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Apr 2012 23:36:29 +0000 (16:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Apr 2012 23:36:29 +0000 (16:36 -0700)
added patches:
usb-don-t-clear-urb-dev-in-scatter-gather-library.patch
usb-option-re-add-novatelwireless_product_hspa_highspeed-to-option_id-array.patch
usb-pl2303-fix-dtr-rts-being-raised-on-baud-rate-change.patch
usb-sierra-add-support-for-sierra-wireless-mc7710.patch

queue-3.0/series
queue-3.0/usb-don-t-clear-urb-dev-in-scatter-gather-library.patch [new file with mode: 0644]
queue-3.0/usb-option-re-add-novatelwireless_product_hspa_highspeed-to-option_id-array.patch [new file with mode: 0644]
queue-3.0/usb-pl2303-fix-dtr-rts-being-raised-on-baud-rate-change.patch [new file with mode: 0644]
queue-3.0/usb-sierra-add-support-for-sierra-wireless-mc7710.patch [new file with mode: 0644]

index b4d82a07be0b7902849580077da86d0e7d8497a4..212642637a407845a1f297a4428afa38de598592 100644 (file)
@@ -16,3 +16,7 @@ perf-hists-catch-and-handle-out-of-date-hist-entry-maps.patch
 video-uvesafb-fix-oops-that-uvesafb-try-to-execute-nx-protected-page.patch
 nohz-fix-stale-jiffies-update-in-tick_nohz_restart.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-sierra-add-support-for-sierra-wireless-mc7710.patch
+usb-don-t-clear-urb-dev-in-scatter-gather-library.patch
diff --git a/queue-3.0/usb-don-t-clear-urb-dev-in-scatter-gather-library.patch b/queue-3.0/usb-don-t-clear-urb-dev-in-scatter-gather-library.patch
new file mode 100644 (file)
index 0000000..9f52577
--- /dev/null
@@ -0,0 +1,83 @@
+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);
+               }
diff --git a/queue-3.0/usb-option-re-add-novatelwireless_product_hspa_highspeed-to-option_id-array.patch b/queue-3.0/usb-option-re-add-novatelwireless_product_hspa_highspeed-to-option_id-array.patch
new file mode 100644 (file)
index 0000000..0de6781
--- /dev/null
@@ -0,0 +1,28 @@
+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) },
diff --git a/queue-3.0/usb-pl2303-fix-dtr-rts-being-raised-on-baud-rate-change.patch b/queue-3.0/usb-pl2303-fix-dtr-rts-being-raised-on-baud-rate-change.patch
new file mode 100644 (file)
index 0000000..216be2d
--- /dev/null
@@ -0,0 +1,34 @@
+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
+@@ -424,7 +424,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;
diff --git a/queue-3.0/usb-sierra-add-support-for-sierra-wireless-mc7710.patch b/queue-3.0/usb-sierra-add-support-for-sierra-wireless-mc7710.patch
new file mode 100644 (file)
index 0000000..64f35b1
--- /dev/null
@@ -0,0 +1,28 @@
+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 */