11 Jul, 2011

1 commit

  • [ 191.310008] WARNING: kmemcheck: Caught 32-bit read from freed memory (f0d25f14)
    [ 191.310011] c056d2f088000000105fd2f00000000050415353040000000000000000000000
    [ 191.310020] i i i i f f f f f f f f f f f f f f f f f f f f f f f f f f f f
    [ 191.310027] ^
    [ 191.310029]
    [ 191.310032] Pid: 737, comm: modprobe Not tainted 3.0.0-rc5+ #268 Hewlett-Packard HP Compaq 6005 Pro SFF PC/3047h
    [ 191.310036] EIP: 0060:[] EFLAGS: 00010286 CPU: 0
    [ 191.310039] EIP is at hp_wmi_perform_query+0x104/0x150 [hp_wmi]
    [ 191.310041] EAX: f0d25601 EBX: f0d25f00 ECX: 000121cf EDX: 000121ce
    [ 191.310043] ESI: f0d25f10 EDI: f0f97ea8 EBP: f0f97ec4 ESP: c173f34c
    [ 191.310045] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
    [ 191.310046] CR0: 8005003b CR2: f540c000 CR3: 30f30000 CR4: 000006d0
    [ 191.310048] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
    [ 191.310050] DR6: ffff4ff0 DR7: 00000400
    [ 191.310051] [] hp_wmi_dock_state+0x2b/0x40 [hp_wmi]
    [ 191.310054] [] hp_wmi_init+0x93/0x1a8 [hp_wmi]
    [ 191.310057] [] do_one_initcall+0x30/0x170
    [ 191.310061] [] sys_init_module+0xef/0x1a60
    [ 191.310064] [] sysenter_do_call+0x12/0x28
    [ 191.310067] [] 0xffffffff

    Signed-off-by: Eric Dumazet
    Signed-off-by: Matthew Garrett

    Eric Dumazet
     

28 May, 2011

1 commit


28 Mar, 2011

7 commits

  • Some recent HP laptops use a new wireless query command type 0x1b.

    Add support for it. Tested on HP Mini 5102.

    Signed-off-by: Anssi Hannula
    Signed-off-by: Matthew Garrett

    Anssi Hannula
     
  • hp_wmi_rfkill_setup cleans up after itself now, so failing completely is
    no longer necessary.

    Signed-off-by: Anssi Hannula
    Signed-off-by: Matthew Garrett

    Anssi Hannula
     
  • NULLify rfkill pointers during initialization. This prevents dereference
    of invalid pointer in case the driver is rebound and some rfkill device
    isn't detected anymore. Clear them also in hp_wmi_rfkill_setup failure
    path so that an rfkill initialization failure doesn't need to be fatal
    for the whole driver.

    Signed-off-by: Anssi Hannula
    Signed-off-by: Matthew Garrett

    Anssi Hannula
     
  • Split initialization of rfkill devices from hp_wmi_bios_setup() to
    hp_wmi_rfkill_setup(). This makes the code somewhat cleaner, especially
    with the future command 0x1b rfkill support.

    Signed-off-by: Anssi Hannula
    Signed-off-by: Matthew Garrett

    Anssi Hannula
     
  • Split buffersize parameter of hp_wmi_perform_query to insize and
    outsize. Existing callers are changed to use the same value for insize
    and outsize to avoid any regressions, with the exception of
    hp_wmi_set_block where the output buffer is unused and therefore outsize
    is set to 0 (this change is not seen by BIOS code).

    The maximum input buffer size is kept at 4 bytes as per struct
    bios_args. Some commands exist that take longer buffers, but they
    haven't been implemented. The data portion of bios_args can be trivially
    made dynamically allocated later when such larger buffers become needed.

    Signed-off-by: Anssi Hannula
    Signed-off-by: Matthew Garrett

    Anssi Hannula
     
  • Remove the status variable from hp_wmi_perform_query which holds the
    return value from wmi_evaluate_method(). It is never checked as the
    function bails out if the output buffer hasn't been allocated which
    indicates the call failed.

    Signed-off-by: Anssi Hannula
    Signed-off-by: Matthew Garrett

    Anssi Hannula
     
  • Check BIOS provided return value code in hp_wmi_perform_query and print
    a warning on error. Printing is suppressed for HPWMI_RET_UNKNOWN_CMDTYPE
    which is returned when the command type is unsupported.

    Signed-off-by: Anssi Hannula
    Signed-off-by: Matthew Garrett

    Anssi Hannula
     

