]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Jul 2017 08:43:02 +0000 (10:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Jul 2017 08:43:02 +0000 (10:43 +0200)
added patches:
gfs2-fix-glock-rhashtable-rcu-bug.patch
usb-serial-option-add-two-longcheer-device-ids.patch
usb-serial-qcserial-new-sierra-wireless-em7305-device-id.patch
xhci-limit-usb2-port-wake-support-for-amd-promontory-hosts.patch

queue-4.12/gfs2-fix-glock-rhashtable-rcu-bug.patch [new file with mode: 0644]
queue-4.12/series
queue-4.12/usb-serial-option-add-two-longcheer-device-ids.patch [new file with mode: 0644]
queue-4.12/usb-serial-qcserial-new-sierra-wireless-em7305-device-id.patch [new file with mode: 0644]
queue-4.12/xhci-limit-usb2-port-wake-support-for-amd-promontory-hosts.patch [new file with mode: 0644]

diff --git a/queue-4.12/gfs2-fix-glock-rhashtable-rcu-bug.patch b/queue-4.12/gfs2-fix-glock-rhashtable-rcu-bug.patch
new file mode 100644 (file)
index 0000000..fd5a5b1
--- /dev/null
@@ -0,0 +1,62 @@
+From 961ae1d83d055a4b9ebbfb4cc8ca62ec1a7a3b74 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruenba@redhat.com>
+Date: Fri, 7 Jul 2017 13:22:05 -0500
+Subject: gfs2: Fix glock rhashtable rcu bug
+
+From: Andreas Gruenbacher <agruenba@redhat.com>
+
+commit 961ae1d83d055a4b9ebbfb4cc8ca62ec1a7a3b74 upstream.
+
+Before commit 88ffbf3e03 "GFS2: Use resizable hash table for glocks",
+glocks were freed via call_rcu to allow reading the glock hashtable
+locklessly using rcu.  This was then changed to free glocks immediately,
+which made reading the glock hashtable unsafe.  Bring back the original
+code for freeing glocks via call_rcu.
+
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+Signed-off-by: Bob Peterson <rpeterso@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/gfs2/glock.c  |   11 +++++++++--
+ fs/gfs2/incore.h |    1 +
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+--- a/fs/gfs2/glock.c
++++ b/fs/gfs2/glock.c
+@@ -80,9 +80,9 @@ static struct rhashtable_params ht_parms
+ static struct rhashtable gl_hash_table;
+-void gfs2_glock_free(struct gfs2_glock *gl)
++static void gfs2_glock_dealloc(struct rcu_head *rcu)
+ {
+-      struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
++      struct gfs2_glock *gl = container_of(rcu, struct gfs2_glock, gl_rcu);
+       if (gl->gl_ops->go_flags & GLOF_ASPACE) {
+               kmem_cache_free(gfs2_glock_aspace_cachep, gl);
+@@ -90,6 +90,13 @@ void gfs2_glock_free(struct gfs2_glock *
+               kfree(gl->gl_lksb.sb_lvbptr);
+               kmem_cache_free(gfs2_glock_cachep, gl);
+       }
++}
++
++void gfs2_glock_free(struct gfs2_glock *gl)
++{
++      struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
++
++      call_rcu(&gl->gl_rcu, gfs2_glock_dealloc);
+       if (atomic_dec_and_test(&sdp->sd_glock_disposal))
+               wake_up(&sdp->sd_glock_wait);
+ }
+--- a/fs/gfs2/incore.h
++++ b/fs/gfs2/incore.h
+@@ -374,6 +374,7 @@ struct gfs2_glock {
+                       loff_t end;
+               } gl_vm;
+       };
++      struct rcu_head gl_rcu;
+       struct rhash_head gl_node;
+ };
index e8bc1c38be5b31ddbda4d38297475b8a09a93135..0a8cbcdbecd90c85b3b4284ff84c8b657ab04a55 100644 (file)
@@ -6,3 +6,7 @@ usb-usbip-set-buffer-pointers-to-null-after-free.patch
 add-usb-quirk-for-hvr-950q-to-avoid-intermittent-device-resets.patch
 usb-fix-typo-in-the-definition-of-endpointrequest.patch
 usb-core-fix-device-node-leak.patch
