You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@czietz you're right, this must be fixed, probably the confusion came from that libusb_control_transfer() function actually returns the number of bytes transferred on success.
The NatFeats call
USBHOST_SUBMIT_BULK_MSG
returns the return value oflibusb_bulk_transfer()
but not the number of bytes transferred:aranym/src/natfeat/usbhost.cpp
Lines 841 to 846 in 880e24d
However, the FreeMiNT driver uses this return value to populate
dev->act_len
, the actual transfer length:https://github.com/freemint/freemint/blob/f42d8b22ebc68a60377eebfc7d7f60ccf77c823c/sys/usb/src.km/ucd/aranym/aranym-hcd.c#L225-L244
As the libusb documentation explains, the return value can be (among others)
... which means that
dev->act_len
is filled incorrectly.Imho, the NatFeats call should return
transferred
in these two cases and and a (negative) error in all other cases to the FreeMiNT driver.The text was updated successfully, but these errors were encountered: