21 Dec, 2011

1 commit


19 Dec, 2011

1 commit


08 Nov, 2011

3 commits

  • This functions needs crtl_sock and intr_sock to be set first.

    Signed-off-by: Gustavo F. Padovan

    Gustavo F. Padovan
     
  • Calling module_put(THIS_MODULE) is *never* safe when we cannot go sure that we
    own at least two references. This is because the call may unload our module
    before it returns and then the "return" will jump into invalid memory.

    Gladly, module.h provides a wrapper for kthread-users: module_put_and_exit().
    This puts our module and then exits the kthread without returning to the module.

    This patch fixes the hidp kthread to use this wrapper instead of manually
    freeing its own reference. See nfsd or lockd for other kthreads using this.

    Calling __module_get() inside the kthread is safe as the hidp module will always
    wait until the kthread sets "waiting_for_startup" to 0.

    Signed-off-by: David Herrmann
    Signed-off-by: Gustavo F. Padovan

    David Herrmann
     
  • When all items in the list have the same type there is no much of a point
    to use list_for_each except if you want to use the list pointer itself.

    Signed-off-by: Luiz Augusto von Dentz
    Signed-off-by: Gustavo F. Padovan

    Luiz Augusto von Dentz
     

07 Oct, 2011

10 commits


28 Sep, 2011

1 commit


21 Sep, 2011

1 commit


12 Aug, 2011

4 commits


01 Jul, 2011

1 commit

  • Partial revert of commit aabf6f89. When the hidp session thread
    was converted from kernel_thread to kthread, the atomic/wakeups
    were replaced with kthread_stop. kthread_stop has blocking semantics
    which are inappropriate for the hidp session kthread. In addition,
    the kthread signals itself to terminate in hidp_process_hid_control()
    - it cannot do this with kthread_stop().

    Lastly, a wakeup can be lost if the wakeup happens between checking
    for the loop exit condition and setting the current state to
    TASK_INTERRUPTIBLE. (Without appropriate synchronization mechanisms,
    the task state should not be changed between the condition test and
    the yield - via schedule() - as this creates a race between the
    wakeup and resetting the state back to interruptible.)

    Signed-off-by: Peter Hurley
    Signed-off-by: Gustavo F. Padovan

    Peter Hurley
     

24 May, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (36 commits)
    HID: hid-multitouch: cosmetic changes, sort classes and devices
    HID: hid-multitouch: class MT_CLS_STANTUM is redundant with MT_CLS_CONFIDENCE
    HID: hid-multitouch: add support for Unitec panels
    HID: hid-multitouch: add support for Touch International panels
    HID: hid-multitouch: add support for GoodTouch panels
    HID: hid-multitouch: add support for CVTouch panels
    HID: hid-multitouch: add support for ActionStar panels
    HID: hiddev: fix race between hiddev_disconnect and hiddev_release
    HID: magicmouse: ignore 'ivalid report id' while switching modes
    HID: fix a crash in hid_report_raw_event() function.
    HID: hid-multitouch: add support for Elo TouchSystems 2515 IntelliTouch Plus
    HID: assorted usage updates from hut 1.12
    HID: roccat: fix actual/startup profile sysfs attribute in koneplus
    HID: hid-multitouch: Add support for Lumio panels
    HID: 'name' and 'phys' in 'struct hid_device' can never be NULL
    HID: hid-multitouch: add support for Ilitek dual-touch panel
    HID: picolcd: Avoid compile warning/error triggered by copy_from_user()
    HID: add support for Logitech G27 wheel
    HID: hiddev: fix error path in hiddev_read when interrupted
    HID: add support for Sony Navigation Controller
    ...

    Linus Torvalds
     

28 Apr, 2011

1 commit


21 Apr, 2011

1 commit


05 Apr, 2011

1 commit


01 Apr, 2011

1 commit


