Comment 31 for bug 658198

Michael Doube (michael-doube) wrote :

After some heavy bisecting, I found the offending commit:

8613e4c2872a87cc309a42de2c7091744dc54d0e is the first bad commit
commit 8613e4c2872a87cc309a42de2c7091744dc54d0e
Author: Mauro Carvalho Chehab <email address hidden>
Date: Thu Sep 9 21:54:22 2010 -0700

    Input: add support for large scancodes

    Several devices use a high number of bits for scancodes. One important
    group is the Remote Controllers. Some new protocols like RC-6 define a
    scancode space of 64 bits.

    The current EVIO[CS]GKEYCODE ioctls allow replace the scancode/keycode
    translation tables, but it is limited to up to 32 bits for scancode.

    Also, if userspace wants to clean the existing table, replacing it by
    a new one, it needs to run a loop calling the ioctls over the entire
    sparse scancode space.

    To solve those problems, this patch extends the ioctls to allow drivers
    handle scancodes up to 32 bytes long (the length could be extended in
    the future should such need arise) and allow userspace to query and set
    scancode to keycode mappings not only by scancode but also by index.

    Compatibility code were also added to handle the old format of
    EVIO[CS]GKEYCODE ioctls.

    Folded fixes by:
    - Dan Carpenter: locking fixes for the original implementation
    - Jarod Wilson: fix crash when setting keycode and wiring up get/set
                    handlers in original implementation.
    - Dmitry Torokhov: rework to consolidate old and new scancode handling,
                       provide options to act either by index or scancode.

    Signed-off-by: Mauro Carvalho Chehab <email address hidden>
    Signed-off-by: Dan Carpenter <email address hidden>
    Signed-off-by: Jarod Wilson <email address hidden>
    Signed-off-by: Dmitry Torokhov <email address hidden>

:040000 040000 88897dc6073df285885f2a0e22f07833a55753f3 0ce85c424a2c7d36036959bb70702c544afa9b27 M drivers
:040000 040000 6914657f7124ebf4ad170bbbbab4943bb2b91105 4b7036e9697c0e10d43c1d47111eef8877aa77be M include