Re: HID: hid-logitech - missing HID_OUTPUT_REPORT 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 17, 2014 at 9:35 AM,  <simon@xxxxxxxxxxxxx> wrote:
>
>> I don't know the lg driver very well, but it looks like it's expecting
>> a single report ID (0), but the device is showing two report IDs: 1
>> and 2. So, from the perspective of the driver, this is correct: it
>> wouldn't know how to deal with things since it is only expecting
>> Report ID 0. It seems like the driver needs to be updated for this
>> different device.
>
> Hi,
> The 'hid-lgff.c' driver supports lots of devices (see end of 'hid-lg.c'),
> and presumably these devices offer up a wide/varied range of HID
> descriptors.
>
> Does the recently introduced(/changed) check need to have prior knowledge
> of which 'Report ID's are actually used? If so, it possible that the
> change has broken a number of devices...
>
> I am trying to get the end user to test with an older kernel to see
> whether his device was always 'broken'.

Ah-ha, actually, when taking a closer look at this, I see that lgff
isn't using ID "0", it's actually using "the first report in the
list", without using an ID at all. This appears to be true for all the
lg*ff devices, actually. Instead of validating ID 0, it needs to
validate "the first report".

Documentation for hid_validate_values says:
 * @id: which report ID to examine (0 for first)

Benjamin, does that mean "first report in the list", or is that a hint
that IDs are 0-indexed? What do you think is the best way to handle
this? Seems like passing something for "id" that means "whatever is
first in list" would be safest? I don't think overloading the meaning
of "0" is good, in case a driver really is using a 0 index but no
report with that ID exists in the list. Or if we do change the
meaning, make sure drivers always use the report returned by
hid_validate_values instead of re-finding it later.

-Kees

-- 
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux