1. 18 Sep, 2015 1 commit
    • Kyle Evans's avatar
      hp-wmi: limit hotkey enable · 8a1513b4
      Kyle Evans authored
      Do not write initialize magic on systems that do not have
      feature query 0xb. Fixes Bug #82451.
      
      Redefine FEATURE_QUERY to align with 0xb and FEATURE2 with 0xd
      for code clearity.
      
      Add a new test function, hp_wmi_bios_2008_later() & simplify
      hp_wmi_bios_2009_later(), which fixes a bug in cases where
      an improper value is returned. Probably also fixes Bug #69131.
      
      Add missing __init tag.
      Signed-off-by: default avatarKyle Evans <kvans32@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      8a1513b4
  2. 10 Sep, 2015 3 commits
    • Azael Avalos's avatar
      toshiba_acpi: Fix hotkeys registration on some toshiba models · 53147b6c
      Azael Avalos authored
      Commit a2b3471b ("toshiba_acpi: Use the Hotkey Event Type function
      for keymap choosing") changed the *setup_keyboard function to query for
      the Hotkey Event Type to help choose the correct keymap, but turns out
      that here are certain Toshiba models out there not implementing this
      feature, and thus, failing to continue the input device registration and
      leaving such laptops without hotkey support.
      
      This patch changes such check, and instead of returning an error if
      the Hotkey Event Type is not present, we simply inform userspace about it,
      changing the message printed from err to notice, making the function
      responsible for registering the input device to continue.
      
      This issue was found on a Toshiba Portege Z30-B, but there might be
      some other models out there affected by this regression as well.
      
      Cc: <stable@vger.kernel.org> # 4.1+
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      53147b6c
    • Azael Avalos's avatar
      toshiba_acpi: Fix USB Sleep and Music always disabled · cf680eae
      Azael Avalos authored
      Commit e1a949c1 ("toshiba_acpi: Refactor *{get, set} functions return
      value") made changes on the return type of the HCI/SCI functions, but a
      typo on the USB Sleep and Music code is always reporting non existent
      support for such feature.
      
      This patch corrects the typo, changing an assignment to a comparison,
      making the laptops with actual support for such feature to work again.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      cf680eae
    • Rasmus Villemoes's avatar
      wmi: Remove private %pUL implementation · 85b4e4eb
      Rasmus Villemoes authored
      The work performed by wmi_gtoa is equivalent to simply sprintf(out,
      "%pUL", in), so one could replace its body by this. However, most
      users feed the result directly as a %s argument to some other function
      which also understands the %p extensions (they all ultimately use
      vsnprintf), so we can eliminate some stack buffers and quite a bit of
      code by just using %pUL directly.
      
      In wmi_dev_uevent I'm not sure whether there's room for a
      nul-terminator in env->buf, so I've just replaced wmi_gtoa with the
      equivalent sprintf call.
      Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      85b4e4eb
  3. 06 Sep, 2015 1 commit
  4. 28 Aug, 2015 2 commits
  5. 26 Aug, 2015 2 commits
  6. 11 Aug, 2015 4 commits
  7. 05 Aug, 2015 5 commits
    • Azael Avalos's avatar
      toshiba_acpi: Bump driver version to 0.23 · 495078f8
      Azael Avalos authored
      Given that some features were added (/dev/toshiba_acpi device), some
      clean-ups and minor (cosmetic) changes all over the driver code, bump
      the driver version to 0.23 to reflect these overall changes.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      495078f8
    • Azael Avalos's avatar
      toshiba_acpi: Remove unnecessary checks and returns in HCI/SCI functions · a6b5354f
      Azael Avalos authored
      A previous patch added explicit feature checks for support, *SUCCESS*
      and *FAILURE to the HCI/SCI *{get, set} functions.
      
      This patch removes some unnedded checks to the driver HCI/SCI
      functions given that the default error return value is now set to
      -EIO, there is no need to check for other error values other than
      the ones currently checking for.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      a6b5354f
    • Azael Avalos's avatar
      toshiba_acpi: Refactor *{get, set} functions return value · e1a949c1
      Azael Avalos authored
      This patch refactors the return value of the driver *{get, set}
      functions, since the driver default error value is -EIO.
      
      All the functions now check for TOS_FAILURE, TOS_NOT_SUPPORTED and
      TOS_SUCCESS.
      
      On TOS_FAILURE a pr_err message is printed informing the user of the
      error (no change was made to this, except the check was added to the
      functions not checking for this).
      
      On TOS_NOT_SUPPORTED we now return -ENODEV immediately (some
      functions were returning -EIO and some other were not checking)
      
      On TOS_SUCCESS* we now return 0 (as a side effect, a new success value
      was added, since some functions return one instead of zero to
      indicate success).
      
      As a special case, the LED functions now check for *FAILURE on
      *set, and check for TOS_FAILURE and TOS_SUCCESS on *get with their
      "default" return value set to LED_OFF.
      
      Also the {lcd, video}_proc* functions were adapted to reflect these
      changes to their parent HCI functions.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      e1a949c1
    • Azael Avalos's avatar
      toshiba_acpi: Remove "*not supported" feature prints · 0409cbce
      Azael Avalos authored
      Currently the driver prints "*not supported" if any of the features
      queried are in fact not supported, let us print the available
      features instead.
      
      This patch removes all instances pr_info printing "*not supported",
      and add a new function called "print_supported_features", which will
      print the available laptop features.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      0409cbce
    • Azael Avalos's avatar
      toshiba_acpi: Change *available functions return type · ea215a3f
      Azael Avalos authored
      This patch changes the *available functions return type from int to
      void.
      
      The checks for support of their respective features are done inside
      such functions and there was no need to return anything as we can
      flag the queried feature as supported inside these functions.
      
      The code was adapted accordingly to these changes and two new
      variables were created and another was changed from uint to bool.
      
      Also, the function toshiba_acceleremoter_supported was renamed to
      toshiba_accelerometer_available to maintain the naming consistency on
      the driver.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      ea215a3f
  8. 29 Jul, 2015 1 commit
    • Azael Avalos's avatar
      toshiba_acpi: Add set_fan_status function · 3e07e5ba
      Azael Avalos authored
      This patch adds a new function named "set_fan_status" to complement
      its get* counterpart, as well as to avoid code duplication between
      "fan_proc_write" and "fan_store".
      
      Also, both functions (get*, set*) are now checking for TOS_FAILURE,
      TOS_NOT_SUPPORTED and TOS_SUCCESS (to be on par with the rest of the
      HCI/SCI functions), printing an error message, returning -ENODEV and
      zero respectively.
      
      The proc and sysfs functions were updated to reflect these changes as
      well, returning -EIO for proc, and propagating the error value on the
      sysfs functions.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      3e07e5ba
  9. 24 Jul, 2015 7 commits
  10. 19 Jul, 2015 8 commits
  11. 18 Jul, 2015 6 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 9d37e667
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A small set of ARM fixes for -rc3, most of them not far off
        one-liners, with the exception of fixing the V7 cache invalidation for
        incoming SMP processors which was causing problems for SoCFPGA
        devices"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: fix __virt_to_idmap build error on !MMU
        ARM: invalidate L1 before enabling coherency
        ARM: 8404/1: dma-mapping: fix off-by-one error in bitmap size check
        ARM: 8402/1: perf: Don't use of_node after putting it
        ARM: 8400/1: use virt_to_idmap to get phys_reset address
      9d37e667
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0e1dbccd
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Two families of fixes:
      
         - Fix an FPU context related boot crash on newer x86 hardware with
           larger context sizes than what most people test.  To fix this
           without ugly kludges or extensive reverts we had to touch core task
           allocator, to allow x86 to determine the task size dynamically, at
           boot time.
      
           I've tested it on a number of x86 platforms, and I cross-built it
           to a handful of architectures:
      
                                              (warns)               (warns)
             testing     x86-64:  -git:  pass (    0),  -tip:  pass (    0)
             testing     x86-32:  -git:  pass (    0),  -tip:  pass (    0)
             testing        arm:  -git:  pass ( 1359),  -tip:  pass ( 1359)
             testing       cris:  -git:  pass ( 1031),  -tip:  pass ( 1031)
             testing       m32r:  -git:  pass ( 1135),  -tip:  pass ( 1135)
             testing       m68k:  -git:  pass ( 1471),  -tip:  pass ( 1471)
             testing       mips:  -git:  pass ( 1162),  -tip:  pass ( 1162)
             testing    mn10300:  -git:  pass ( 1058),  -tip:  pass ( 1058)
             testing     parisc:  -git:  pass ( 1846),  -tip:  pass ( 1846)
             testing      sparc:  -git:  pass ( 1185),  -tip:  pass ( 1185)
      
           ... so I hope the cross-arch impact 'none', as intended.
      
           (by Dave Hansen)
      
         - Fix various NMI handling related bugs unearthed by the big asm code
           rewrite and generally make the NMI code more robust and more
           maintainable while at it.  These changes are a bit late in the
           cycle, I hope they are still acceptable.
      
           (by Andy Lutomirski)"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu, sched: Introduce CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT and use it on x86
        x86/fpu, sched: Dynamically allocate 'struct fpu'
        x86/entry/64, x86/nmi/64: Add CONFIG_DEBUG_ENTRY NMI testing code
        x86/nmi/64: Make the "NMI executing" variable more consistent
        x86/nmi/64: Minor asm simplification
        x86/nmi/64: Use DF to avoid userspace RSP confusing nested NMI detection
        x86/nmi/64: Reorder nested NMI checks
        x86/nmi/64: Improve nested NMI comments
        x86/nmi/64: Switch stacks on userspace NMI entry
        x86/nmi/64: Remove asm code that saves CR2
        x86/nmi: Enable nested do_nmi() handling for 64-bit kernels
      0e1dbccd
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dae57fb6
      Linus Torvalds authored
      Pull timer fix from Ingo Molnar:
       "Fix for a misplaced export that can cause build failures in certain
        (rare) Kconfig situations"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick: Move the export of tick_broadcast_oneshot_control to the proper place
      dae57fb6
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d65b78f5
      Linus Torvalds authored
      Pull scheduler fix from Ingo Molnar:
       "A oneliner rq throttling fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Test list head instead of list entry in throttle_cfs_rq()
      d65b78f5
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f79a17bf
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Mostly tooling fixes, plus a static key fix fixing /sys/devices/cpu/rdpmc"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf tools: Really allow to specify custom CC, AR or LD
        perf auxtrace: Fix misplaced check for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT
        perf hists browser: Take the --comm, --dsos, etc filters into account
        perf symbols: Store if there is a filter in place
        x86, perf: Fix static_key bug in load_mm_cr4()
        tools: Copy lib/hweight.c from the kernel sources
        perf tools: Fix the detached tarball wrt rbtree copy
        perf thread_map: Fix the sizeof() calculation for map entries
        tools lib: Improve clean target
        perf stat: Fix shadow declaration of close
        perf tools: Fix lockup using 32-bit compat vdso
      f79a17bf
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 59ee7621
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
       "Misc irq fixes:
      
         - two driver fixes
         - a Xen regression fix
         - a nested irq thread crash fix"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gicv3-its: Fix mapping of LPIs to collections
        genirq: Prevent resend to interrupts marked IRQ_NESTED_THREAD
        genirq: Revert sparse irq locking around __cpu_up() and move it to x86 for now
        gpio/davinci: Fix race in installing chained irq handler
      59ee7621