25 Nov, 2010

1 commit


21 Oct, 2010

1 commit

  • Instead of implementing its own version of keymap hanlding switch over
    to using sparse keymap library.

    Also make sure that we install notify handler only after we allocated
    input device and that we remove notify handler before unregistering
    input device.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Matthew Garrett

    Dmitry Torokhov
     

24 Aug, 2010

1 commit

  • The machines I have appear to provide their return value in the arguments
    structure, not the output structure. Rework the driver to use that again
    in order to get rfkill working again.

    Signed-off-by: Matthew Garrett

    Matthew Garrett
     

03 Aug, 2010

13 commits


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

09 Mar, 2010

1 commit

  • The HID layer has some scan codes of the form 0xffbc0000 for logitech
    devices which do not work if scancode is typed as signed int, so we need
    to switch to unsigned it instead. While at it keycode being signed does
    not make much sense either.

    Acked-by: Márton Németh
    Acked-by: Matthew Garrett
    Acked-by: Jiri Kosina
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

08 Mar, 2010

1 commit

  • A pointer to hp_wmi_bios_setup is passed to the core via
    platform_driver_register and so the function must not disappear when the
    .init sections are discarded. Otherwise (if also having HOTPLUG=y)
    unbinding and binding a device to the driver via sysfs will result in an
    oops as does a device being registered late.

    An alternative to this patch is using platform_driver_probe instead of
    platform_driver_register plus removing the pointer to the probe function
    from the struct platform_driver.

    Signed-off-by: Uwe Kleine-König
    Cc: Frans Pop
    Cc: Larry Finger
    Cc: Len Brown
    Cc: Helge Deller
    Cc: Andrew Morton
    Acked-by: Matthew Garrett
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

26 Feb, 2010

1 commit


02 Jan, 2010

1 commit

  • Commit 3e9b988e4edf065d39c1343937f717319b1c1065
    "wmi: Free the allocated acpi objects through wmi_get_event_data"
    had the same purpose as commit
    44ef00e6482e755f36629773abc2aee83a6f53e3
    "hp-wmi: Fix two memleaks"

    This should solve this regression:

    http://bugzilla.kernel.org/show_bug.cgi?id=14890

    Signed-off-by: Anisse Astier
    Reported-by: Sedat Dilek
    Signed-off-by: Len Brown

    Anisse Astier
     

30 Dec, 2009

2 commits


24 Dec, 2009

2 commits


16 Dec, 2009

2 commits


10 Dec, 2009

1 commit

  • 1) Add support for reading the hardware blocked state. Previously
    we read a combination of the hardware and software blocked states,
    reporting it as the software blocked state. This caused some
    confusing behaviour.

    2) The software state is persistent, mark it as such.

    3) Check rfkill in the resume handler. Both the hard and soft
    blocked states may change over hibernation.

    Signed-off-by: Alan Jenkins
    Acked-by: Matthew Garrett
    Tested-by: Maciej Rutecki
    Signed-off-by: Len Brown

    Alan Jenkins
     

19 Sep, 2009

2 commits


15 Sep, 2009

1 commit

  • Gets rid of the following warning:

    Platform driver 'hp-wmi' needs updating - please use dev_pm_ops

    I tested that the resume handler still works on my HP 2510p notebook.

    [rjw: Fixed up the definition of hp_wmi_pm_ops.]

    Signed-off-by: Frans Pop
    Signed-off-by: Andrew Morton
    Signed-off-by: Rafael J. Wysocki

    Frans Pop