]> git.baikalelectronics.ru Git - kernel.git/commit
HID: surface-hid: Fix get-report request
authorMaximilian Luz <luzmaximilian@gmail.com>
Tue, 8 Jun 2021 13:29:51 +0000 (15:29 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 15 Jun 2021 08:54:51 +0000 (10:54 +0200)
commit29d4e48fc2c638659722705f1d7811cb513b1dc0
treec4f219fcf554a4e82aaba1685f32f89b6f539390
parenta4d6e4ad2680fc8a3085eea0608eed611be67701
HID: surface-hid: Fix get-report request

Getting a report (e.g. feature report) from a device requires us to send
a request indicating which report we want to retrieve and then waiting
for the corresponding response containing that report. We already
provide the response structure to the request call, but the request
isn't marked as a request that expects a response. Thus the request
returns before we receive the response and the response buffer indicates
a zero length response due to that.

This essentially means that the get-report calls are broken and will
always indicate that a report of length zero has been read.

Fix this by appropriately marking the request.

Fixes: 2df187067116 ("HID: Add support for Surface Aggregator Module HID transport")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/surface-hid/surface_hid.c