Bug 152545 - hiddev eats successive reports of the same value
hiddev eats successive reports of the same value
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-03-30 02:03 EST by Boris Shingarov
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-25 16:34:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (497 bytes, patch)
2005-04-05 18:02 EDT, Boris Shingarov
no flags Details | Diff

  None (edit)
Description Boris Shingarov 2005-03-30 02:03:19 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050221 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-6ubuntu1)

Description of problem:
This has been described as Bug 1048 in the kernel bugzilla; however, there has been no activity on that bug since 2003 (although the bug is in the "New" state), therefore I am thinking maybe working to fix this in a RedHat specific kernel is a better idea.

The issue is, if a HID device sends a report with the same absolute value twice, the second report gets swallowed in hid_input_field().  Similarly, relative values of zero never make it through to the userland client.
The trouble with this is that there are several devices broken by this behavior (e.g., the CRYPTOCard hardtoken initializers).

Version-Release number of selected component (if applicable):
tested on 2.6.6, 2.6.9, 2.6.10, 2.6.11

How reproducible:

Steps to Reproduce:
Test with any device sending host-bound reports with the same value several times in a row.  The code in hid-core.c flattens them into one report.

The code in question is in hid-core.c, function hid_input_field():

if (field->flags & HID_MAIN_ITEM_RELATIVE) {
	if (!value[n])
} else {
	if (value[n] == field->value[n])

I am not sure what negative consequences might follow if we remove this code.  We ship a patch which removes it, with our "hardtoken initializer" devices; it does not seem to break other devices.

Additional info:
Comment 1 Boris Shingarov 2005-04-05 18:02:59 EDT
Created attachment 112732 [details]
Proposed patch

This is the patch that we have been giving to the users of the KTI-1 and RBI-1
initializers for the last year or so.  It simply removes the code which eats
successive same-valued reports.
Comment 2 Pete Zaitcev 2006-07-25 16:34:37 EDT
This, unfortunately, has to be wontfix-ed. However, the good news is,
the upstream has this fix. Therefore, RHEL 5 is going to have it too.

Note You need to log in before you can comment on or make changes to this bug.