1
0
Fork 0
forked from len0rd/rockbox

hwstub: fix long transfers failing because of control xfer size of libusb

libusb limits control transfer sizes to 4k, see diff for details.

Change-Id: Id2e638010274009ea641d06e9040a8b9ab9d54a9
This commit is contained in:
Amaury Pouly 2017-01-17 11:32:50 +01:00
parent 24c208336c
commit eadba57d53
2 changed files with 23 additions and 2 deletions

View file

@ -101,6 +101,10 @@ public:
void set_timeout(std::chrono::milliseconds ms);
protected:
/* return the maximum size of a libusb control transfer, this is a "known"
* limitation that is completely undocumented (sigh) and applies at least
* to linux and windows hosts */
size_t max_libusb_control_xfer_size() const;
/* interpret libusb error: >=0 means SUCCESS, others are treated as errors,
* LIBUSB_ERROR_NO_DEVICE is treated as DISCONNECTED */
error interpret_libusb_error(int err);