19 Mar, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (48 commits)
    HID: add support for Logitech Driving Force Pro wheel
    HID: hid-ortek: remove spurious reference
    HID: add support for Ortek PKB-1700
    HID: roccat-koneplus: vorrect mode of sysfs attr 'sensor'
    HID: hid-ntrig: init settle and mode check
    HID: merge hid-egalax into hid-multitouch
    HID: hid-multitouch: Send events per slot if CONTACTCOUNT is missing
    HID: ntrig remove if and drop an indent
    HID: ACRUX - activate the device immediately after binding
    HID: ntrig: apply NO_INIT_REPORTS quirk
    HID: hid-magicmouse: Correct touch orientation direction
    HID: ntrig don't dereference unclaimed hidinput
    HID: Do not create input devices for feature reports
    HID: bt hidp: send Output reports using SET_REPORT on the Control channel
    HID: hid-sony.c: Fix sending Output reports to the Sixaxis
    HID: add support for Keytouch IEC 60945
    HID: Add HID Report Descriptor to sysfs
    HID: add IRTOUCH infrared USB to hid_have_special_driver
    HID: kernel oops in out_cleanup in function hidinput_connect
    HID: Add teletext/color keys - gyration remote - EU version (GYAR3101CKDE)
    ...

    Linus Torvalds
     

17 Mar, 2011

1 commit


22 Feb, 2011

1 commit

  • The current implementation of hidp_output_raw_report() relies only on
    the Control channel even for Output reports, and the BT HID
    specification [1] does not mention using the DATA message for Output
    reports on the Control channel (see section 7.9.1 and also Figure 11:
    SET_ Flow Chart), so let us just use SET_REPORT.

    This also fixes sending Output reports to some devices (like Sony
    Sixaxis) which are not able to handle DATA messages on the Control
    channel.

    Ideally hidp_output_raw_report() could be improved to use this scheme:
    Feature Report -- SET_REPORT on the Control channel
    Output Report -- DATA on the Interrupt channel
    for more efficiency, but as said above, right now only the Control
    channel is used.

    [1] http://www.bluetooth.com/Specification%20Documents/HID_SPEC_V10.pdf

    Signed-off-by: Antonio Ospite
    Acked-by: Gustavo F. Padovan
    Signed-off-by: Jiri Kosina

    Antonio Ospite
     

15 Feb, 2011

1 commit


11 Feb, 2011

3 commits

  • This patch adds support or getting and setting feature reports for bluetooth
    HID devices from HIDRAW.

    Signed-off-by: Alan Ott
    Acked-by: Gustavo F. Padovan
    Signed-off-by: Jiri Kosina

    Alan Ott
     
  • Wait for an ACK from the device before returning from
    hidp_output_raw_report(). This way, failures can be returned to the user
    application. Also, it prevents ACK/NAK packets from an output packet from
    being confused with ACK/NAK packets from an input request packet.

    Signed-off-by: Alan Ott
    Acked-by: Gustavo F. Padovan
    Signed-off-by: Jiri Kosina

    Alan Ott
     
  • Move the call to hid_add_device() (which calls a device's probe() function)
    to after the kernel_thread() call which starts the hidp_session() thread.
    This ensures the Bluetooth receive socket is fully running by the time a
    device's probe() function is called. This way, a device can communicate
    (send and receive) with the Bluetooth device from its probe() function.

    Signed-off-by: Alan Ott
    Acked-by: Gustavo F. Padovan
    Signed-off-by: Jiri Kosina

    Alan Ott
     

08 Feb, 2011

1 commit


02 Dec, 2010

1 commit

  • Structure hidp_conninfo is copied to userland with version, product,
    vendor and name fields unitialized if both session->input and session->hid
    are NULL. It leads to leaking of contents of kernel stack memory.

    Signed-off-by: Vasiliy Kulikov
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    Vasiliy Kulikov
     

09 Nov, 2010

1 commit

  • Fix kconfig dependency warning to satisfy dependencies:

    warning: (BT_HIDP && NET && BT && BT_L2CAP && INPUT || USB_HID && HID_SUPPORT && USB && INPUT) selects HID which has unmet direct dependencies (HID_SUPPORT && INPUT)

    Signed-off-by: Randy Dunlap
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    Randy Dunlap
     

12 Oct, 2010

1 commit


21 Apr, 2010

1 commit

  • Define a new function to return the waitqueue of a "struct sock".

    static inline wait_queue_head_t *sk_sleep(struct sock *sk)
    {
    return sk->sk_sleep;
    }

    Change all read occurrences of sk_sleep by a call to this function.

    Needed for a future RCU conversion. sk_sleep wont be a field directly
    available.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

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