]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Dec 2017 12:21:36 +0000 (13:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Dec 2017 12:21:36 +0000 (13:21 +0100)
added patches:
drm-amd-pp-fix-typecast-error-in-powerplay.patch
drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vce_ring_parse_cs.patch
drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vm_update_directories.patch
drm-hisilicon-ensure-ldi-regs-are-properly-configured.patch
drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch
drm-radeon-fix-atombios-on-big-endian.patch
drm-ttm-once-more-fix-ttm_buffer_object_transfer.patch
hwmon-jc42-optionally-try-to-disable-the-smbus-timeout.patch
nfs-revalidate-.-etc-correctly-on-open.patch
nvme-pci-add-quirk-for-delay-before-chk-rdy-for-wdc-sn200.patch
revert-drm-radeon-dont-switch-vt-on-suspend.patch
revert-x86-entry-64-add-missing-irqflags-tracing-to.patch

13 files changed:
queue-4.9/drm-amd-pp-fix-typecast-error-in-powerplay.patch [new file with mode: 0644]
queue-4.9/drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vce_ring_parse_cs.patch [new file with mode: 0644]
queue-4.9/drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vm_update_directories.patch [new file with mode: 0644]
queue-4.9/drm-hisilicon-ensure-ldi-regs-are-properly-configured.patch [new file with mode: 0644]
queue-4.9/drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch [new file with mode: 0644]
queue-4.9/drm-radeon-fix-atombios-on-big-endian.patch [new file with mode: 0644]
queue-4.9/drm-ttm-once-more-fix-ttm_buffer_object_transfer.patch [new file with mode: 0644]
queue-4.9/hwmon-jc42-optionally-try-to-disable-the-smbus-timeout.patch [new file with mode: 0644]
queue-4.9/nfs-revalidate-.-etc-correctly-on-open.patch [new file with mode: 0644]
queue-4.9/nvme-pci-add-quirk-for-delay-before-chk-rdy-for-wdc-sn200.patch [new file with mode: 0644]
queue-4.9/revert-drm-radeon-dont-switch-vt-on-suspend.patch [new file with mode: 0644]
queue-4.9/revert-x86-entry-64-add-missing-irqflags-tracing-to.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/drm-amd-pp-fix-typecast-error-in-powerplay.patch b/queue-4.9/drm-amd-pp-fix-typecast-error-in-powerplay.patch
new file mode 100644 (file)
index 0000000..f88f26f
--- /dev/null
@@ -0,0 +1,34 @@
+From 8d8258bdab735d9f3c4b78e091ecfbb2b2b1f2ca Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Fri, 17 Nov 2017 16:41:16 +0800
+Subject: drm/amd/pp: fix typecast error in powerplay.
+
+From: Rex Zhu <Rex.Zhu@amd.com>
+
+commit 8d8258bdab735d9f3c4b78e091ecfbb2b2b1f2ca upstream.
+
+resulted in unexpected data truncation
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
+@@ -850,9 +850,9 @@ static int init_over_drive_limits(
+               const ATOM_Tonga_POWERPLAYTABLE *powerplay_table)
+ {
+       hwmgr->platform_descriptor.overdriveLimit.engineClock =
+-              le16_to_cpu(powerplay_table->ulMaxODEngineClock);
++              le32_to_cpu(powerplay_table->ulMaxODEngineClock);
+       hwmgr->platform_descriptor.overdriveLimit.memoryClock =
+-              le16_to_cpu(powerplay_table->ulMaxODMemoryClock);
++              le32_to_cpu(powerplay_table->ulMaxODMemoryClock);
+       hwmgr->platform_descriptor.minOverdriveVDDC = 0;
+       hwmgr->platform_descriptor.maxOverdriveVDDC = 0;
diff --git a/queue-4.9/drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vce_ring_parse_cs.patch b/queue-4.9/drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vce_ring_parse_cs.patch
new file mode 100644 (file)
index 0000000..1b79c69
--- /dev/null
@@ -0,0 +1,38 @@
+From 40a9960b046290939b56ce8e51f365258f27f264 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Sat, 30 Sep 2017 11:13:28 +0300
+Subject: drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 40a9960b046290939b56ce8e51f365258f27f264 upstream.
+
+We shifted some code around in commit 9cca0b8e5df0 ("drm/amdgpu: move
+amdgpu_cs_sysvm_access_required into find_mapping") and now my static
+checker complains that "r" might not be initialized at the end of the
+function.  I've reviewed the code, and that seems possible, but it's
+also possible I may have missed something.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+@@ -648,7 +648,7 @@ int amdgpu_vce_ring_parse_cs(struct amdg
+       uint32_t allocated = 0;
+       uint32_t tmp, handle = 0;
+       uint32_t *size = &tmp;
+-      int i, r, idx = 0;
++      int i, r = 0, idx = 0;
+       r = amdgpu_cs_sysvm_access_required(p);
+       if (r)
diff --git a/queue-4.9/drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vm_update_directories.patch b/queue-4.9/drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vm_update_directories.patch
new file mode 100644 (file)
index 0000000..e272903
--- /dev/null
@@ -0,0 +1,38 @@
+From 78aa02c713fcf19e9bc8511ab61a5fd6c877cc01 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Sat, 30 Sep 2017 11:14:13 +0300
+Subject: drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 78aa02c713fcf19e9bc8511ab61a5fd6c877cc01 upstream.
+
+After commit ea09729c9302 ("drm/amdgpu: rework page directory filling
+v2") then it becomes a lot harder to verify that "r" is initialized.  My
+static checker complains and so I've reviewed the code.  It does look
+like it might be buggy... Anyway, it doesn't hurt to set "r" to zero
+at the start.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -744,7 +744,7 @@ error_free:
+ int amdgpu_vm_update_page_directory(struct amdgpu_device *adev,
+                                    struct amdgpu_vm *vm)
+ {
+-      int r;
++      int r = 0;
+       r = amdgpu_vm_update_pd_or_shadow(adev, vm, true);
+       if (r)
diff --git a/queue-4.9/drm-hisilicon-ensure-ldi-regs-are-properly-configured.patch b/queue-4.9/drm-hisilicon-ensure-ldi-regs-are-properly-configured.patch
new file mode 100644 (file)
index 0000000..c3b7729
--- /dev/null
@@ -0,0 +1,45 @@
+From a2f042430784d86eb2b7a6d2a869f552da30edba Mon Sep 17 00:00:00 2001
+From: Peter Griffin <peter.griffin@linaro.org>
+Date: Tue, 15 Aug 2017 15:14:25 +0100
+Subject: drm/hisilicon: Ensure LDI regs are properly configured.
+
+From: Peter Griffin <peter.griffin@linaro.org>
+
+commit a2f042430784d86eb2b7a6d2a869f552da30edba upstream.
+
+This patch fixes the following soft lockup:
+  BUG: soft lockup - CPU#0 stuck for 23s! [weston:307]
+
+On weston idle-timeout the IP is powered down and reset
+asserted. On weston resume we get a massive vblank
+IRQ storm due to the LDI registers having lost some state.
+
+This state loss is caused by ade_crtc_atomic_begin() not
+calling ade_ldi_set_mode(). With this patch applied
+resuming from Weston idle-timeout works well.
+
+Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
+Tested-by: John Stultz <john.stultz@linaro.org>
+Reviewed-by: Xinliang Liu <xinliang.liu@linaro.org>
+Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
++++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
+@@ -521,9 +521,12 @@ static void ade_crtc_atomic_begin(struct
+ {
+       struct ade_crtc *acrtc = to_ade_crtc(crtc);
+       struct ade_hw_ctx *ctx = acrtc->ctx;
++      struct drm_display_mode *mode = &crtc->state->mode;
++      struct drm_display_mode *adj_mode = &crtc->state->adjusted_mode;
+       if (!ctx->power_on)
+               (void)ade_power_up(ctx);
++      ade_ldi_set_mode(acrtc, mode, adj_mode);
+ }
+ static void ade_crtc_atomic_flush(struct drm_crtc *crtc,
diff --git a/queue-4.9/drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch b/queue-4.9/drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch
new file mode 100644 (file)
index 0000000..0ece441
--- /dev/null
@@ -0,0 +1,41 @@
+From f3621a8eb59a913612c8e6e37d81f16b649f8b6c Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Mon, 7 Aug 2017 21:55:45 +1000
+Subject: drm/panel: simple: Add missing panel_simple_unprepare() calls
+
+From: Jonathan Liu <net147@gmail.com>
+
+commit f3621a8eb59a913612c8e6e37d81f16b649f8b6c upstream.
+
+During panel removal or system shutdown panel_simple_disable() is called
+which disables the panel backlight but the panel is still powered due to
+missing calls to panel_simple_unprepare().
+
+Fixes: d02fd93e2cd8 ("drm/panel: simple - Disable panel on shutdown")
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20170807115545.27747-1-net147@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/panel/panel-simple.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/gpu/drm/panel/panel-simple.c
++++ b/drivers/gpu/drm/panel/panel-simple.c
+@@ -369,6 +369,7 @@ static int panel_simple_remove(struct de
+       drm_panel_remove(&panel->base);
+       panel_simple_disable(&panel->base);
++      panel_simple_unprepare(&panel->base);
+       if (panel->ddc)
+               put_device(&panel->ddc->dev);
+@@ -384,6 +385,7 @@ static void panel_simple_shutdown(struct
+       struct panel_simple *panel = dev_get_drvdata(dev);
+       panel_simple_disable(&panel->base);
++      panel_simple_unprepare(&panel->base);
+ }
+ static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
diff --git a/queue-4.9/drm-radeon-fix-atombios-on-big-endian.patch b/queue-4.9/drm-radeon-fix-atombios-on-big-endian.patch
new file mode 100644 (file)
index 0000000..8a97998
--- /dev/null
@@ -0,0 +1,140 @@
+From 4f626a4ac8f57ddabf06d03870adab91e463217f Mon Sep 17 00:00:00 2001
+From: Roman Kapl <rka@sysgo.com>
+Date: Mon, 30 Oct 2017 11:56:13 +0100
+Subject: drm/radeon: fix atombios on big endian
+
+From: Roman Kapl <rka@sysgo.com>
+
+commit 4f626a4ac8f57ddabf06d03870adab91e463217f upstream.
+
+The function for byteswapping the data send to/from atombios was buggy for
+num_bytes not divisible by four. The function must be aware of the fact
+that after byte-swapping the u32 units, valid bytes might end up after the
+num_bytes boundary.
+
+This patch was tested on kernel 3.12 and allowed us to sucesfully use
+DisplayPort on and Radeon SI card. Namely it fixed the link training and
+EDID readout.
+
+The function is patched both in radeon and amd drivers, since the functions
+and the fixes are identical.
+
+Signed-off-by: Roman Kapl <rka@sysgo.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c |   38 ++++++++++++---------------
+ drivers/gpu/drm/radeon/atombios_dp.c         |   38 ++++++++++++---------------
+ 2 files changed, 36 insertions(+), 40 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
+@@ -1788,34 +1788,32 @@ void amdgpu_atombios_scratch_regs_restor
+               WREG32(mmBIOS_SCRATCH_0 + i, adev->bios_scratch[i]);
+ }
+-/* Atom needs data in little endian format
+- * so swap as appropriate when copying data to
+- * or from atom. Note that atom operates on
+- * dw units.
++/* Atom needs data in little endian format so swap as appropriate when copying
++ * data to or from atom. Note that atom operates on dw units.
++ *
++ * Use to_le=true when sending data to atom and provide at least
++ * ALIGN(num_bytes,4) bytes in the dst buffer.
++ *
++ * Use to_le=false when receiving data from atom and provide ALIGN(num_bytes,4)
++ * byes in the src buffer.
+  */
+ void amdgpu_atombios_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le)
+ {
+ #ifdef __BIG_ENDIAN
+-      u8 src_tmp[20], dst_tmp[20]; /* used for byteswapping */
+-      u32 *dst32, *src32;
++      u32 src_tmp[5], dst_tmp[5];
+       int i;
++      u8 align_num_bytes = ALIGN(num_bytes, 4);
+-      memcpy(src_tmp, src, num_bytes);
+-      src32 = (u32 *)src_tmp;
+-      dst32 = (u32 *)dst_tmp;
+       if (to_le) {
+-              for (i = 0; i < ((num_bytes + 3) / 4); i++)
+-                      dst32[i] = cpu_to_le32(src32[i]);
+-              memcpy(dst, dst_tmp, num_bytes);
++              memcpy(src_tmp, src, num_bytes);
++              for (i = 0; i < align_num_bytes / 4; i++)
++                      dst_tmp[i] = cpu_to_le32(src_tmp[i]);
++              memcpy(dst, dst_tmp, align_num_bytes);
+       } else {
+-              u8 dws = num_bytes & ~3;
+-              for (i = 0; i < ((num_bytes + 3) / 4); i++)
+-                      dst32[i] = le32_to_cpu(src32[i]);
+-              memcpy(dst, dst_tmp, dws);
+-              if (num_bytes % 4) {
+-                      for (i = 0; i < (num_bytes % 4); i++)
+-                              dst[dws+i] = dst_tmp[dws+i];
+-              }
++              memcpy(src_tmp, src, align_num_bytes);
++              for (i = 0; i < align_num_bytes / 4; i++)
++                      dst_tmp[i] = le32_to_cpu(src_tmp[i]);
++              memcpy(dst, dst_tmp, num_bytes);
+       }
+ #else
+       memcpy(dst, src, num_bytes);
+--- a/drivers/gpu/drm/radeon/atombios_dp.c
++++ b/drivers/gpu/drm/radeon/atombios_dp.c
+@@ -45,34 +45,32 @@ static char *pre_emph_names[] = {
+ /***** radeon AUX functions *****/
+-/* Atom needs data in little endian format
+- * so swap as appropriate when copying data to
+- * or from atom. Note that atom operates on
+- * dw units.
++/* Atom needs data in little endian format so swap as appropriate when copying
++ * data to or from atom. Note that atom operates on dw units.
++ *
++ * Use to_le=true when sending data to atom and provide at least
++ * ALIGN(num_bytes,4) bytes in the dst buffer.
++ *
++ * Use to_le=false when receiving data from atom and provide ALIGN(num_bytes,4)
++ * byes in the src buffer.
+  */
+ void radeon_atom_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le)
+ {
+ #ifdef __BIG_ENDIAN
+-      u8 src_tmp[20], dst_tmp[20]; /* used for byteswapping */
+-      u32 *dst32, *src32;
++      u32 src_tmp[5], dst_tmp[5];
+       int i;
++      u8 align_num_bytes = ALIGN(num_bytes, 4);
+-      memcpy(src_tmp, src, num_bytes);
+-      src32 = (u32 *)src_tmp;
+-      dst32 = (u32 *)dst_tmp;
+       if (to_le) {
+-              for (i = 0; i < ((num_bytes + 3) / 4); i++)
+-                      dst32[i] = cpu_to_le32(src32[i]);
+-              memcpy(dst, dst_tmp, num_bytes);
++              memcpy(src_tmp, src, num_bytes);
++              for (i = 0; i < align_num_bytes / 4; i++)
++                      dst_tmp[i] = cpu_to_le32(src_tmp[i]);
++              memcpy(dst, dst_tmp, align_num_bytes);
+       } else {
+-              u8 dws = num_bytes & ~3;
+-              for (i = 0; i < ((num_bytes + 3) / 4); i++)
+-                      dst32[i] = le32_to_cpu(src32[i]);
+-              memcpy(dst, dst_tmp, dws);
+-              if (num_bytes % 4) {
+-                      for (i = 0; i < (num_bytes % 4); i++)
+-                              dst[dws+i] = dst_tmp[dws+i];
+-              }
++              memcpy(src_tmp, src, align_num_bytes);
++              for (i = 0; i < align_num_bytes / 4; i++)
++                      dst_tmp[i] = le32_to_cpu(src_tmp[i]);
++              memcpy(dst, dst_tmp, num_bytes);
+       }
+ #else
+       memcpy(dst, src, num_bytes);
diff --git a/queue-4.9/drm-ttm-once-more-fix-ttm_buffer_object_transfer.patch b/queue-4.9/drm-ttm-once-more-fix-ttm_buffer_object_transfer.patch
new file mode 100644 (file)
index 0000000..b6ca22c
--- /dev/null
@@ -0,0 +1,36 @@
+From 4d98e5ee6084f6d7bc578c5d5f86de7156aaa4cb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 30 Oct 2017 14:57:43 +0100
+Subject: drm/ttm: once more fix ttm_buffer_object_transfer
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christian König <christian.koenig@amd.com>
+
+commit 4d98e5ee6084f6d7bc578c5d5f86de7156aaa4cb upstream.
+
+When the mutex is locked just in the moment we copy it we end up with a
+warning that we release a locked mutex.
+
+Fix this by properly reinitializing the mutex.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/ttm/ttm_bo_util.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
++++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
+@@ -473,6 +473,7 @@ static int ttm_buffer_object_transfer(st
+       INIT_LIST_HEAD(&fbo->lru);
+       INIT_LIST_HEAD(&fbo->swap);
+       INIT_LIST_HEAD(&fbo->io_reserve_lru);
++      mutex_init(&fbo->wu_mutex);
+       fbo->moving = NULL;
+       drm_vma_node_reset(&fbo->vma_node);
+       atomic_set(&fbo->cpu_writers, 0);
diff --git a/queue-4.9/hwmon-jc42-optionally-try-to-disable-the-smbus-timeout.patch b/queue-4.9/hwmon-jc42-optionally-try-to-disable-the-smbus-timeout.patch
new file mode 100644 (file)
index 0000000..13c4390
--- /dev/null
@@ -0,0 +1,96 @@
+From 68615eb01f82256c19e41967bfb3eef902f77033 Mon Sep 17 00:00:00 2001
+From: Peter Rosin <peda@axentia.se>
+Date: Mon, 27 Nov 2017 17:31:00 +0100
+Subject: hwmon: (jc42) optionally try to disable the SMBUS timeout
+
+From: Peter Rosin <peda@axentia.se>
+
+commit 68615eb01f82256c19e41967bfb3eef902f77033 upstream.
+
+With a nxp,se97 chip on an atmel sama5d31 board, the I2C adapter driver
+is not always capable of avoiding the 25-35 ms timeout as specified by
+the SMBUS protocol. This may cause silent corruption of the last bit of
+any transfer, e.g. a one is read instead of a zero if the sensor chip
+times out. This also affects the eeprom half of the nxp-se97 chip, where
+this silent corruption was originally noticed. Other I2C adapters probably
+suffer similar issues, e.g. bit-banging comes to mind as risky...
+
+The SMBUS register in the nxp chip is not a standard Jedec register, but
+it is not special to the nxp chips either, at least the atmel chips
+have the same mechanism. Therefore, do not special case this on the
+manufacturer, it is opt-in via the device property anyway.
+
+Signed-off-by: Peter Rosin <peda@axentia.se>
+Acked-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/devicetree/bindings/hwmon/jc42.txt |    4 ++++
+ drivers/hwmon/jc42.c                             |   21 +++++++++++++++++++++
+ 2 files changed, 25 insertions(+)
+
+--- a/Documentation/devicetree/bindings/hwmon/jc42.txt
++++ b/Documentation/devicetree/bindings/hwmon/jc42.txt
+@@ -34,6 +34,10 @@ Required properties:
+ - reg: I2C address
++Optional properties:
++- smbus-timeout-disable: When set, the smbus timeout function will be disabled.
++                       This is not supported on all chips.
++
+ Example:
+ temp-sensor@1a {
+--- a/drivers/hwmon/jc42.c
++++ b/drivers/hwmon/jc42.c
+@@ -22,6 +22,7 @@
+  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  */
++#include <linux/bitops.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
+ #include <linux/slab.h>
+@@ -45,6 +46,7 @@ static const unsigned short normal_i2c[]
+ #define JC42_REG_TEMP         0x05
+ #define JC42_REG_MANID                0x06
+ #define JC42_REG_DEVICEID     0x07
++#define JC42_REG_SMBUS                0x22 /* NXP and Atmel, possibly others? */
+ /* Status bits in temperature register */
+ #define JC42_ALARM_CRIT_BIT   15
+@@ -73,6 +75,9 @@ static const unsigned short normal_i2c[]
+ #define ONS_MANID             0x1b09  /* ON Semiconductor */
+ #define STM_MANID             0x104a  /* ST Microelectronics */
++/* SMBUS register */
++#define SMBUS_STMOUT          BIT(7)  /* SMBus time-out, active low */
++
+ /* Supported chips */
+ /* Analog Devices */
+@@ -476,6 +481,22 @@ static int jc42_probe(struct i2c_client
+       data->extended = !!(cap & JC42_CAP_RANGE);
++      if (device_property_read_bool(dev, "smbus-timeout-disable")) {
++              int smbus;
++
++              /*
++               * Not all chips support this register, but from a
++               * quick read of various datasheets no chip appears
++               * incompatible with the below attempt to disable
++               * the timeout. And the whole thing is opt-in...
++               */
++              smbus = i2c_smbus_read_word_swapped(client, JC42_REG_SMBUS);
++              if (smbus < 0)
++                      return smbus;
++              i2c_smbus_write_word_swapped(client, JC42_REG_SMBUS,
++                                           smbus | SMBUS_STMOUT);
++      }
++
+       config = i2c_smbus_read_word_swapped(client, JC42_REG_CONFIG);
+       if (config < 0)
+               return config;
diff --git a/queue-4.9/nfs-revalidate-.-etc-correctly-on-open.patch b/queue-4.9/nfs-revalidate-.-etc-correctly-on-open.patch
new file mode 100644 (file)
index 0000000..abc32c1
--- /dev/null
@@ -0,0 +1,60 @@
+From b688741cb06695312f18b730653d6611e1bad28d Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.com>
+Date: Fri, 25 Aug 2017 17:34:41 +1000
+Subject: NFS: revalidate "." etc correctly on "open".
+
+From: NeilBrown <neilb@suse.com>
+
+commit b688741cb06695312f18b730653d6611e1bad28d upstream.
+
+For correct close-to-open semantics, NFS must validate
+the change attribute of a directory (or file) on open.
+
+Since commit ecf3d1f1aa74 ("vfs: kill FS_REVAL_DOT by adding a
+d_weak_revalidate dentry op"), open() of "." or a path ending ".." is
+not revalidated reliably (except when that direct is a mount point).
+
+Prior to that commit, "." was revalidated using nfs_lookup_revalidate()
+which checks the LOOKUP_OPEN flag and forces revalidation if the flag is
+set.
+Since that commit, nfs_weak_revalidate() is used for NFSv3 (which
+ignores the flags) and nothing is used for NFSv4.
+
+This is fixed by using nfs_lookup_verify_inode() in
+nfs_weak_revalidate().  This does the revalidation exactly when needed.
+Also, add a definition of .d_weak_revalidate for NFSv4.
+
+The incorrect behavior is easily demonstrated by running "echo *" in
+some non-mountpoint NFS directory while watching network traffic.
+Without this patch, "echo *" sometimes doesn't produce any traffic.
+With the patch it always does.
+
+Fixes: ecf3d1f1aa74 ("vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op")
+cc: stable@vger.kernel.org (3.9+)
+Signed-off-by: NeilBrown <neilb@suse.com>
+Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/dir.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/nfs/dir.c
++++ b/fs/nfs/dir.c
+@@ -1292,7 +1292,7 @@ static int nfs_weak_revalidate(struct de
+               return 0;
+       }
+-      error = nfs_revalidate_inode(NFS_SERVER(inode), inode);
++      error = nfs_lookup_verify_inode(inode, flags);
+       dfprintk(LOOKUPCACHE, "NFS: %s: inode %lu is %s\n",
+                       __func__, inode->i_ino, error ? "invalid" : "valid");
+       return !error;
+@@ -1443,6 +1443,7 @@ static int nfs4_lookup_revalidate(struct
+ const struct dentry_operations nfs4_dentry_operations = {
+       .d_revalidate   = nfs4_lookup_revalidate,
++      .d_weak_revalidate      = nfs_weak_revalidate,
+       .d_delete       = nfs_dentry_delete,
+       .d_iput         = nfs_dentry_iput,
+       .d_automount    = nfs_d_automount,
diff --git a/queue-4.9/nvme-pci-add-quirk-for-delay-before-chk-rdy-for-wdc-sn200.patch b/queue-4.9/nvme-pci-add-quirk-for-delay-before-chk-rdy-for-wdc-sn200.patch
new file mode 100644 (file)
index 0000000..d2e2e39
--- /dev/null
@@ -0,0 +1,42 @@
+From 8c97eeccf0ad8783c057830119467b877bdfced7 Mon Sep 17 00:00:00 2001
+From: Jeff Lien <jeff.lien@wdc.com>
+Date: Tue, 21 Nov 2017 10:44:37 -0600
+Subject: nvme-pci: add quirk for delay before CHK RDY for WDC SN200
+
+From: Jeff Lien <jeff.lien@wdc.com>
+
+commit 8c97eeccf0ad8783c057830119467b877bdfced7 upstream.
+
+And increase the existing delay to cover this device as well.
+
+Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/nvme/host/nvme.h |    2 +-
+ drivers/nvme/host/pci.c  |    2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/nvme/host/nvme.h
++++ b/drivers/nvme/host/nvme.h
+@@ -84,7 +84,7 @@ enum nvme_quirks {
+  * NVME_QUIRK_DELAY_BEFORE_CHK_RDY quirk enabled. The value (in ms) was
+  * found empirically.
+  */
+-#define NVME_QUIRK_DELAY_AMOUNT               2000
++#define NVME_QUIRK_DELAY_AMOUNT               2300
+ enum nvme_ctrl_state {
+       NVME_CTRL_NEW,
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -2109,6 +2109,8 @@ static const struct pci_device_id nvme_i
+               .driver_data = NVME_QUIRK_IDENTIFY_CNS, },
+       { PCI_DEVICE(0x1c58, 0x0003),   /* HGST adapter */
+               .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
++      { PCI_DEVICE(0x1c58, 0x0023),   /* WDC SN200 adapter */
++              .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+       { PCI_DEVICE(0x1c5f, 0x0540),   /* Memblaze Pblaze4 adapter */
+               .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+       { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
diff --git a/queue-4.9/revert-drm-radeon-dont-switch-vt-on-suspend.patch b/queue-4.9/revert-drm-radeon-dont-switch-vt-on-suspend.patch
new file mode 100644 (file)
index 0000000..dca8c41
--- /dev/null
@@ -0,0 +1,37 @@
+From 18c437caa5b18a235dd65cec224eab54bebcee65 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 14 Nov 2017 17:19:29 -0500
+Subject: Revert "drm/radeon: dont switch vt on suspend"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 18c437caa5b18a235dd65cec224eab54bebcee65 upstream.
+
+Fixes distorted colors on some cards on resume from suspend.
+
+This reverts commit b9729b17a414f99c61f4db9ac9f9ed987fa0cbfe.
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98832
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99163
+Bug: https://bugzilla.kernel.org/show_bug.cgi?id=107001
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_fb.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_fb.c
++++ b/drivers/gpu/drm/radeon/radeon_fb.c
+@@ -252,7 +252,6 @@ static int radeonfb_create(struct drm_fb
+       }
+       info->par = rfbdev;
+-      info->skip_vt_switch = true;
+       ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj);
+       if (ret) {
diff --git a/queue-4.9/revert-x86-entry-64-add-missing-irqflags-tracing-to.patch b/queue-4.9/revert-x86-entry-64-add-missing-irqflags-tracing-to.patch
new file mode 100644 (file)
index 0000000..ee52e3b
--- /dev/null
@@ -0,0 +1,75 @@
+From 0ed6c0c778e67f00978a778612862441e48cc529 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Mon, 4 Dec 2017 12:59:57 +0100
+Subject: [PATCH] Revert "x86/entry/64: Add missing irqflags tracing to
+ native_load_gs_index()"
+
+This reverts commit 0d794d0d018f23fb09c50f6ae26868bd6ae343d6 which is
+commit 0d794d0d018f23fb09c50f6ae26868bd6ae343d6 upstream.
+
+Andy writes:
+
+       I think the thing to do is to revert the patch from -stable.
+       The bug it fixes is very minor, and the regression is that it
+       made a pre-existing bug in some nearly-undebuggable core resume
+       code much easier to hit.  I don't feel comfortable with a
+       backport of the latter fix until it has a good long soak in
+       Linus' tree.
+
+Reported-by: Andy Lutomirski <luto@kernel.org>
+Cc: Borislav Petkov <bpetkov@suse.de>
+Cc: Brian Gerst <brgerst@gmail.com>
+Cc: Dave Hansen <dave.hansen@intel.com>
+Cc: Josh Poimboeuf <jpoimboe@redhat.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/entry/entry_64.S | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
+index be9df513141e..e7b0e7ff4c58 100644
+--- a/arch/x86/entry/entry_64.S
++++ b/arch/x86/entry/entry_64.S
+@@ -54,19 +54,15 @@ ENTRY(native_usergs_sysret64)
+ ENDPROC(native_usergs_sysret64)
+ #endif /* CONFIG_PARAVIRT */
+-.macro TRACE_IRQS_FLAGS flags:req
++.macro TRACE_IRQS_IRETQ
+ #ifdef CONFIG_TRACE_IRQFLAGS
+-      bt      $9, \flags              /* interrupts off? */
++      bt      $9, EFLAGS(%rsp)                /* interrupts off? */
+       jnc     1f
+       TRACE_IRQS_ON
+ 1:
+ #endif
+ .endm
+-.macro TRACE_IRQS_IRETQ
+-      TRACE_IRQS_FLAGS EFLAGS(%rsp)
+-.endm
+-
+ /*
+  * When dynamic function tracer is enabled it will add a breakpoint
+  * to all locations that it is about to modify, sync CPUs, update
+@@ -872,13 +868,11 @@ idtentry simd_coprocessor_error          do_simd_coprocessor_error       has_error_code=0
+ ENTRY(native_load_gs_index)
+       pushfq
+       DISABLE_INTERRUPTS(CLBR_ANY & ~CLBR_RDI)
+-      TRACE_IRQS_OFF
+       SWAPGS
+ .Lgs_change:
+       movl    %edi, %gs
+ 2:    ALTERNATIVE "", "mfence", X86_BUG_SWAPGS_FENCE
+       SWAPGS
+-      TRACE_IRQS_FLAGS (%rsp)
+       popfq
+       ret
+ END(native_load_gs_index)
+-- 
+2.15.1
+
index 8a049c19206c4317bac472012c32a756191e80d8..de7e17b8c8d6bd75d623b8b96ddb8b722accde75 100644 (file)
@@ -22,3 +22,15 @@ eeprom-at24-correctly-set-the-size-for-at24mac402.patch
 eeprom-at24-check-at24_read-write-arguments.patch
 i2c-i801-fix-failed-to-allocate-irq-2147483648-error.patch
 bcache-fix-building-error-on-mips.patch
+hwmon-jc42-optionally-try-to-disable-the-smbus-timeout.patch
+nvme-pci-add-quirk-for-delay-before-chk-rdy-for-wdc-sn200.patch
+revert-drm-radeon-dont-switch-vt-on-suspend.patch
+drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vce_ring_parse_cs.patch
+drm-amdgpu-potential-uninitialized-variable-in-amdgpu_vm_update_directories.patch
+drm-radeon-fix-atombios-on-big-endian.patch
+drm-panel-simple-add-missing-panel_simple_unprepare-calls.patch
+drm-hisilicon-ensure-ldi-regs-are-properly-configured.patch
+drm-ttm-once-more-fix-ttm_buffer_object_transfer.patch
+drm-amd-pp-fix-typecast-error-in-powerplay.patch
+revert-x86-entry-64-add-missing-irqflags-tracing-to.patch
+nfs-revalidate-.-etc-correctly-on-open.patch