diff options
author | Kevin Daughtridge <kevin@kdau.com> | 2012-09-20 12:00:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-07 08:35:54 -0700 |
commit | 5b537939972d4a232136e8cb6eae0ba657b892e4 (patch) | |
tree | 1466dde68e22104cd91dc42b75461d4a50b0c8e2 /lib/mpi/mpi-mpow.c | |
parent | 8a5683bdd01bc2408a18cb9759a2a614081b9436 (diff) |
HID: keep dev_rdesc unmodified and use it for comparisons
commit 86e6b77eb7cf9ca2e9c7092b4dfd588f0a3307b6 upstream.
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: Kevin Daughtridge <kevin@kdau.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/mpi/mpi-mpow.c')
0 files changed, 0 insertions, 0 deletions