1. 30 11月, 2016 3 次提交
  2. 29 11月, 2016 3 次提交
  3. 26 11月, 2016 8 次提交
  4. 25 11月, 2016 7 次提交
    • R
      drm: hdlcd: Fix cleanup order · 747e5a5f
      Robin Murphy 提交于
      If hdlcd_drm_bind() fails at drm_fbdev_cma_init(), its cleanup will call
      drm_mode_config_cleanup() as if to balance drm_mode_config_reset(). The
      net result is that drm_connector_cleanup() will clean up the active
      connectors long before component_unbind_all() gets called, so when the
      connector later tries to clean up itself after being unbound, Bad Things
      can happen:
      
      [    4.121888] Unable to handle kernel NULL pointer dereference at
      virtual address 00000000
      [    4.129951] pgd = ffffff80091e0000
      [    4.133345] [00000000] *pgd=00000009ffffe003, *pud=00000009ffffe003,
      *pmd=0000000000000000
      [    4.141613] Internal error: Oops: 96000005 [#1] PREEMPT SMP
      [    4.147144] Modules linked in:
      [    4.150188] CPU: 0 PID: 122 Comm: kworker/u12:2 Not tainted
      4.8.0-rc2+ #989
      [    4.157097] Hardware name: ARM Juno development board (r1) (DT)
      [    4.162981] Workqueue: deferwq deferred_probe_work_func
      [    4.168173] task: ffffffc975d93200 task.stack: ffffffc975dac000
      [    4.174055] PC is at drm_connector_cleanup+0x58/0x1c0
      [    4.179074] LR is at tda998x_unbind+0x24/0x40
      [    4.183401] pc : [<ffffff80084c46f0>] lr : [<ffffff800850414c>]
      pstate: 00000045
      [    4.190750] sp : ffffffc975dafa10
      [    4.194041] x29: ffffffc975dafa10 x28: ffffffc9768152a8
      [    4.199325] x27: ffffffc97ff46450 x26: ffffff8008d99000
      [    4.204608] x25: dead000000000100 x24: dead000000000200
      [    4.209891] x23: ffffffc976bf91e8 x22: 0000000000000000
      [    4.215172] x21: ffffffc976bf9170 x20: ffffffc976bf9170
      [    4.220454] x19: ffffffc976bf9018 x18: 0000000000000000
      [    4.225737] x17: 0000000074ce71ee x16: 000000008ff5d35f
      [    4.231019] x15: ffffffc97681e91c x14: ffffffffffffffff
      [    4.236301] x13: ffffffc97681e185 x12: 0000000000000038
      [    4.241583] x11: 0101010101010101 x10: 0000000000000000
      [    4.246866] x9 : 0000000040000000 x8 : 0000000000210d00
      [    4.252148] x7 : ffffffc97fea8c00 x6 : 000000000000001b
      [    4.257430] x5 : ffffff80084b7b8c x4 : 0000000000000080
      [    4.262712] x3 : ffffff8008504128 x2 : ffffffc975df3800
      [    4.267993] x1 : 0000000000000000 x0 : 0000000000000000
      ...
      [    4.750937] [<ffffff80084c46f0>] drm_connector_cleanup+0x58/0x1c0
      [    4.756990] [<ffffff800850414c>] tda998x_unbind+0x24/0x40
      [    4.762354] [<ffffff8008507918>] component_unbind.isra.4+0x28/0x50
      [    4.768492] [<ffffff8008507a0c>] component_unbind_all+0xcc/0xd8
      [    4.774373] [<ffffff80084d5adc>] hdlcd_drm_bind+0x234/0x418
      [    4.779909] [<ffffff8008507b58>] try_to_bring_up_master+0x140/0x1a0
      [    4.786133] [<ffffff8008507c50>] component_add+0x98/0x170
      [    4.791496] [<ffffff8008504b90>] tda998x_probe+0x18/0x20
      [    4.796774] [<ffffff80086bf914>] i2c_device_probe+0x164/0x258
      [    4.802481] [<ffffff800850d094>] driver_probe_device+0x204/0x2b0
      [    4.808447] [<ffffff800850d28c>] __device_attach_driver+0x9c/0xf8
      [    4.814498] [<ffffff800850b108>] bus_for_each_drv+0x58/0x98
      [    4.820033] [<ffffff800850cd64>] __device_attach+0xc4/0x138
      [    4.825567] [<ffffff800850d338>] device_initial_probe+0x10/0x18
      [    4.831446] [<ffffff800850c124>] bus_probe_device+0x94/0xa0
      [    4.836981] [<ffffff800850c5b0>] deferred_probe_work_func+0x78/0xb0
      [    4.843207] [<ffffff80080d2998>] process_one_work+0x118/0x378
      [    4.848914] [<ffffff80080d2c40>] worker_thread+0x48/0x498
      [    4.854276] [<ffffff80080d8918>] kthread+0xd0/0xe8
      [    4.859036] [<ffffff8008082e90>] ret_from_fork+0x10/0x40
      [    4.864314] Code: f2fbd5b9 f2fbd5b8 f8478ee0 eb17001f (f9400013)
      [    4.870472] ---[ end trace a643cfe4ce1d838b ]---
      
      Fix this by moving the drm_mode_config_cleanup() much later such that it
      correctly balances drm_mode_config_init().
      Suggested-by: NRussell King <linux@armlinux.org.uk>
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      747e5a5f
    • V
      mfd: wm8994-core: Don't use managed regulator bulk get API · 1a41741f
      Viresh Kumar 提交于
      The kernel WARNs and then crashes today if wm8994_device_init() fails
      after calling devm_regulator_bulk_get().
      
      That happens because there are multiple devices involved here and the
      order in which managed resources are freed isn't correct.
      
      The regulators are added as children of wm8994->dev.  Whereas,
      devm_regulator_bulk_get() receives wm8994->dev as the device, though it
      gets the same regulators which were added as children of wm8994->dev
      earlier.
      
      During failures, the children are removed first and the core eventually
      calls regulator_unregister() for them. As regulator_put() was never done
      for them (opposite of devm_regulator_bulk_get()), the kernel WARNs at
      
      	WARN_ON(rdev->open_count);
      
      And eventually it crashes from debugfs_remove_recursive().
      
      --------x------------------x----------------
      
       wm8994 3-001a: Device is not a WM8994, ID is 0
       ------------[ cut here ]------------
       WARNING: CPU: 0 PID: 1 at /mnt/ssd/all/work/repos/devel/linux/drivers/regulator/core.c:4072 regulator_unregister+0xc8/0xd0
       Modules linked in:
       CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc6-00154-g54fe84cbd50b #41
       Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
       [<c010e24c>] (unwind_backtrace) from [<c010af38>] (show_stack+0x10/0x14)
       [<c010af38>] (show_stack) from [<c032a1c4>] (dump_stack+0x88/0x9c)
       [<c032a1c4>] (dump_stack) from [<c011a98c>] (__warn+0xe8/0x100)
       [<c011a98c>] (__warn) from [<c011aa54>] (warn_slowpath_null+0x20/0x28)
       [<c011aa54>] (warn_slowpath_null) from [<c0384a0c>] (regulator_unregister+0xc8/0xd0)
       [<c0384a0c>] (regulator_unregister) from [<c0406434>] (release_nodes+0x16c/0x1dc)
       [<c0406434>] (release_nodes) from [<c04039c4>] (__device_release_driver+0x8c/0x110)
       [<c04039c4>] (__device_release_driver) from [<c0403a64>] (device_release_driver+0x1c/0x28)
       [<c0403a64>] (device_release_driver) from [<c0402b24>] (bus_remove_device+0xd8/0x104)
       [<c0402b24>] (bus_remove_device) from [<c03ffcd8>] (device_del+0x10c/0x218)
       [<c03ffcd8>] (device_del) from [<c0404e4c>] (platform_device_del+0x1c/0x88)
       [<c0404e4c>] (platform_device_del) from [<c0404ec4>] (platform_device_unregister+0xc/0x20)
       [<c0404ec4>] (platform_device_unregister) from [<c0428bc0>] (mfd_remove_devices_fn+0x5c/0x64)
       [<c0428bc0>] (mfd_remove_devices_fn) from [<c03ff9d8>] (device_for_each_child_reverse+0x4c/0x78)
       [<c03ff9d8>] (device_for_each_child_reverse) from [<c04288c4>] (mfd_remove_devices+0x20/0x30)
       [<c04288c4>] (mfd_remove_devices) from [<c042758c>] (wm8994_device_init+0x2ac/0x7f0)
       [<c042758c>] (wm8994_device_init) from [<c04f14a8>] (i2c_device_probe+0x178/0x1fc)
       [<c04f14a8>] (i2c_device_probe) from [<c04036fc>] (driver_probe_device+0x214/0x2c0)
       [<c04036fc>] (driver_probe_device) from [<c0403854>] (__driver_attach+0xac/0xb0)
       [<c0403854>] (__driver_attach) from [<c0401a74>] (bus_for_each_dev+0x68/0x9c)
       [<c0401a74>] (bus_for_each_dev) from [<c0402cf0>] (bus_add_driver+0x1a0/0x218)
       [<c0402cf0>] (bus_add_driver) from [<c040406c>] (driver_register+0x78/0xf8)
       [<c040406c>] (driver_register) from [<c04f20a0>] (i2c_register_driver+0x34/0x84)
       [<c04f20a0>] (i2c_register_driver) from [<c01017d0>] (do_one_initcall+0x40/0x170)
       [<c01017d0>] (do_one_initcall) from [<c0a00dbc>] (kernel_init_freeable+0x15c/0x1fc)
       [<c0a00dbc>] (kernel_init_freeable) from [<c06e07b0>] (kernel_init+0x8/0x114)
       [<c06e07b0>] (kernel_init) from [<c0107978>] (ret_from_fork+0x14/0x3c)
       ---[ end trace 0919d3d0bc998260 ]---
      
       [snip..]
      
       Unable to handle kernel NULL pointer dereference at virtual address 00000078
       pgd = c0004000
       [00000078] *pgd=00000000
       Internal error: Oops: 5 [#1] PREEMPT SMP ARM
       Modules linked in:
       CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W       4.8.0-rc6-00154-g54fe84cbd50b #41
       Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
       task: ee874000 task.stack: ee878000
       PC is at down_write+0x14/0x54
       LR is at debugfs_remove_recursive+0x30/0x150
      
       [snip..]
      
       [<c06e489c>] (down_write) from [<c02e9954>] (debugfs_remove_recursive+0x30/0x150)
       [<c02e9954>] (debugfs_remove_recursive) from [<c0382b78>] (_regulator_put+0x24/0xac)
       [<c0382b78>] (_regulator_put) from [<c0382c1c>] (regulator_put+0x1c/0x2c)
       [<c0382c1c>] (regulator_put) from [<c0406434>] (release_nodes+0x16c/0x1dc)
       [<c0406434>] (release_nodes) from [<c04035d4>] (driver_probe_device+0xec/0x2c0)
       [<c04035d4>] (driver_probe_device) from [<c0403854>] (__driver_attach+0xac/0xb0)
       [<c0403854>] (__driver_attach) from [<c0401a74>] (bus_for_each_dev+0x68/0x9c)
       [<c0401a74>] (bus_for_each_dev) from [<c0402cf0>] (bus_add_driver+0x1a0/0x218)
       [<c0402cf0>] (bus_add_driver) from [<c040406c>] (driver_register+0x78/0xf8)
       [<c040406c>] (driver_register) from [<c04f20a0>] (i2c_register_driver+0x34/0x84)
       [<c04f20a0>] (i2c_register_driver) from [<c01017d0>] (do_one_initcall+0x40/0x170)
       [<c01017d0>] (do_one_initcall) from [<c0a00dbc>] (kernel_init_freeable+0x15c/0x1fc)
       [<c0a00dbc>] (kernel_init_freeable) from [<c06e07b0>] (kernel_init+0x8/0x114)
       [<c06e07b0>] (kernel_init) from [<c0107978>] (ret_from_fork+0x14/0x3c)
       Code: e1a04000 f590f000 e3a03001 e34f3fff (e1902f9f)
       ---[ end trace 0919d3d0bc998262 ]---
      
      --------x------------------x----------------
      
      Fix the kernel warnings and crashes by using regulator_bulk_get()
      instead of devm_regulator_bulk_get() and explicitly freeing the supplies
      in exit paths.
      
      Tested on Exynos 5250, dual core ARM A15 machine.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      1a41741f
    • V
      mfd: wm8994-core: Disable regulators before removing them · 3cfc43df
      Viresh Kumar 提交于
      The order in which resources were freed in wm8994_device_exit() isn't
      correct. The regulators are removed before they are disabled.
      
      Fix it by reordering code a bit, which makes it exact opposite of
      wm8994_device_init() as well.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      3cfc43df
    • P
      mfd: syscon: Support native-endian regmaps · d29ccdb3
      Paul Burton 提交于
      The regmap devicetree binding documentation states that a native-endian
      property should be supported as well as big-endian & little-endian,
      however syscon in its duplication of the parsing of these properties
      omits support for native-endian. Fix this by setting
      REGMAP_ENDIAN_NATIVE when a native-endian property is found.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      d29ccdb3
    • A
      gpu/drm/exynos/exynos_hdmi - Unmap region obtained by of_iomap · d7420002
      Arvind Yadav 提交于
      Free memory mapping, if hdmi_probe is not successful.
      Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      d7420002
    • F
      net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change · 76da8706
      Florian Fainelli 提交于
      In case the link change and EEE is enabled or disabled, always try to
      re-negotiate this with the link partner.
      
      Fixes: 450b05c1 ("net: dsa: bcm_sf2: add support for controlling EEE")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      76da8706
    • A
      bnxt: do not busy-poll when link is down · 867d1212
      Andy Gospodarek 提交于
      When busy polling while a link is down (during a link-flap test), TX
      timeouts were observed as well as the following messages in the ring
      buffer:
      
      bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
      bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free tx failed. rc:-1
      bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
      bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free rx failed. rc:-1
      
      These were resolved by checking for link status and returning if link
      was not up.
      Signed-off-by: NAndy Gospodarek <gospo@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Tested-by: NRob Miller <rob.miller@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      867d1212
  5. 24 11月, 2016 17 次提交
  6. 22 11月, 2016 2 次提交
    • R
      drm/arm: hdlcd: fix plane base address update · 7a79279e
      Russell King 提交于
      While testing HDMI with Xorg on the Juno board, I find that when Xorg
      starts up or shuts down, the display is shifted significantly to the
      right and wrapped in the active region.  (No sync bars are visible.)
      The timings are correct, it behaves as if the start address has been
      shifted many pixels _into_ the framebuffer.
      
      This occurs whenever the display mode size is changed - using xrandr
      in Xorg shows that changing the resolution triggers the problem
      almost every time, but changing the refresh rate does not.
      
      Using devmem2 to disable and re-enable the HDLCD resolves the issue,
      and repeated disable/enable cycles do not make the issue re-appear.
      Further debugging shows that we try to update the controller
      configuration while enabled.
      
      Alwys ensure that the HDLCD is disabled prior to updating the
      controller timings, and use drm_crtc_vblank_off()/drm_crtc_vblank_on()
      so that DRM knows whether it can expect vblank interrupts.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      7a79279e
    • M
      watchdog: wdat_wdt: Select WATCHDOG_CORE · effb46b4
      Mika Westerberg 提交于
      The WDAT watchdog driver uses functionality provided by the watchdog timer
      core but it did not select it explicitly. This results following linker
      error when only WDAT_WDT is enabled in Kconfig:
      
        drivers/built-in.o: In function `wdat_wdt_probe':
        drivers/watchdog/wdat_wdt.c:444: undefined reference to `devm_watchdog_register_device'
      
      Fix this by explicitly selecting WATCHDOG_CORE when WDAT watchdog driver is
      enabled.
      
      Fixes: 058dfc76 (ACPI / watchdog: Add support for WDAT hardware watchdog)
      Reported-by: NVegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      effb46b4