Input: HID - only report events coming from interrupts to hiddev
authorAdam Kropelin <akropel1@rochester.rr.com>
Mon, 11 Jul 2005 06:09:32 +0000 (01:09 -0500)
committerDmitry Torokhov <dtor_core@ameritech.net>
Mon, 11 Jul 2005 06:09:32 +0000 (01:09 -0500)
commitbc5d04822bd9f34ea93a681f05f5e5683935d574
treef0ebc97e220fbf9c7f104ade10bc93443aca40ef
parent153ab429cad3b585ddf1a5521cfaadb57402cd31
Input: HID - only report events coming from interrupts to hiddev

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: Adam Kropelin <akropel1@rochester.rr.com>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/usb/input/hid-core.c