]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 10:14:08 +0000 (11:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 10:14:08 +0000 (11:14 +0100)
added patches:
platform-x86-asus-wmi-fix-keyboard-brightness-cannot-be-set-to-0.patch
scsi-enclosure-fix-stale-device-oops-with-hot-replug.patch
scsi-sd-clear-sdkp-protection_type-if-disk-is-reformatted-without-pi.patch
xprtrdma-fix-completion-wait-during-device-removal.patch

queue-4.14/platform-x86-asus-wmi-fix-keyboard-brightness-cannot-be-set-to-0.patch [new file with mode: 0644]
queue-4.14/scsi-enclosure-fix-stale-device-oops-with-hot-replug.patch [new file with mode: 0644]
queue-4.14/scsi-sd-clear-sdkp-protection_type-if-disk-is-reformatted-without-pi.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/xprtrdma-fix-completion-wait-during-device-removal.patch [new file with mode: 0644]

diff --git a/queue-4.14/platform-x86-asus-wmi-fix-keyboard-brightness-cannot-be-set-to-0.patch b/queue-4.14/platform-x86-asus-wmi-fix-keyboard-brightness-cannot-be-set-to-0.patch
new file mode 100644 (file)
index 0000000..041b9a9
--- /dev/null
@@ -0,0 +1,40 @@
+From 176a7fca81c5090a7240664e3002c106d296bf31 Mon Sep 17 00:00:00 2001
+From: Jian-Hong Pan <jian-hong@endlessm.com>
+Date: Mon, 30 Dec 2019 16:30:45 +0800
+Subject: platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0
+
+From: Jian-Hong Pan <jian-hong@endlessm.com>
+
+commit 176a7fca81c5090a7240664e3002c106d296bf31 upstream.
+
+Some of ASUS laptops like UX431FL keyboard backlight cannot be set to
+brightness 0. According to ASUS' information, the brightness should be
+0x80 ~ 0x83. This patch fixes it by following the logic.
+
+Fixes: e9809c0b9670 ("asus-wmi: add keyboard backlight support")
+Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
+Reviewed-by: Daniel Drake <drake@endlessm.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/asus-wmi.c |    8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+--- a/drivers/platform/x86/asus-wmi.c
++++ b/drivers/platform/x86/asus-wmi.c
+@@ -457,13 +457,7 @@ static void kbd_led_update(struct work_s
+       asus = container_of(work, struct asus_wmi, kbd_led_work);
+-      /*
+-       * bits 0-2: level
+-       * bit 7: light on/off
+-       */
+-      if (asus->kbd_led_wk > 0)
+-              ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F);
+-
++      ctrl_param = 0x80 | (asus->kbd_led_wk & 0x7F);
+       asus_wmi_set_devstate(ASUS_WMI_DEVID_KBD_BACKLIGHT, ctrl_param, NULL);
+ }
diff --git a/queue-4.14/scsi-enclosure-fix-stale-device-oops-with-hot-replug.patch b/queue-4.14/scsi-enclosure-fix-stale-device-oops-with-hot-replug.patch
new file mode 100644 (file)
index 0000000..5e6261b
--- /dev/null
@@ -0,0 +1,45 @@
+From 529244bd1afc102ab164429d338d310d5d65e60d Mon Sep 17 00:00:00 2001
+From: James Bottomley <James.Bottomley@HansenPartnership.com>
+Date: Wed, 8 Jan 2020 17:21:32 -0800
+Subject: scsi: enclosure: Fix stale device oops with hot replug
+
+From: James Bottomley <James.Bottomley@HansenPartnership.com>
+
+commit 529244bd1afc102ab164429d338d310d5d65e60d upstream.
+
+Doing an add/remove/add on a SCSI device in an enclosure leads to an oops
+caused by poisoned values in the enclosure device list pointers.  The
+reason is because we are keeping the enclosure device across the enclosed
+device add/remove/add but the current code is doing a
+device_add/device_del/device_add on it.  This is the wrong thing to do in
+sysfs, so fix it by not doing a device_del on the enclosure device simply
+because of a hot remove of the drive in the slot.
+
+[mkp: added missing email addresses]
+
+Fixes: 43d8eb9cfd0a ("[SCSI] ses: add support for enclosure component hot removal")
+Link: https://lore.kernel.org/r/1578532892.3852.10.camel@HansenPartnership.com
+Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+Reported-by: Luo Jiaxing <luojiaxing@huawei.com>
+Tested-by: John Garry <john.garry@huawei.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/enclosure.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/misc/enclosure.c
++++ b/drivers/misc/enclosure.c
+@@ -419,10 +419,9 @@ int enclosure_remove_device(struct enclo
+               cdev = &edev->component[i];
+               if (cdev->dev == dev) {
+                       enclosure_remove_links(cdev);
+-                      device_del(&cdev->cdev);
+                       put_device(dev);
+                       cdev->dev = NULL;
+-                      return device_add(&cdev->cdev);
++                      return 0;
+               }
+       }
+       return -ENODEV;
diff --git a/queue-4.14/scsi-sd-clear-sdkp-protection_type-if-disk-is-reformatted-without-pi.patch b/queue-4.14/scsi-sd-clear-sdkp-protection_type-if-disk-is-reformatted-without-pi.patch
new file mode 100644 (file)
index 0000000..f1664aa
--- /dev/null
@@ -0,0 +1,42 @@
+From 465f4edaecc6c37f81349233e84d46246bcac11a Mon Sep 17 00:00:00 2001
+From: Xiang Chen <chenxiang66@hisilicon.com>
+Date: Thu, 9 Jan 2020 09:12:24 +0800
+Subject: scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI
+
+From: Xiang Chen <chenxiang66@hisilicon.com>
+
+commit 465f4edaecc6c37f81349233e84d46246bcac11a upstream.
+
+If an attached disk with protection information enabled is reformatted
+to Type 0 the revalidation code does not clear the original protection
+type and subsequent accesses will keep setting RDPROTECT/WRPROTECT.
+
+Set the protection type to 0 if the disk reports PROT_EN=0 in READ
+CAPACITY(16).
+
+[mkp: commit desc]
+
+Fixes: fe542396da73 ("[SCSI] sd: Ensure we correctly disable devices with unknown protection type")
+Link: https://lore.kernel.org/r/1578532344-101668-1-git-send-email-chenxiang66@hisilicon.com
+Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/sd.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/scsi/sd.c
++++ b/drivers/scsi/sd.c
+@@ -2206,8 +2206,10 @@ static int sd_read_protection_type(struc
+       u8 type;
+       int ret = 0;
+-      if (scsi_device_protection(sdp) == 0 || (buffer[12] & 1) == 0)
++      if (scsi_device_protection(sdp) == 0 || (buffer[12] & 1) == 0) {
++              sdkp->protection_type = 0;
+               return ret;
++      }
+       type = ((buffer[12] >> 1) & 7) + 1; /* P_TYPE 0 = Type 1 */
index eacc4a81afa8423b19e851d4a80c2c43ac06333e..922b7e3684c1b8c6a14043ca06b44eeb6d78589b 100644 (file)
@@ -31,3 +31,7 @@ rdma-mlx5-return-proper-error-value.patch
 rdma-srpt-report-the-scsi-residual-to-the-initiator.patch
 arm64-add-sentinel-to-kpti_safe_list.patch
 arm64-check-for-errata-before-evaluating-cpu-features.patch
+scsi-enclosure-fix-stale-device-oops-with-hot-replug.patch
+scsi-sd-clear-sdkp-protection_type-if-disk-is-reformatted-without-pi.patch
+platform-x86-asus-wmi-fix-keyboard-brightness-cannot-be-set-to-0.patch
+xprtrdma-fix-completion-wait-during-device-removal.patch
diff --git a/queue-4.14/xprtrdma-fix-completion-wait-during-device-removal.patch b/queue-4.14/xprtrdma-fix-completion-wait-during-device-removal.patch
new file mode 100644 (file)
index 0000000..887152b
--- /dev/null
@@ -0,0 +1,44 @@
+From 13cb886c591f341a8759f175292ddf978ef903a1 Mon Sep 17 00:00:00 2001
+From: Chuck Lever <chuck.lever@oracle.com>
+Date: Fri, 3 Jan 2020 11:52:17 -0500
+Subject: xprtrdma: Fix completion wait during device removal
+
+From: Chuck Lever <chuck.lever@oracle.com>
+
+commit 13cb886c591f341a8759f175292ddf978ef903a1 upstream.
+
+I've found that on occasion, "rmmod <dev>" will hang while if an NFS
+is under load.
+
+Ensure that ri_remove_done is initialized only just before the
+transport is woken up to force a close. This avoids the completion
+possibly getting initialized again while the CM event handler is
+waiting for a wake-up.
+
+Fixes: bebd031866ca ("xprtrdma: Support unplugging an HCA from under an NFS mount")
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/sunrpc/xprtrdma/verbs.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/sunrpc/xprtrdma/verbs.c
++++ b/net/sunrpc/xprtrdma/verbs.c
+@@ -264,6 +264,7 @@ rpcrdma_conn_upcall(struct rdma_cm_id *i
+                       ia->ri_device->name,
+                       sap, rpc_get_port(sap));
+ #endif
++              init_completion(&ia->ri_remove_done);
+               set_bit(RPCRDMA_IAF_REMOVING, &ia->ri_flags);
+               ep->rep_connected = -ENODEV;
+               xprt_force_disconnect(&xprt->rx_xprt);
+@@ -319,7 +320,6 @@ rpcrdma_create_id(struct rpcrdma_xprt *x
+       int rc;
+       init_completion(&ia->ri_done);
+-      init_completion(&ia->ri_remove_done);
+       id = rdma_create_id(&init_net, rpcrdma_conn_upcall, xprt, RDMA_PS_TCP,
+                           IB_QPT_RC);