liquidctl / liquidctl

Cross-platform CLI and Python drivers for AIO liquid coolers and other devices
GNU General Public License v3.0
2.19k stars 217 forks source link

Possibly incorrect expectations on hid_get_feature_report #312

Open jonasmalacofilho opened 3 years ago

jonasmalacofilho commented 3 years ago

When looking into libusb/hidapi#229, I noticed that the behavior of hid_get_feature_report when report IDs are not used is not as clear as I thought, and perhaps not even well defined.

This doesn't currently affect any of our drivers, but it's different than the expectations that are documented in HidapiDevice.get_feature_report (and asserted in test_gets_feature_report).

For now, let's just follow how this is resolved in hidapi, and proceed from there.

Additional information about the system:

Related: libusb/hidapi#229 Related: libusb/hidapi#232

jonasmalacofilho commented 2 years ago

Actually, the bug appears to be in hidraw's documentation:

It is possible that other types of HIDs behave differently, but that would still mean a bug in the kernel (in that case, in the actual code, not just in the documentation).

Leaving this open until I report (or maybe fix) it upstream.