genesys: Limit maximum bulk transfer size to allow data capture

merge-requests/53/head
Povilas Kanapickas 2019-04-23 00:14:48 +03:00
rodzic f04119b126
commit d7c17f7540
1 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -203,8 +203,14 @@
#define BULK_RAM 0x00 #define BULK_RAM 0x00
#define BULK_REGISTER 0x11 #define BULK_REGISTER 0x11
#define BULKIN_MAXSIZE 0xFE00 /* Genesys supports 0xFE00 maximum size in general, wheraus GL646 supports
#define GL646_BULKIN_MAXSIZE 0xFFC0 0xFFC0. We use 0xF000 because that's the packet limit in the Linux usbmon
USB capture stack. By default it limits packet size to b_size / 5 where
b_size is the size of the ring buffer. By default it's 300*1024, so the
packet is limited 61440 without any visibility to acquiring software.
*/
#define BULKIN_MAXSIZE 0xF000
#define GL646_BULKIN_MAXSIZE 0xF000
#define GL646_BULKIN_MINSIZE 0x0800 #define GL646_BULKIN_MINSIZE 0x0800
#define BULKOUT_MAXSIZE 0xF000 #define BULKOUT_MAXSIZE 0xF000