+usb-serial-option-add-two-longcheer-device-ids.patch
+usb-serial-qcserial-new-sierra-wireless-em7305-device-id.patch
+xhci-limit-usb2-port-wake-support-for-amd-promontory-hosts.patch
+gfs2-fix-glock-rhashtable-rcu-bug.patch
diff --git a/queue-4.12/usb-serial-option-add-two-longcheer-device-ids.patch b/queue-4.12/usb-serial-option-add-two-longcheer-device-ids.patch
new file mode 100644 (file)
index 0000000..99c8509
--- /dev/null
@@ -0,0 +1,39 @@
+From 8fb060da715ad10fe956d7c0077b2fb0c12bb9d7 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Mon, 12 Jun 2017 16:30:16 +0200
+Subject: USB: serial: option: add two Longcheer device ids
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 8fb060da715ad10fe956d7c0077b2fb0c12bb9d7 upstream.
+
+Add two Longcheer device-id entries which specifically enables a
+Telewell TW-3G HSPA+ branded modem (0x9801).
+
+Reported-by: Teemu Likonen <tlikonen@iki.fi>
+Reported-by: Bjørn Mork <bjorn@mork.no>
+Reported-by: Lars Melin <larsm17@gmail.com>
+Tested-by: Teemu Likonen <tlikonen@iki.fi>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1877,6 +1877,10 @@ static const struct usb_device_id option
+         .driver_info = (kernel_ulong_t)&four_g_w100_blacklist
+       },
+       { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, SPEEDUP_PRODUCT_SU9800, 0xff) },
++      { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, 0x9801, 0xff),
++        .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
++      { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, 0x9803, 0xff),
++        .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
+       { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
+       { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
+       { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
diff --git a/queue-4.12/usb-serial-qcserial-new-sierra-wireless-em7305-device-id.patch b/queue-4.12/usb-serial-qcserial-new-sierra-wireless-em7305-device-id.patch
new file mode 100644 (file)
index 0000000..3aa50e6
--- /dev/null
@@ -0,0 +1,33 @@
+From 996fab55d864ed604158f71724ff52db1c2454a3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Tue, 13 Jun 2017 19:11:42 +0200
+Subject: USB: serial: qcserial: new Sierra Wireless EM7305 device ID
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit 996fab55d864ed604158f71724ff52db1c2454a3 upstream.
+
+A new Sierra Wireless EM7305 device ID used in a Toshiba laptop.
+
+Reported-by: Petr Kloc <petr_kloc@yahoo.com>
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/qcserial.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/qcserial.c
++++ b/drivers/usb/serial/qcserial.c
+@@ -158,6 +158,7 @@ static const struct usb_device_id id_tab
+       {DEVICE_SWI(0x1199, 0x9056)},   /* Sierra Wireless Modem */
+       {DEVICE_SWI(0x1199, 0x9060)},   /* Sierra Wireless Modem */
+       {DEVICE_SWI(0x1199, 0x9061)},   /* Sierra Wireless Modem */
++      {DEVICE_SWI(0x1199, 0x9063)},   /* Sierra Wireless EM7305 */
+       {DEVICE_SWI(0x1199, 0x9070)},   /* Sierra Wireless MC74xx */
+       {DEVICE_SWI(0x1199, 0x9071)},   /* Sierra Wireless MC74xx */
+       {DEVICE_SWI(0x1199, 0x9078)},   /* Sierra Wireless EM74xx */
diff --git a/queue-4.12/xhci-limit-usb2-port-wake-support-for-amd-promontory-hosts.patch b/queue-4.12/xhci-limit-usb2-port-wake-support-for-amd-promontory-hosts.patch
new file mode 100644 (file)
index 0000000..8b53f03
--- /dev/null
@@ -0,0 +1,79 @@
+From dec08194ffeccfa1cf085906b53d301930eae18f Mon Sep 17 00:00:00 2001
+From: Jiahau Chang <jiahau@gmail.com>
+Date: Mon, 19 Jun 2017 13:08:30 +0300
+Subject: xhci: Limit USB2 port wake support for AMD Promontory hosts
+
+From: Jiahau Chang <jiahau@gmail.com>
+
+commit dec08194ffeccfa1cf085906b53d301930eae18f upstream.
+
+For AMD Promontory xHCI host, although you can disable USB 2.0 ports in
+BIOS settings, those ports will be enabled anyway after you remove a
+device on that port and re-plug it in again. It's a known limitation of
+the chip. As a workaround we can clear the PORT_WAKE_BITS.
+
+This will disable wake on connect, disconnect and overcurrent on
+AMD Promontory USB2 ports
+
+[checkpatch cleanup and commit message reword -Mathias]
+Cc: Tsai Nicholas <nicholas.tsai@amd.com>
+Signed-off-by: Jiahau Chang <Lars_Chang@asmedia.com.tw>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-hub.c |    3 +++
+ drivers/usb/host/xhci-pci.c |   12 ++++++++++++
+ drivers/usb/host/xhci.h     |    1 +
+ 3 files changed, 16 insertions(+)
+
+--- a/drivers/usb/host/xhci-hub.c
++++ b/drivers/usb/host/xhci-hub.c
+@@ -1461,6 +1461,9 @@ int xhci_bus_suspend(struct usb_hcd *hcd
+                               t2 |= PORT_WKOC_E | PORT_WKCONN_E;
+                               t2 &= ~PORT_WKDISC_E;
+                       }
++                      if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) &&
++                          (hcd->speed < HCD_USB3))
++                              t2 &= ~PORT_WAKE_BITS;
+               } else
+                       t2 &= ~PORT_WAKE_BITS;
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -54,6 +54,11 @@
+ #define PCI_DEVICE_ID_INTEL_APL_XHCI                  0x5aa8
+ #define PCI_DEVICE_ID_INTEL_DNV_XHCI                  0x19d0
++#define PCI_DEVICE_ID_AMD_PROMONTORYA_4                       0x43b9
++#define PCI_DEVICE_ID_AMD_PROMONTORYA_3                       0x43ba
++#define PCI_DEVICE_ID_AMD_PROMONTORYA_2                       0x43bb
++#define PCI_DEVICE_ID_AMD_PROMONTORYA_1                       0x43bc
++
+ static const char hcd_name[] = "xhci_hcd";
+ static struct hc_driver __read_mostly xhci_pci_hc_driver;
+@@ -135,6 +140,13 @@ static void xhci_pci_quirks(struct devic
+       if (pdev->vendor == PCI_VENDOR_ID_AMD)
+               xhci->quirks |= XHCI_TRUST_TX_LENGTH;
++      if ((pdev->vendor == PCI_VENDOR_ID_AMD) &&
++              ((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) ||
++              (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) ||
++              (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2) ||
++              (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1)))
++              xhci->quirks |= XHCI_U2_DISABLE_WAKE;
++
+       if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
+               xhci->quirks |= XHCI_LPM_SUPPORT;
+               xhci->quirks |= XHCI_INTEL_HOST;
+--- a/drivers/usb/host/xhci.h
++++ b/drivers/usb/host/xhci.h
+@@ -1819,6 +1819,7 @@ struct xhci_hcd {
+ /* For controller with a broken Port Disable implementation */
+ #define XHCI_BROKEN_PORT_PED  (1 << 25)
+ #define XHCI_LIMIT_ENDPOINT_INTERVAL_7        (1 << 26)
++#define XHCI_U2_DISABLE_WAKE  (1 << 27)
+       unsigned int            num_active_eps;
+       unsigned int            limit_active_eps;