]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Nov 2012 21:36:51 +0000 (13:36 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Nov 2012 21:36:51 +0000 (13:36 -0800)
added patches:
bas_gigaset-fix-pre_reset-handling.patch
hid-add-quirk-for-freescale-i.mx28-rom-recovery.patch
pstore-ram-fix-printk-format-warning.patch

queue-3.6/bas_gigaset-fix-pre_reset-handling.patch [new file with mode: 0644]
queue-3.6/hid-add-quirk-for-freescale-i.mx28-rom-recovery.patch [new file with mode: 0644]
queue-3.6/pstore-ram-fix-printk-format-warning.patch [new file with mode: 0644]
queue-3.6/series

diff --git a/queue-3.6/bas_gigaset-fix-pre_reset-handling.patch b/queue-3.6/bas_gigaset-fix-pre_reset-handling.patch
new file mode 100644 (file)
index 0000000..36796f5
--- /dev/null
@@ -0,0 +1,68 @@
+From c6fdd8e5d0c65bb8821dc6da26ee1a2ddd58b3cc Mon Sep 17 00:00:00 2001
+From: Tilman Schmidt <tilman@imap.cc>
+Date: Wed, 24 Oct 2012 08:44:32 +0000
+Subject: bas_gigaset: fix pre_reset handling
+
+From: Tilman Schmidt <tilman@imap.cc>
+
+commit c6fdd8e5d0c65bb8821dc6da26ee1a2ddd58b3cc upstream.
+
+The delayed work function int_in_work() may call usb_reset_device()
+and thus, indirectly, the driver's pre_reset method. Trying to
+cancel the work synchronously in that situation would deadlock.
+Fix by avoiding cancel_work_sync() in the pre_reset method.
+
+If the reset was NOT initiated by int_in_work() this might cause
+int_in_work() to run after the post_reset method, with urb_int_in
+already resubmitted, so handle that case gracefully.
+
+Signed-off-by: Tilman Schmidt <tilman@imap.cc>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/isdn/gigaset/bas-gigaset.c |   19 ++++++++++++++++---
+ 1 file changed, 16 insertions(+), 3 deletions(-)
+
+--- a/drivers/isdn/gigaset/bas-gigaset.c
++++ b/drivers/isdn/gigaset/bas-gigaset.c
+@@ -617,7 +617,13 @@ static void int_in_work(struct work_stru
+       if (rc == 0)
+               /* success, resubmit interrupt read URB */
+               rc = usb_submit_urb(urb, GFP_ATOMIC);
+-      if (rc != 0 && rc != -ENODEV) {
++
++      switch (rc) {
++      case 0:         /* success */
++      case -ENODEV:   /* device gone */
++      case -EINVAL:   /* URB already resubmitted, or terminal badness */
++              break;
++      default:        /* failure: try to recover by resetting the device */
+               dev_err(cs->dev, "clear halt failed: %s\n", get_usb_rcmsg(rc));
+               rc = usb_lock_device_for_reset(ucs->udev, ucs->interface);
+               if (rc == 0) {
+@@ -2442,7 +2448,9 @@ static void gigaset_disconnect(struct us
+ }
+ /* gigaset_suspend
+- * This function is called before the USB connection is suspended.
++ * This function is called before the USB connection is suspended
++ * or before the USB device is reset.
++ * In the latter case, message == PMSG_ON.
+  */
+ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message)
+ {
+@@ -2498,7 +2506,12 @@ static int gigaset_suspend(struct usb_in
+       del_timer_sync(&ucs->timer_atrdy);
+       del_timer_sync(&ucs->timer_cmd_in);
+       del_timer_sync(&ucs->timer_int_in);
+-      cancel_work_sync(&ucs->int_in_wq);
++
++      /* don't try to cancel int_in_wq from within reset as it
++       * might be the one requesting the reset
++       */
++      if (message.event != PM_EVENT_ON)
++              cancel_work_sync(&ucs->int_in_wq);
+       gig_dbg(DEBUG_SUSPEND, "suspend complete");
+       return 0;
diff --git a/queue-3.6/hid-add-quirk-for-freescale-i.mx28-rom-recovery.patch b/queue-3.6/hid-add-quirk-for-freescale-i.mx28-rom-recovery.patch
new file mode 100644 (file)
index 0000000..5eea42c
--- /dev/null
@@ -0,0 +1,46 @@
+From 2843b673d03421e0e73cf061820d1db328f7c8eb Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Sun, 5 Aug 2012 23:57:15 +0200
+Subject: HID: add quirk for Freescale i.MX28 ROM recovery
+
+From: Marek Vasut <marex@denx.de>
+
+commit 2843b673d03421e0e73cf061820d1db328f7c8eb upstream.
+
+The USB recovery mode present in i.MX28 ROM emulates USB HID.
+It needs this quirk to behave properly.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Cc: Chen Peter <B29397@freescale.com>
+Cc: Jiri Kosina <jkosina@suse.cz>
+[jkosina@suse.cz: fix alphabetical ordering]
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/hid-ids.h           |    3 +++
+ drivers/hid/usbhid/hid-quirks.c |    1 +
+ 2 files changed, 4 insertions(+)
+
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -296,6 +296,9 @@
+ #define USB_VENDOR_ID_EZKEY           0x0518
+ #define USB_DEVICE_ID_BTC_8193                0x0002
++#define USB_VENDOR_ID_FREESCALE               0x15A2
++#define USB_DEVICE_ID_FREESCALE_MX28  0x004F
++
+ #define USB_VENDOR_ID_FRUCTEL 0x25B6
+ #define USB_DEVICE_ID_GAMETEL_MT_MODE 0x0002
+--- a/drivers/hid/usbhid/hid-quirks.c
++++ b/drivers/hid/usbhid/hid-quirks.c
+@@ -70,6 +70,7 @@ static const struct hid_blacklist {
+       { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
++      { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NO_INIT_REPORTS },
+       { USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1, HID_QUIRK_NO_INIT_REPORTS },
diff --git a/queue-3.6/pstore-ram-fix-printk-format-warning.patch b/queue-3.6/pstore-ram-fix-printk-format-warning.patch
new file mode 100644 (file)
index 0000000..3a2cd5a
--- /dev/null
@@ -0,0 +1,33 @@
+From 0427193b691edc81c846c7d0ebd2561cae8709d8 Mon Sep 17 00:00:00 2001
+From: Randy Dunlap <rdunlap@xenotime.net>
+Date: Fri, 3 Aug 2012 17:02:48 -0700
+Subject: pstore/ram: Fix printk format warning
+
+From: Randy Dunlap <rdunlap@xenotime.net>
+
+commit 0427193b691edc81c846c7d0ebd2561cae8709d8 upstream.
+
+Fix printk format warning (on i386) in pstore:
+
+fs/pstore/ram.c:409:3: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t'
+
+Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
+Acked-by: Kees Cook <keescook@chromium.org>
+Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/pstore/ram.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/pstore/ram.c
++++ b/fs/pstore/ram.c
+@@ -406,7 +406,7 @@ static int __devinit ramoops_probe(struc
+               goto fail_init_fprz;
+       if (!cxt->przs && !cxt->cprz && !cxt->fprz) {
+-              pr_err("memory size too small, minimum is %lu\n",
++              pr_err("memory size too small, minimum is %zu\n",
+                       cxt->console_size + cxt->record_size +
+                       cxt->ftrace_size);
+               goto fail_cnt;
index 1e627fadbe37c2fb9831c4f5236e3027632db37d..2a81c0b6964cf6339dd08b09f458e35d223b3b94 100644 (file)
@@ -34,3 +34,6 @@ writeback-put-unused-inodes-to-lru-after-writeback-completion.patch
 alsa-hda-add-new-codec-alc283-alc290-support.patch
 alsa-hda-fix-missing-beep-on-asus-x43u-notebook.patch
 alsa-hda-add-support-for-realtek-alc292.patch
+bas_gigaset-fix-pre_reset-handling.patch
+pstore-ram-fix-printk-format-warning.patch
+hid-add-quirk-for-freescale-i.mx28-rom-recovery.patch