Skip to content
  • Adam Kropelin's avatar
    Input: HID - only report events coming from interrupts to hiddev · bc5d0482
    Adam Kropelin authored
    
    
    Currently hid-core follows the same code path for input reports
    regardless of whether they are a result of interrupt transfers or
    control transfers. That leads to interrupt events erroneously being
    reported to hiddev for regular control transfers.
    
    Prior to 2.6.12 the problem was mitigated by the fact that
    reporting to hiddev is supressed if the field value has not changed,
    which is often the case. Said filtering was removed in 2.6.12-rc1 which
    means any input reports fetched via control transfers result in hiddev
    interrupt events. This behavior can quickly lead to a feedback loop
    where a userspace app, in response to interrupt events, issues control
    transfers which in turn create more interrupt events.
    
    This patch prevents input reports that arrive via control transfers from
    being reported to hiddev as interrupt events.
    
    Signed-off-by: default avatarAdam Kropelin <akropel1@rochester.rr.com>
    Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
    Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
    bc5d0482