diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-17 11:32:50 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-24 15:31:05 +0100 |
commit | eadba57d53f6512a15ac86f18713c18491175ac4 (patch) | |
tree | a18b940066a468c068c1ecdc7b0e9e180b471d27 /utils/hwstub/include/hwstub_usb.hpp | |
parent | 24c208336c795adc1e111b03e86526c2cfde7a61 (diff) | |
download | rockbox-eadba57d53f6512a15ac86f18713c18491175ac4.tar.gz rockbox-eadba57d53f6512a15ac86f18713c18491175ac4.zip |
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
Diffstat (limited to 'utils/hwstub/include/hwstub_usb.hpp')
-rw-r--r-- | utils/hwstub/include/hwstub_usb.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/hwstub/include/hwstub_usb.hpp b/utils/hwstub/include/hwstub_usb.hpp index 15a0fcaaec..579594067c 100644 --- a/utils/hwstub/include/hwstub_usb.hpp +++ b/utils/hwstub/include/hwstub_usb.hpp | |||
@@ -101,6 +101,10 @@ public: | |||
101 | void set_timeout(std::chrono::milliseconds ms); | 101 | void set_timeout(std::chrono::milliseconds ms); |
102 | 102 | ||
103 | protected: | 103 | protected: |
104 | /* return the maximum size of a libusb control transfer, this is a "known" | ||
105 | * limitation that is completely undocumented (sigh) and applies at least | ||
106 | * to linux and windows hosts */ | ||
107 | size_t max_libusb_control_xfer_size() const; | ||
104 | /* interpret libusb error: >=0 means SUCCESS, others are treated as errors, | 108 | /* interpret libusb error: >=0 means SUCCESS, others are treated as errors, |
105 | * LIBUSB_ERROR_NO_DEVICE is treated as DISCONNECTED */ | 109 | * LIBUSB_ERROR_NO_DEVICE is treated as DISCONNECTED */ |
106 | error interpret_libusb_error(int err); | 110 | error interpret_libusb_error(int err); |