Skip to content
Commit 86e6b77e authored by Kevin Daughtridge's avatar Kevin Daughtridge Committed by Jiri Kosina
Browse files

HID: keep dev_rdesc unmodified and use it for comparisons

The dev_rdesc member of the hid_device structure is meant to store the original
report descriptor received from the device, but it is currently passed to any
report_fixup method before it is copied to the rdesc member. This patch uses a
temporary buffer to shield dev_rdesc from the side effects of many HID drivers'
report_fixup implementations.

usbhid's hid_post_reset checks the report descriptor currently returned by the
device against a descriptor that may have been modified by a driver's
report_fixup method. That leaves some devices nonfunctional after a resume, with
a "reset_resume error 1" reported. This patch checks the new descriptor against
the unmodified dev_rdesc instead and uses the original, instead of modified,
report size.

BugLink: http://bugs.launchpad.net/bugs/1049623


Signed-off-by: default avatarKevin Daughtridge <kevin@kdau.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 4cc98345
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment