From: Greg Kroah-Hartman Date: Wed, 21 May 2014 07:01:41 +0000 (+0900) Subject: 3.14-stable patches X-Git-Tag: v3.10.41~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6834533a6aa00b942576034af3b549f5c7575ab;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: drm-qxl-unset-a-pointer-in-sync_obj_unref.patch drm-radeon-call-drm_edid_to_eld-when-we-update-the-edid.patch drm-radeon-clear-needs_reset-flag-if-ib-test-fails.patch drm-radeon-fix-endian-swap-on-hawaii-clear-state-buffer-setup.patch drm-radeon-fix-typo-in-spectre_golden_registers.patch drm-vmwgfx-correct-fb_fix_screeninfo.line_length.patch drm-vmwgfx-fix-query-buffer-locking-order-violation.patch drm-vmwgfx-make-sure-user-space-can-t-dma-across-buffer-object-boundaries-v2.patch fs-don-t-return-0-from-get_anon_bdev.patch mlx4_en-don-t-use-napi_synchronize-inside-mlx4_en_netpoll.patch serial-omap-fix-missing-pm_runtime_resume-handling-by-simplifying-code.patch wl18xx-align-event-mailbox-with-current-fw.patch --- diff --git a/queue-3.14/drm-qxl-unset-a-pointer-in-sync_obj_unref.patch b/queue-3.14/drm-qxl-unset-a-pointer-in-sync_obj_unref.patch new file mode 100644 index 00000000000..e70c1672628 --- /dev/null +++ b/queue-3.14/drm-qxl-unset-a-pointer-in-sync_obj_unref.patch @@ -0,0 +1,29 @@ +From 41ccec352f3c823931a7d9d2a9c7880c14d7415a Mon Sep 17 00:00:00 2001 +From: Maarten Lankhorst +Date: Tue, 1 Apr 2014 15:15:47 +0200 +Subject: drm/qxl: unset a pointer in sync_obj_unref + +From: Maarten Lankhorst + +commit 41ccec352f3c823931a7d9d2a9c7880c14d7415a upstream. + +This fixes a BUG_ON(bo->sync_obj != NULL); in ttm_bo_release_list. + +Signed-off-by: Maarten Lankhorst +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/qxl/qxl_ttm.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/qxl/qxl_ttm.c ++++ b/drivers/gpu/drm/qxl/qxl_ttm.c +@@ -433,6 +433,7 @@ static int qxl_sync_obj_flush(void *sync + + static void qxl_sync_obj_unref(void **sync_obj) + { ++ *sync_obj = NULL; + } + + static void *qxl_sync_obj_ref(void *sync_obj) diff --git a/queue-3.14/drm-radeon-call-drm_edid_to_eld-when-we-update-the-edid.patch b/queue-3.14/drm-radeon-call-drm_edid_to_eld-when-we-update-the-edid.patch new file mode 100644 index 00000000000..8cdccfd5336 --- /dev/null +++ b/queue-3.14/drm-radeon-call-drm_edid_to_eld-when-we-update-the-edid.patch @@ -0,0 +1,35 @@ +From 16086279353cbfecbb3ead474072dced17b97ddc Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Mon, 31 Mar 2014 11:19:46 -0400 +Subject: drm/radeon: call drm_edid_to_eld when we update the edid +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alex Deucher + +commit 16086279353cbfecbb3ead474072dced17b97ddc upstream. + +This needs to be done to update some of the fields in +the connector structure used by the audio code. + +Noticed by several users on irc. + +Signed-off-by: Alex Deucher +Signed-off-by: Christian König +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_display.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/radeon/radeon_display.c ++++ b/drivers/gpu/drm/radeon/radeon_display.c +@@ -792,6 +792,7 @@ int radeon_ddc_get_modes(struct radeon_c + if (radeon_connector->edid) { + drm_mode_connector_update_edid_property(&radeon_connector->base, radeon_connector->edid); + ret = drm_add_edid_modes(&radeon_connector->base, radeon_connector->edid); ++ drm_edid_to_eld(&radeon_connector->base, radeon_connector->edid); + return ret; + } + drm_mode_connector_update_edid_property(&radeon_connector->base, NULL); diff --git a/queue-3.14/drm-radeon-clear-needs_reset-flag-if-ib-test-fails.patch b/queue-3.14/drm-radeon-clear-needs_reset-flag-if-ib-test-fails.patch new file mode 100644 index 00000000000..5e19ae54e92 --- /dev/null +++ b/queue-3.14/drm-radeon-clear-needs_reset-flag-if-ib-test-fails.patch @@ -0,0 +1,35 @@ +From 06a139f7a0885fa2c84962300edd181821ddc2c9 Mon Sep 17 00:00:00 2001 +From: Christian König +Date: Tue, 25 Mar 2014 11:41:40 +0100 +Subject: drm/radeon: clear needs_reset flag if IB test fails +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Christian König + +commit 06a139f7a0885fa2c84962300edd181821ddc2c9 upstream. + +If the IB test fails we don't want to reset the card over +and over again, just accept that it isn't working. + +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=76501 + +Signed-off-by: Christian König +Reviewed-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_ring.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/radeon/radeon_ring.c ++++ b/drivers/gpu/drm/radeon/radeon_ring.c +@@ -257,6 +257,7 @@ int radeon_ib_ring_tests(struct radeon_d + r = radeon_ib_test(rdev, i, ring); + if (r) { + ring->ready = false; ++ rdev->needs_reset = false; + + if (i == RADEON_RING_TYPE_GFX_INDEX) { + /* oh, oh, that's really bad */ diff --git a/queue-3.14/drm-radeon-fix-endian-swap-on-hawaii-clear-state-buffer-setup.patch b/queue-3.14/drm-radeon-fix-endian-swap-on-hawaii-clear-state-buffer-setup.patch new file mode 100644 index 00000000000..242706b802f --- /dev/null +++ b/queue-3.14/drm-radeon-fix-endian-swap-on-hawaii-clear-state-buffer-setup.patch @@ -0,0 +1,35 @@ +From a8947f576728a66bd3aac629bd8ca021a010c808 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 2 Apr 2014 08:42:48 -0400 +Subject: drm/radeon: fix endian swap on hawaii clear state buffer setup +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alex Deucher + +commit a8947f576728a66bd3aac629bd8ca021a010c808 upstream. + +Need to swap on BE. + +Signed-off-by: Alex Deucher +Reviewed-by: Christian König +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/cik.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/radeon/cik.c ++++ b/drivers/gpu/drm/radeon/cik.c +@@ -6521,8 +6521,8 @@ void cik_get_csb_buffer(struct radeon_de + buffer[count++] = cpu_to_le32(0x00000000); + break; + case CHIP_HAWAII: +- buffer[count++] = 0x3a00161a; +- buffer[count++] = 0x0000002e; ++ buffer[count++] = cpu_to_le32(0x3a00161a); ++ buffer[count++] = cpu_to_le32(0x0000002e); + break; + default: + buffer[count++] = cpu_to_le32(0x00000000); diff --git a/queue-3.14/drm-radeon-fix-typo-in-spectre_golden_registers.patch b/queue-3.14/drm-radeon-fix-typo-in-spectre_golden_registers.patch new file mode 100644 index 00000000000..64de6bc83fc --- /dev/null +++ b/queue-3.14/drm-radeon-fix-typo-in-spectre_golden_registers.patch @@ -0,0 +1,31 @@ +From f1553174a207f68a4ec19d436003097e0a4dc405 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 2 Apr 2014 08:42:49 -0400 +Subject: drm/radeon: fix typo in spectre_golden_registers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alex Deucher + +commit f1553174a207f68a4ec19d436003097e0a4dc405 upstream. + +Signed-off-by: Alex Deucher +Reviewed-by: Christian König +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/cik.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/cik.c ++++ b/drivers/gpu/drm/radeon/cik.c +@@ -1095,7 +1095,7 @@ static const u32 spectre_golden_register + 0x8a14, 0xf000003f, 0x00000007, + 0x8b24, 0xffffffff, 0x00ffffff, + 0x28350, 0x3f3f3fff, 0x00000082, +- 0x28355, 0x0000003f, 0x00000000, ++ 0x28354, 0x0000003f, 0x00000000, + 0x3e78, 0x00000001, 0x00000002, + 0x913c, 0xffff03df, 0x00000004, + 0xc768, 0x00000008, 0x00000008, diff --git a/queue-3.14/drm-vmwgfx-correct-fb_fix_screeninfo.line_length.patch b/queue-3.14/drm-vmwgfx-correct-fb_fix_screeninfo.line_length.patch new file mode 100644 index 00000000000..ad0f39cd43b --- /dev/null +++ b/queue-3.14/drm-vmwgfx-correct-fb_fix_screeninfo.line_length.patch @@ -0,0 +1,50 @@ +From aa6de142c901cd2d90ef08db30ae87da214bedcc Mon Sep 17 00:00:00 2001 +From: Christopher Friedt +Date: Sat, 1 Feb 2014 10:01:15 -0500 +Subject: drm/vmwgfx: correct fb_fix_screeninfo.line_length + +From: Christopher Friedt + +commit aa6de142c901cd2d90ef08db30ae87da214bedcc upstream. + +Previously, the vmwgfx_fb driver would allow users to call FBIOSET_VINFO, but it would not adjust +the FINFO properly, resulting in distorted screen rendering. The patch corrects that behaviour. + +See https://bugs.gentoo.org/show_bug.cgi?id=494794 for examples. + +Signed-off-by: Christopher Friedt +Reviewed-by: Thomas Hellstrom +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +@@ -147,7 +147,7 @@ static int vmw_fb_check_var(struct fb_va + } + + if (!vmw_kms_validate_mode_vram(vmw_priv, +- info->fix.line_length, ++ var->xres * var->bits_per_pixel/8, + var->yoffset + var->yres)) { + DRM_ERROR("Requested geom can not fit in framebuffer\n"); + return -EINVAL; +@@ -162,6 +162,8 @@ static int vmw_fb_set_par(struct fb_info + struct vmw_private *vmw_priv = par->vmw_priv; + int ret; + ++ info->fix.line_length = info->var.xres * info->var.bits_per_pixel/8; ++ + ret = vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres, + info->fix.line_length, + par->bpp, par->depth); +@@ -177,6 +179,7 @@ static int vmw_fb_set_par(struct fb_info + vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffset); + vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres); + vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres); ++ vmw_write(vmw_priv, SVGA_REG_BYTES_PER_LINE, info->fix.line_length); + vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID); + } + diff --git a/queue-3.14/drm-vmwgfx-fix-query-buffer-locking-order-violation.patch b/queue-3.14/drm-vmwgfx-fix-query-buffer-locking-order-violation.patch new file mode 100644 index 00000000000..30661a5df54 --- /dev/null +++ b/queue-3.14/drm-vmwgfx-fix-query-buffer-locking-order-violation.patch @@ -0,0 +1,34 @@ +From c8e5e010ef12df6707a1d711a5279a22f67a355e Mon Sep 17 00:00:00 2001 +From: Thomas Hellstrom +Date: Mon, 31 Mar 2014 10:20:30 +0200 +Subject: drm/vmwgfx: Fix query buffer locking order violation + +From: Thomas Hellstrom + +commit c8e5e010ef12df6707a1d711a5279a22f67a355e upstream. + +The query buffers were reserved while holding the binding mutex, which +caused a circular locking dependency. + +Signed-off-by: Thomas Hellstrom +Reviewed-by: Brian Paul +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c +@@ -117,10 +117,10 @@ static void vmw_hw_context_destroy(struc + (void) vmw_context_binding_state_kill + (&container_of(res, struct vmw_user_context, res)->cbs); + (void) vmw_gb_context_destroy(res); ++ mutex_unlock(&dev_priv->binding_mutex); + if (dev_priv->pinned_bo != NULL && + !dev_priv->query_cid_valid) + __vmw_execbuf_release_pinned_bo(dev_priv, NULL); +- mutex_unlock(&dev_priv->binding_mutex); + mutex_unlock(&dev_priv->cmdbuf_mutex); + return; + } diff --git a/queue-3.14/drm-vmwgfx-make-sure-user-space-can-t-dma-across-buffer-object-boundaries-v2.patch b/queue-3.14/drm-vmwgfx-make-sure-user-space-can-t-dma-across-buffer-object-boundaries-v2.patch new file mode 100644 index 00000000000..13b738f3503 --- /dev/null +++ b/queue-3.14/drm-vmwgfx-make-sure-user-space-can-t-dma-across-buffer-object-boundaries-v2.patch @@ -0,0 +1,61 @@ +From cbd75e97a525e3819c02dc18bc2d67aa544c9e45 Mon Sep 17 00:00:00 2001 +From: Thomas Hellstrom +Date: Tue, 15 Apr 2014 18:25:48 +0200 +Subject: drm/vmwgfx: Make sure user-space can't DMA across buffer object boundaries v2 + +From: Thomas Hellstrom + +commit cbd75e97a525e3819c02dc18bc2d67aa544c9e45 upstream. + +We already check that the buffer object we're accessing is registered with +the file. Now also make sure that we can't DMA across buffer object boundaries. + +v2: Code commenting update. + +Signed-off-by: Thomas Hellstrom +Reviewed-by: Jakob Bornecrantz +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +@@ -1214,14 +1214,36 @@ static int vmw_cmd_dma(struct vmw_privat + SVGA3dCmdSurfaceDMA dma; + } *cmd; + int ret; ++ SVGA3dCmdSurfaceDMASuffix *suffix; ++ uint32_t bo_size; + + cmd = container_of(header, struct vmw_dma_cmd, header); ++ suffix = (SVGA3dCmdSurfaceDMASuffix *)((unsigned long) &cmd->dma + ++ header->size - sizeof(*suffix)); ++ ++ /* Make sure device and verifier stays in sync. */ ++ if (unlikely(suffix->suffixSize != sizeof(*suffix))) { ++ DRM_ERROR("Invalid DMA suffix size.\n"); ++ return -EINVAL; ++ } ++ + ret = vmw_translate_guest_ptr(dev_priv, sw_context, + &cmd->dma.guest.ptr, + &vmw_bo); + if (unlikely(ret != 0)) + return ret; + ++ /* Make sure DMA doesn't cross BO boundaries. */ ++ bo_size = vmw_bo->base.num_pages * PAGE_SIZE; ++ if (unlikely(cmd->dma.guest.ptr.offset > bo_size)) { ++ DRM_ERROR("Invalid DMA offset.\n"); ++ return -EINVAL; ++ } ++ ++ bo_size -= cmd->dma.guest.ptr.offset; ++ if (unlikely(suffix->maximumOffset > bo_size)) ++ suffix->maximumOffset = bo_size; ++ + ret = vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface, + user_surface_converter, &cmd->dma.host.sid, + NULL); diff --git a/queue-3.14/fs-don-t-return-0-from-get_anon_bdev.patch b/queue-3.14/fs-don-t-return-0-from-get_anon_bdev.patch new file mode 100644 index 00000000000..aecefc34eff --- /dev/null +++ b/queue-3.14/fs-don-t-return-0-from-get_anon_bdev.patch @@ -0,0 +1,47 @@ +From a2a4dc494a7b7135f460e38e788c4a58f65e4ac3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= +Date: Thu, 3 Apr 2014 21:55:37 +0200 +Subject: fs: Don't return 0 from get_anon_bdev +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= + +commit a2a4dc494a7b7135f460e38e788c4a58f65e4ac3 upstream. + +Commit 9e30cc9595303b27b48 removed an internal mount. This +has the side-effect that rootfs now has FSID 0. Many +userspace utilities assume that st_dev in struct stat +is never 0, so this change breaks a number of tools in +early userspace. + +Since we don't know how many userspace programs are affected, +make sure that FSID is at least 1. + +References: http://article.gmane.org/gmane.linux.kernel/1666905 +References: http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/8557 +Signed-off-by: Thomas Bächler +Acked-by: Tejun Heo +Acked-by: H. Peter Anvin +Tested-by: Alexandre Demers +Signed-off-by: Greg Kroah-Hartman + +--- + fs/super.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/fs/super.c ++++ b/fs/super.c +@@ -802,7 +802,10 @@ void emergency_remount(void) + + static DEFINE_IDA(unnamed_dev_ida); + static DEFINE_SPINLOCK(unnamed_dev_lock);/* protects the above */ +-static int unnamed_dev_start = 0; /* don't bother trying below it */ ++/* Many userspace utilities consider an FSID of 0 invalid. ++ * Always return at least 1 from get_anon_bdev. ++ */ ++static int unnamed_dev_start = 1; + + int get_anon_bdev(dev_t *p) + { diff --git a/queue-3.14/mlx4_en-don-t-use-napi_synchronize-inside-mlx4_en_netpoll.patch b/queue-3.14/mlx4_en-don-t-use-napi_synchronize-inside-mlx4_en_netpoll.patch new file mode 100644 index 00000000000..7c5213b1d71 --- /dev/null +++ b/queue-3.14/mlx4_en-don-t-use-napi_synchronize-inside-mlx4_en_netpoll.patch @@ -0,0 +1,71 @@ +From c98235cb8584a72e95786e17d695a8e5fafcd766 Mon Sep 17 00:00:00 2001 +From: Chris Mason +Date: Tue, 15 Apr 2014 18:09:24 -0400 +Subject: mlx4_en: don't use napi_synchronize inside mlx4_en_netpoll + +From: Chris Mason + +commit c98235cb8584a72e95786e17d695a8e5fafcd766 upstream. + +The mlx4 driver is triggering schedules while atomic inside +mlx4_en_netpoll: + + spin_lock_irqsave(&cq->lock, flags); + napi_synchronize(&cq->napi); + ^^^^^ msleep here + mlx4_en_process_rx_cq(dev, cq, 0); + spin_unlock_irqrestore(&cq->lock, flags); + +This was part of a patch by Alexander Guller from Mellanox in 2011, +but it still isn't upstream. + +Signed-off-by: Chris Mason +Acked-By: Amir Vadai +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/mellanox/mlx4/en_cq.c | 1 - + drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +----- + drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 - + 3 files changed, 1 insertion(+), 7 deletions(-) + +--- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c ++++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c +@@ -66,7 +66,6 @@ int mlx4_en_create_cq(struct mlx4_en_pri + + cq->ring = ring; + cq->is_tx = mode; +- spin_lock_init(&cq->lock); + + /* Allocate HW buffers on provided NUMA node. + * dev->numa_node is used in mtt range allocation flow. +--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c ++++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +@@ -1315,15 +1315,11 @@ static void mlx4_en_netpoll(struct net_d + { + struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_cq *cq; +- unsigned long flags; + int i; + + for (i = 0; i < priv->rx_ring_num; i++) { + cq = priv->rx_cq[i]; +- spin_lock_irqsave(&cq->lock, flags); +- napi_synchronize(&cq->napi); +- mlx4_en_process_rx_cq(dev, cq, 0); +- spin_unlock_irqrestore(&cq->lock, flags); ++ napi_schedule(&cq->napi); + } + } + #endif +--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h ++++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +@@ -309,7 +309,6 @@ struct mlx4_en_cq { + struct mlx4_cq mcq; + struct mlx4_hwq_resources wqres; + int ring; +- spinlock_t lock; + struct net_device *dev; + struct napi_struct napi; + int size; diff --git a/queue-3.14/serial-omap-fix-missing-pm_runtime_resume-handling-by-simplifying-code.patch b/queue-3.14/serial-omap-fix-missing-pm_runtime_resume-handling-by-simplifying-code.patch new file mode 100644 index 00000000000..17b320a4333 --- /dev/null +++ b/queue-3.14/serial-omap-fix-missing-pm_runtime_resume-handling-by-simplifying-code.patch @@ -0,0 +1,121 @@ +From d758c9c1b36b4d9a141c2146c70398d756167ed1 Mon Sep 17 00:00:00 2001 +From: Tony Lindgren +Date: Tue, 25 Mar 2014 11:48:47 -0700 +Subject: serial: omap: Fix missing pm_runtime_resume handling by simplifying code + +From: Tony Lindgren + +commit d758c9c1b36b4d9a141c2146c70398d756167ed1 upstream. + +The lack of pm_runtime_resume handling for the device state leads into +device wake-up interrupts not working after a while for runtime PM. + +Also, serial-omap is confused about the use of device_may_wakeup. +The checks for device_may_wakeup should only be done for suspend and +resume, not for pm_runtime_suspend and pm_runtime_resume. The wake-up +events for PM runtime should always be enabled. + +The lack of pm_runtime_resume handling leads into device wake-up +interrupts not working after a while for runtime PM. + +Rather than try to patch over the issue of adding complex tests to +the pm_runtime_resume, let's fix the issues properly: + +1. Make serial_omap_enable_wakeup deal with all internal PM state + handling so we don't need to test for up->wakeups_enabled elsewhere. + + Later on once omap3 boots in device tree only mode we can also + remove the up->wakeups_enabled flag and rely on the wake-up + interrupt enable/disable state alone. + +2. Do the device_may_wakeup checks in suspend and resume only, + for runtime PM the wake-up events need to be always enabled. + +3. Finally just call serial_omap_enable_wakeup and make sure we + call it also in pm_runtime_resume. + +4. Note that we also have to use disable_irq_nosync as serial_omap_irq + calls pm_runtime_get_sync. + +Fixes: 2a0b965cfb6e (serial: omap: Add support for optional wake-up) +Signed-off-by: Tony Lindgren +Acked-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/omap-serial.c | 29 +++++++++++++++++------------ + 1 file changed, 17 insertions(+), 12 deletions(-) + +--- a/drivers/tty/serial/omap-serial.c ++++ b/drivers/tty/serial/omap-serial.c +@@ -225,14 +225,19 @@ static inline void serial_omap_enable_wa + if (enable) + enable_irq(up->wakeirq); + else +- disable_irq(up->wakeirq); ++ disable_irq_nosync(up->wakeirq); + } + + static void serial_omap_enable_wakeup(struct uart_omap_port *up, bool enable) + { + struct omap_uart_port_info *pdata = dev_get_platdata(up->dev); + ++ if (enable == up->wakeups_enabled) ++ return; ++ + serial_omap_enable_wakeirq(up, enable); ++ up->wakeups_enabled = enable; ++ + if (!pdata || !pdata->enable_wakeup) + return; + +@@ -1488,6 +1493,11 @@ static int serial_omap_suspend(struct de + uart_suspend_port(&serial_omap_reg, &up->port); + flush_work(&up->qos_work); + ++ if (device_may_wakeup(dev)) ++ serial_omap_enable_wakeup(up, true); ++ else ++ serial_omap_enable_wakeup(up, false); ++ + return 0; + } + +@@ -1495,6 +1505,9 @@ static int serial_omap_resume(struct dev + { + struct uart_omap_port *up = dev_get_drvdata(dev); + ++ if (device_may_wakeup(dev)) ++ serial_omap_enable_wakeup(up, false); ++ + uart_resume_port(&serial_omap_reg, &up->port); + + return 0; +@@ -1870,17 +1883,7 @@ static int serial_omap_runtime_suspend(s + + up->context_loss_cnt = serial_omap_get_context_loss_count(up); + +- if (device_may_wakeup(dev)) { +- if (!up->wakeups_enabled) { +- serial_omap_enable_wakeup(up, true); +- up->wakeups_enabled = true; +- } +- } else { +- if (up->wakeups_enabled) { +- serial_omap_enable_wakeup(up, false); +- up->wakeups_enabled = false; +- } +- } ++ serial_omap_enable_wakeup(up, true); + + up->latency = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE; + schedule_work(&up->qos_work); +@@ -1894,6 +1897,8 @@ static int serial_omap_runtime_resume(st + + int loss_cnt = serial_omap_get_context_loss_count(up); + ++ serial_omap_enable_wakeup(up, false); ++ + if (loss_cnt < 0) { + dev_dbg(dev, "serial_omap_get_context_loss_count failed : %d\n", + loss_cnt); diff --git a/queue-3.14/series b/queue-3.14/series index a5295a07725..c090a1ad9e6 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -48,3 +48,15 @@ usb-qcserial-add-sierra-wireless-mc7305-mc7355.patch usb-option-add-olivetti-olicard-500.patch usb-option-add-alcatel-l800ma.patch usb-option-add-and-update-a-number-of-cmotech-devices.patch +serial-omap-fix-missing-pm_runtime_resume-handling-by-simplifying-code.patch +mlx4_en-don-t-use-napi_synchronize-inside-mlx4_en_netpoll.patch +fs-don-t-return-0-from-get_anon_bdev.patch +wl18xx-align-event-mailbox-with-current-fw.patch +drm-vmwgfx-correct-fb_fix_screeninfo.line_length.patch +drm-vmwgfx-fix-query-buffer-locking-order-violation.patch +drm-vmwgfx-make-sure-user-space-can-t-dma-across-buffer-object-boundaries-v2.patch +drm-qxl-unset-a-pointer-in-sync_obj_unref.patch +drm-radeon-clear-needs_reset-flag-if-ib-test-fails.patch +drm-radeon-call-drm_edid_to_eld-when-we-update-the-edid.patch +drm-radeon-fix-endian-swap-on-hawaii-clear-state-buffer-setup.patch +drm-radeon-fix-typo-in-spectre_golden_registers.patch diff --git a/queue-3.14/wl18xx-align-event-mailbox-with-current-fw.patch b/queue-3.14/wl18xx-align-event-mailbox-with-current-fw.patch new file mode 100644 index 00000000000..c507669c4e0 --- /dev/null +++ b/queue-3.14/wl18xx-align-event-mailbox-with-current-fw.patch @@ -0,0 +1,56 @@ +From c0da71ff4d2cbf113465bff9a7c413154be25a89 Mon Sep 17 00:00:00 2001 +From: Eliad Peller +Date: Sun, 13 Apr 2014 16:33:51 +0300 +Subject: wl18xx: align event mailbox with current fw + +From: Eliad Peller + +commit c0da71ff4d2cbf113465bff9a7c413154be25a89 upstream. + +Some fields are missing from the event mailbox +struct definitions, which cause issues when +trying to handle some events. + +Add the missing fields in order to align the +struct size (without adding actual support +for the new fields). + +Reported-and-tested-by: Imre Kaloz +Fixes: 028e724 ("wl18xx: move to new firmware (wl18xx-fw-3.bin)") +Signed-off-by: Eliad Peller +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ti/wl18xx/event.h | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +--- a/drivers/net/wireless/ti/wl18xx/event.h ++++ b/drivers/net/wireless/ti/wl18xx/event.h +@@ -68,6 +68,26 @@ struct wl18xx_event_mailbox { + + /* bitmap of inactive stations (by HLID) */ + __le32 inactive_sta_bitmap; ++ ++ /* rx BA win size indicated by RX_BA_WIN_SIZE_CHANGE_EVENT_ID */ ++ u8 rx_ba_role_id; ++ u8 rx_ba_link_id; ++ u8 rx_ba_win_size; ++ u8 padding; ++ ++ /* smart config */ ++ u8 sc_ssid_len; ++ u8 sc_pwd_len; ++ u8 sc_token_len; ++ u8 padding1; ++ u8 sc_ssid[32]; ++ u8 sc_pwd[32]; ++ u8 sc_token[32]; ++ ++ /* smart config sync channel */ ++ u8 sc_sync_channel; ++ u8 sc_sync_band; ++ u8 padding2[2]; + } __packed; + + int wl18xx_wait_for_event(struct wl1271 *wl, enum wlcore_wait_event event,