From 7fb5c2f81d84c9843d11d9b01b0a20aefd88aef4 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Fri, 21 Aug 2015 15:14:45 -0400 Subject: [PATCH] hidpp20: handle new errors reporting Looks like HID++2.0 devices report errors with 0xff also. Signed-off-by: Benjamin Tissoires --- src/hidpp20.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hidpp20.c b/src/hidpp20.c index 29748193..2f2a46fe 100644 --- a/src/hidpp20.c +++ b/src/hidpp20.c @@ -127,7 +127,8 @@ hidpp20_request_command_allow_error(struct ratbag_device *device, union hidpp20_ break; /* error */ - if (read_buffer.msg.sub_id == __ERROR_MSG && + if ((read_buffer.msg.sub_id == __ERROR_MSG || + read_buffer.msg.sub_id == 0xff) && read_buffer.msg.address == msg->msg.sub_id && read_buffer.msg.parameters[0] == msg->msg.address) { hidpp_err = read_buffer.msg.parameters[1];