1. 16 Jul, 2015 6 commits
    • Grygorii Strashko's avatar
      gpio: pca953x: fix nested irqs rescheduling · fdd50409
      Grygorii Strashko authored
      pca953x interrupt controller functionality is implemented using
      nested threaded IRQs which require parent_irq to be configured
      properly otherwise below warning can be seen if IRQ core
      will try re-schedule nested IRQ:
      
      ------------[ cut here ]------------
      WARNING: CPU: 1 PID: 12 at kernel/irq/manage.c:696 irq_nested_primary_handler+0x30/0x38()
      Primary handler called for nested irq 301
      Modules linked in: uinput ipv6 smsc95xx usbnet mii imx2_wdt etnaviv(C) matrix_keypad matrix_keymap ar1021_i2c
      CPU: 1 PID: 12 Comm: ksoftirqd/1 Tainted: G        WC    4.1.1 #9
      Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      Backtrace:
      [<c0013298>] (dump_backtrace) from [<c0013488>] (show_stack+0x20/0x24)
      [<c0013468>] (show_stack) from [<c05743c4>] (dump_stack+0x70/0xc0)
      [<c0574354>] (dump_stack) from [<c002b7b8>] (warn_slowpath_common+0x88/0xc0)
      [<c002b730>] (warn_slowpath_common) from [<c002b8ac>] (warn_slowpath_fmt+0x40/0x48)
      [<c002b870>] (warn_slowpath_fmt) from [<c0075798>] (irq_nested_primary_handler+0x30/0x38)
      [<c0075768>] (irq_nested_primary_handler) from [<c0075200>] (handle_irq_event_percpu+0x70/0x2d0)
      [<c0075190>] (handle_irq_event_percpu) from [<c00754ac>] (handle_irq_event+0x4c/0x6c)
      [<c0075460>] (handle_irq_event) from [<c0078204>] (handle_simple_irq+0xa4/0xc8)
      [<c0078160>] (handle_simple_irq) from [<c0077cd4>] (resend_irqs+0x50/0x7c)
      [<c0077c84>] (resend_irqs) from [<c002f99c>] (tasklet_action+0x94/0x140)
      [<c002f908>] (tasklet_action) from [<c002eea8>] (__do_softirq+0xa0/0x3c8)
      [<c002ee08>] (__do_softirq) from [<c002f208>] (run_ksoftirqd+0x38/0x54)
      [<c002f1d0>] (run_ksoftirqd) from [<c004b1e4>] (smpboot_thread_fn+0x1f8/0x2f0)
      [<c004afec>] (smpboot_thread_fn) from [<c0047744>] (kthread+0xe8/0x104)
      [<c004765c>] (kthread) from [<c000fac8>] (ret_from_fork+0x14/0x2c)
      ---[ end trace 96052cda48865769 ]---
      
      The issue was reported and described in details by Lothar Waßmann and
      Christian Gmeiner in https://lkml.org/lkml/2014/9/9/123.
      
      Fix it by adding missed call of gpiochip_set_chained_irqchip()
      so GPIO IRQ chip helpers will set parent_irq for nested IRQs
      properly.
      Reported-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
      Tested-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      fdd50409
    • Grygorii Strashko's avatar
      gpio: omap: prevent module from being unloaded while in use · c23837ce
      Grygorii Strashko authored
      OMAP GPIO driver allowed to be built as loadable module, but it
      doesn't set owner field in GPIO chip structure. As result,
      module_get/put() API is not working and it's possible to unload
      OMAP driver while in use:
      
        omap_gpio 48051000.gpio: REMOVING GPIOCHIP WITH GPIOS STILL REQUESTED
      
      Hence, add missing configuration.
      
      Cc: Tony Lindgren <tony@atomide.com>
      Fixes: cac089f9 ('gpio: omap: Allow building as a loadable module')
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Acked-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      c23837ce
    • Marek Vasut's avatar
      gpio: max732x: Add missing dev reference to gpiochip · 34ab54ed
      Marek Vasut authored
      In case the gpiochip doesn't have the .dev field set, as is the case
      in here, it is not possible to reference this device in DT as a GPIO
      controller. A good example of this problem is that gpio-leds can not
      be used when connected to this chip, the gpio-leds driver bails out
      with -EPROBE_DEFER.
      
      Fix this problem by setting the .dev field of the gpio_chip to the
      parent i2c device.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Mans Rullgard <mans@mansr.com>
      Cc: Olaf Mandel <o.mandel@menlosystems.com>
      Cc: Semen Protsenko <semen.protsenko@globallogic.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      34ab54ed
    • Raphaël Teysseyre's avatar
      gpio/xilinx: Use correct address when setting initial values. · 5b2c9121
      Raphaël Teysseyre authored
      xgpio_save_regs() is used in this driver to setup the initial
      values of the registers in the hardware.
      
      The relevant registers at that time are:
      0x0 -> channel 0 data (32 bits, one for each GPIO on this channel).
      0x4 -> channel 0 tri, controls in/out status for each GPIO of this channel.
      0x8 -> channel 1 data
      0xC -> channel 1 tri
      
      gpio-xilinx.c defines these:
      XGPIO_DATA_OFFSET   (0x0)
      XGPIO_TRI_OFFSET    (0x4)
      XGPIO_CHANNEL_OFFSET	0x8
      
      Before this patch, the "data" register value of channel 1 was written
      at 0x4 intead of 0x8 (overwriting the channel 0 "tri" register),
      and the "tri" register value for channel 1 was written at 0x8 instead of 0xC.
      Signed-off-by: default avatarRaphaël Teysseyre <rteysseyre@gmail.com>
      Reviewed-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      5b2c9121
    • Michal Simek's avatar
      gpio: zynq: Fix problem with unbalanced pm_runtime_enable · 6b956af0
      Michal Simek authored
      Add missing pm_runtime_disabled to remove().
      
      Error log:
      root@zynqmp:~# modprobe gpio_zynq
      root@zynqmp:~# lsmod
          Not tainted
      gpio_zynq 7086 0 - Live 0xffffffbffc00a000
      root@zynqmp:~# rmmod gpio_zynq
      root@zynqmp:~# lsmod
          Not tainted
      root@zynqmp:~# modprobe gpio_zynq
      [  246.924438] zynq-gpio ff0a0000.gpio: Unbalanced pm_runtime_enable!
      root@zynqmp:~# rmmod gpio_zynq
      root@zynqmp:~# lsmod
          Not tainted
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      6b956af0
    • Grygorii Strashko's avatar
      gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type · 977bd8a9
      Grygorii Strashko authored
      Add missed spin_unlock_irqrestore in omap_gpio_irq_type when
      omap_set_gpio_triggering() is failed.
      
      It fixes static checker warning:
      
      	drivers/gpio/gpio-omap.c:523 omap_gpio_irq_type()
      	warn: inconsistent returns 'spin_lock:&bank->lock'.
      
      This fixes commit:
      1562e461 ('gpio: omap: fix error handling in omap_gpio_irq_type')
      Reported-by: default avatarJavier Martinez Canillas <javier@dowhile0.org>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      977bd8a9
  2. 15 Jul, 2015 2 commits
  3. 05 Jul, 2015 4 commits
    • Linus Torvalds's avatar
      Linux 4.2-rc1 · d770e558
      Linus Torvalds authored
      d770e558
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.2-2' of... · a585d2b7
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v4.2-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull late x86 platform driver updates from Darren Hart:
       "The following came in a bit later and I wanted them to bake in next a
        few more days before submitting, thus the second pull.
      
        A new intel_pmc_ipc driver, a symmetrical allocation and free fix in
        dell-laptop, a couple minor fixes, and some updated documentation in
        the dell-laptop comments.
      
        intel_pmc_ipc:
         - Add Intel Apollo Lake PMC IPC driver
      
        tc1100-wmi:
         - Delete an unnecessary check before the function call "kfree"
      
        dell-laptop:
         - Fix allocating & freeing SMI buffer page
         - Show info about WiGig and UWB in debugfs
         - Update information about wireless control"
      
      * tag 'platform-drivers-x86-v4.2-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        intel_pmc_ipc: Add Intel Apollo Lake PMC IPC driver
        tc1100-wmi: Delete an unnecessary check before the function call "kfree"
        dell-laptop: Fix allocating & freeing SMI buffer page
        dell-laptop: Show info about WiGig and UWB in debugfs
        dell-laptop: Update information about wireless control
      a585d2b7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 1dc51b82
      Linus Torvalds authored
      Pull more vfs updates from Al Viro:
       "Assorted VFS fixes and related cleanups (IMO the most interesting in
        that part are f_path-related things and Eric's descriptor-related
        stuff).  UFS regression fixes (it got broken last cycle).  9P fixes.
        fs-cache series, DAX patches, Jan's file_remove_suid() work"
      
      [ I'd say this is much more than "fixes and related cleanups".  The
        file_table locking rule change by Eric Dumazet is a rather big and
        fundamental update even if the patch isn't huge.   - Linus ]
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (49 commits)
        9p: cope with bogus responses from server in p9_client_{read,write}
        p9_client_write(): avoid double p9_free_req()
        9p: forgetting to cancel request on interrupted zero-copy RPC
        dax: bdev_direct_access() may sleep
        block: Add support for DAX reads/writes to block devices
        dax: Use copy_from_iter_nocache
        dax: Add block size note to documentation
        fs/file.c: __fget() and dup2() atomicity rules
        fs/file.c: don't acquire files->file_lock in fd_install()
        fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation
        vfs: avoid creation of inode number 0 in get_next_ino
        namei: make set_root_rcu() return void
        make simple_positive() public
        ufs: use dir_pages instead of ufs_dir_pages()
        pagemap.h: move dir_pages() over there
        remove the pointless include of lglock.h
        fs: cleanup slight list_entry abuse
        xfs: Correctly lock inode when removing suid and file capabilities
        fs: Call security_ops->inode_killpriv on truncate
        fs: Provide function telling whether file_remove_privs() will do anything
        ...
      1dc51b82
    • Linus Torvalds's avatar
      bluetooth: fix list handling · 9b284cbd
      Linus Torvalds authored
      Commit 835a6a2f ("Bluetooth: Stop sabotaging list poisoning")
      thought that the code was sabotaging the list poisoning when NULL'ing
      out the list pointers and removed it.
      
      But what was going on was that the bluetooth code was using NULL
      pointers for the list as a way to mark it empty, and that commit just
      broke it (and replaced the test with NULL with a "list_empty()" test on
      a uninitialized list instead, breaking things even further).
      
      So fix it all up to use the regular and real list_empty() handling
      (which does not use NULL, but a pointer to itself), also making sure to
      initialize the list properly (the previous NULL case was initialized
      implicitly by the session being allocated with kzalloc())
      
      This is a combination of patches by Marcel Holtmann and Tedd Ho-Jeong
      An.
      
      [ I would normally expect to get this through the bt tree, but I'm going
        to release -rc1, so I'm just committing this directly   - Linus ]
      Reported-and-tested-by: default avatarJörg Otte <jrg.otte@gmail.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Original-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Original-by: Marcel Holtmann <marcel@holtmann.org>:
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9b284cbd
  4. 04 Jul, 2015 28 commits