In these cases the writes correctly go through the control/default/zero endpoint. However, the .write_endpoint field for these devices was incorrectly computed and the resulting endpoint address was invalid (e.g. bit 5, set by LIBUSB_REQUEST_TYPE_CLASS, is reserved in endpoint addresses).
In fact, neither LIBUSB_REQUEST_TYPE_CLASS nor LIBUSB_RECIPIENT_INTERFACE had a place in this definition: these flags should only be used to build bmRequestType parameters for control transfers.
The issue was only harmless because .write_endpoint is not used in corsairlink_coolit_write. This patch avoids future confusion about this.¹
¹ Related: #214
Types of changes
[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Proposed changes
In these cases the writes correctly go through the control/default/zero endpoint. However, the
.write_endpoint field
for these devices was incorrectly computed and the resulting endpoint address was invalid (e.g. bit 5, set byLIBUSB_REQUEST_TYPE_CLASS
, is reserved in endpoint addresses).In fact, neither
LIBUSB_REQUEST_TYPE_CLASS
norLIBUSB_RECIPIENT_INTERFACE
had a place in this definition: these flags should only be used to buildbmRequestType
parameters for control transfers.The issue was only harmless because
.write_endpoint
is not used incorsairlink_coolit_write
. This patch avoids future confusion about this.¹¹ Related: #214
Types of changes
Checklist