|
@@ -109,6 +109,9 @@
|
|
|
// Use the device defined timeout
|
|
// Use the device defined timeout
|
|
|
#define DEVTIMEOUT 0
|
|
#define DEVTIMEOUT 0
|
|
|
|
|
|
|
|
|
|
+// The default intinfo structure used is the first one
|
|
|
|
|
+#define DEFAULT_INTINFO 0
|
|
|
|
|
+
|
|
|
// For endpoints defined in usb_find_devices.intinfos.epinfos,
|
|
// For endpoints defined in usb_find_devices.intinfos.epinfos,
|
|
|
// the first two must be the default IN and OUT and both must always exist
|
|
// the first two must be the default IN and OUT and both must always exist
|
|
|
#define DEFAULT_EP_IN 0
|
|
#define DEFAULT_EP_IN 0
|
|
@@ -118,11 +121,14 @@ struct usb_epinfo {
|
|
|
uint8_t att;
|
|
uint8_t att;
|
|
|
uint16_t size;
|
|
uint16_t size;
|
|
|
unsigned char ep;
|
|
unsigned char ep;
|
|
|
|
|
+ uint16_t wMaxPacketSize;
|
|
|
|
|
+ uint16_t PrefPacketSize;
|
|
|
bool found;
|
|
bool found;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
struct usb_intinfo {
|
|
struct usb_intinfo {
|
|
|
int interface;
|
|
int interface;
|
|
|
|
|
+ int ctrl_transfer;
|
|
|
int epinfo_count;
|
|
int epinfo_count;
|
|
|
struct usb_epinfo *epinfos;
|
|
struct usb_epinfo *epinfos;
|
|
|
};
|
|
};
|
|
@@ -134,6 +140,7 @@ enum sub_ident {
|
|
|
IDENT_BAS,
|
|
IDENT_BAS,
|
|
|
IDENT_BAM,
|
|
IDENT_BAM,
|
|
|
IDENT_BFL,
|
|
IDENT_BFL,
|
|
|
|
|
+ IDENT_BFU,
|
|
|
IDENT_MMQ,
|
|
IDENT_MMQ,
|
|
|
IDENT_AVA,
|
|
IDENT_AVA,
|
|
|
IDENT_BTB,
|
|
IDENT_BTB,
|
|
@@ -157,9 +164,7 @@ struct usb_find_devices {
|
|
|
char *iProduct;
|
|
char *iProduct;
|
|
|
int config;
|
|
int config;
|
|
|
unsigned int timeout;
|
|
unsigned int timeout;
|
|
|
- uint16_t wMaxPacketSize;
|
|
|
|
|
uint16_t latency;
|
|
uint16_t latency;
|
|
|
- int which_intinfo;
|
|
|
|
|
int intinfo_count;
|
|
int intinfo_count;
|
|
|
struct usb_intinfo *intinfos;
|
|
struct usb_intinfo *intinfos;
|
|
|
};
|
|
};
|
|
@@ -193,7 +198,6 @@ struct cg_usb_device {
|
|
|
char *buffer;
|
|
char *buffer;
|
|
|
uint32_t bufsiz;
|
|
uint32_t bufsiz;
|
|
|
uint32_t bufamt;
|
|
uint32_t bufamt;
|
|
|
- uint16_t PrefPacketSize;
|
|
|
|
|
cgtimer_t cgt_last_write;
|
|
cgtimer_t cgt_last_write;
|
|
|
size_t last_write_siz;
|
|
size_t last_write_siz;
|
|
|
};
|
|
};
|
|
@@ -234,7 +238,7 @@ struct cg_usb_info {
|
|
|
* that uses the lock - however, all usbutils code MUST use it
|
|
* that uses the lock - however, all usbutils code MUST use it
|
|
|
* to avoid devices disappearing while in use by multiple threads
|
|
* to avoid devices disappearing while in use by multiple threads
|
|
|
*/
|
|
*/
|
|
|
- pthread_rwlock_t *devlock;
|
|
|
|
|
|
|
+ pthread_mutex_t *devlock;
|
|
|
|
|
|
|
|
time_t last_pipe;
|
|
time_t last_pipe;
|
|
|
uint64_t pipe_count;
|
|
uint64_t pipe_count;
|
|
@@ -258,7 +262,10 @@ struct cg_usb_info {
|
|
|
struct cg_usb_tmo usb_tmo[USB_TMOS];
|
|
struct cg_usb_tmo usb_tmo[USB_TMOS];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-#define USB_PARSE_COMMANDS \
|
|
|
|
|
|
|
+#define ENUMERATION(a,b) a,
|
|
|
|
|
+#define JUMPTABLE(a,b) b,
|
|
|
|
|
+
|
|
|
|
|
+#define USB_PARSE_COMMANDS(USB_ADD_COMMAND) \
|
|
|
USB_ADD_COMMAND(C_REJECTED, "RejectedNoDevice") \
|
|
USB_ADD_COMMAND(C_REJECTED, "RejectedNoDevice") \
|
|
|
USB_ADD_COMMAND(C_PING, "Ping") \
|
|
USB_ADD_COMMAND(C_PING, "Ping") \
|
|
|
USB_ADD_COMMAND(C_CLEAR, "Clear") \
|
|
USB_ADD_COMMAND(C_CLEAR, "Clear") \
|
|
@@ -322,6 +329,20 @@ struct cg_usb_info {
|
|
|
USB_ADD_COMMAND(C_ENABLE_UART, "EnableUART") \
|
|
USB_ADD_COMMAND(C_ENABLE_UART, "EnableUART") \
|
|
|
USB_ADD_COMMAND(C_BB_SET_VOLTAGE, "SetCoreVoltage") \
|
|
USB_ADD_COMMAND(C_BB_SET_VOLTAGE, "SetCoreVoltage") \
|
|
|
USB_ADD_COMMAND(C_BB_GET_VOLTAGE, "GetCoreVoltage") \
|
|
USB_ADD_COMMAND(C_BB_GET_VOLTAGE, "GetCoreVoltage") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_RESET, "BF1Reset") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_OPEN, "BF1Open") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_INIT, "BF1Init") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_CLOSE, "BF1Close") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_REQINFO, "BF1RequestInfo") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_GETINFO, "BF1GetInfo") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_REQRESET, "BF1RequestReset") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_GETRESET, "BF1GetReset") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_REQWORK, "BF1RequestWork") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_GETWORK, "BF1GetWork") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_GETRES, "BF1GetResults") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_FLUSH, "BF1Flush") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_IFLUSH, "BF1InterruptFlush") \
|
|
|
|
|
+ USB_ADD_COMMAND(C_BF1_IDENTIFY, "BF1Identify") \
|
|
|
USB_ADD_COMMAND(C_HF_RESET, "HFReset") \
|
|
USB_ADD_COMMAND(C_HF_RESET, "HFReset") \
|
|
|
USB_ADD_COMMAND(C_HF_PLL_CONFIG, "HFPLLConfig") \
|
|
USB_ADD_COMMAND(C_HF_PLL_CONFIG, "HFPLLConfig") \
|
|
|
USB_ADD_COMMAND(C_HF_ADDRESS, "HFAddress") \
|
|
USB_ADD_COMMAND(C_HF_ADDRESS, "HFAddress") \
|
|
@@ -335,12 +356,10 @@ struct cg_usb_info {
|
|
|
USB_ADD_COMMAND(C_HF_CLOCKGATE, "HFClockGate")
|
|
USB_ADD_COMMAND(C_HF_CLOCKGATE, "HFClockGate")
|
|
|
|
|
|
|
|
/* Create usb_cmds enum from USB_PARSE_COMMANDS macro */
|
|
/* Create usb_cmds enum from USB_PARSE_COMMANDS macro */
|
|
|
-#define USB_ADD_COMMAND(X, Y) X,
|
|
|
|
|
enum usb_cmds {
|
|
enum usb_cmds {
|
|
|
- USB_PARSE_COMMANDS
|
|
|
|
|
|
|
+ USB_PARSE_COMMANDS(ENUMERATION)
|
|
|
C_MAX
|
|
C_MAX
|
|
|
};
|
|
};
|
|
|
-#undef USB_ADD_COMMAND
|
|
|
|
|
|
|
|
|
|
struct device_drv;
|
|
struct device_drv;
|
|
|
struct cgpu_info;
|
|
struct cgpu_info;
|
|
@@ -353,17 +372,17 @@ struct cgpu_info *usb_alloc_cgpu(struct device_drv *drv, int threads);
|
|
|
struct cgpu_info *usb_free_cgpu_devlock(struct cgpu_info *cgpu, bool free_devlock);
|
|
struct cgpu_info *usb_free_cgpu_devlock(struct cgpu_info *cgpu, bool free_devlock);
|
|
|
#define usb_free_cgpu(cgpu) usb_free_cgpu_devlock(cgpu, true)
|
|
#define usb_free_cgpu(cgpu) usb_free_cgpu_devlock(cgpu, true)
|
|
|
void usb_uninit(struct cgpu_info *cgpu);
|
|
void usb_uninit(struct cgpu_info *cgpu);
|
|
|
-struct cgpu_info *usb_init_intinfo(struct cgpu_info *orig, int intinfo);
|
|
|
|
|
bool usb_init(struct cgpu_info *cgpu, struct libusb_device *dev, struct usb_find_devices *found);
|
|
bool usb_init(struct cgpu_info *cgpu, struct libusb_device *dev, struct usb_find_devices *found);
|
|
|
void usb_detect(struct device_drv *drv, bool (*device_detect)(struct libusb_device *, struct usb_find_devices *));
|
|
void usb_detect(struct device_drv *drv, bool (*device_detect)(struct libusb_device *, struct usb_find_devices *));
|
|
|
struct api_data *api_usb_stats(int *count);
|
|
struct api_data *api_usb_stats(int *count);
|
|
|
void update_usb_stats(struct cgpu_info *cgpu);
|
|
void update_usb_stats(struct cgpu_info *cgpu);
|
|
|
-int _usb_read(struct cgpu_info *cgpu, int ep, char *buf, size_t bufsiz, int *processed, unsigned int timeout, const char *end, enum usb_cmds cmd, bool readonce);
|
|
|
|
|
-int _usb_write(struct cgpu_info *cgpu, int ep, char *buf, size_t bufsiz, int *processed, unsigned int timeout, enum usb_cmds);
|
|
|
|
|
|
|
+int _usb_read(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_t bufsiz, int *processed, unsigned int timeout, const char *end, enum usb_cmds cmd, bool readonce);
|
|
|
|
|
+int _usb_write(struct cgpu_info *cgpu, int intinfo, int epinfo, char *buf, size_t bufsiz, int *processed, unsigned int timeout, enum usb_cmds);
|
|
|
int _usb_transfer(struct cgpu_info *cgpu, uint8_t request_type, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint32_t *data, int siz, unsigned int timeout, enum usb_cmds cmd);
|
|
int _usb_transfer(struct cgpu_info *cgpu, uint8_t request_type, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint32_t *data, int siz, unsigned int timeout, enum usb_cmds cmd);
|
|
|
int _usb_transfer_read(struct cgpu_info *cgpu, uint8_t request_type, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, char *buf, int bufsiz, int *amount, unsigned int timeout, enum usb_cmds cmd);
|
|
int _usb_transfer_read(struct cgpu_info *cgpu, uint8_t request_type, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, char *buf, int bufsiz, int *amount, unsigned int timeout, enum usb_cmds cmd);
|
|
|
int usb_ftdi_cts(struct cgpu_info *cgpu);
|
|
int usb_ftdi_cts(struct cgpu_info *cgpu);
|
|
|
-int usb_ftdi_set_latency(struct cgpu_info *cgpu);
|
|
|
|
|
|
|
+int _usb_ftdi_set_latency(struct cgpu_info *cgpu, int intinfo);
|
|
|
|
|
+#define usb_ftdi_set_latency(_cgpu) _usb_ftdi_set_latency(_cgpu, DEFAULT_INTINFO)
|
|
|
void usb_buffer_enable(struct cgpu_info *cgpu);
|
|
void usb_buffer_enable(struct cgpu_info *cgpu);
|
|
|
void usb_buffer_disable(struct cgpu_info *cgpu);
|
|
void usb_buffer_disable(struct cgpu_info *cgpu);
|
|
|
void usb_buffer_clear(struct cgpu_info *cgpu);
|
|
void usb_buffer_clear(struct cgpu_info *cgpu);
|
|
@@ -371,55 +390,72 @@ uint32_t usb_buffer_size(struct cgpu_info *cgpu);
|
|
|
void usb_set_cps(struct cgpu_info *cgpu, int cps);
|
|
void usb_set_cps(struct cgpu_info *cgpu, int cps);
|
|
|
void usb_enable_cps(struct cgpu_info *cgpu);
|
|
void usb_enable_cps(struct cgpu_info *cgpu);
|
|
|
void usb_disable_cps(struct cgpu_info *cgpu);
|
|
void usb_disable_cps(struct cgpu_info *cgpu);
|
|
|
-int usb_interface(struct cgpu_info *cgpu);
|
|
|
|
|
|
|
+int _usb_interface(struct cgpu_info *cgpu, int intinfo);
|
|
|
|
|
+#define usb_interface(_cgpu) _usb_interface(_cgpu, DEFAULT_INTINFO)
|
|
|
enum sub_ident usb_ident(struct cgpu_info *cgpu);
|
|
enum sub_ident usb_ident(struct cgpu_info *cgpu);
|
|
|
-void usb_set_pps(struct cgpu_info *cgpu, uint16_t PrefPacketSize);
|
|
|
|
|
|
|
+void _usb_set_pps(struct cgpu_info *cgpu, int intinfo, int epinfo, uint16_t PrefPacketSize);
|
|
|
|
|
+#define usb_set_pps(_cgpu, _pps) _usb_set_pps(_cgpu, -1, -1, _pps)
|
|
|
void usb_set_dev_start(struct cgpu_info *cgpu);
|
|
void usb_set_dev_start(struct cgpu_info *cgpu);
|
|
|
void usb_cleanup();
|
|
void usb_cleanup();
|
|
|
void usb_initialise();
|
|
void usb_initialise();
|
|
|
void *usb_resource_thread(void *userdata);
|
|
void *usb_resource_thread(void *userdata);
|
|
|
|
|
|
|
|
#define usb_read(cgpu, buf, bufsiz, read, cmd) \
|
|
#define usb_read(cgpu, buf, bufsiz, read, cmd) \
|
|
|
- _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false)
|
|
|
|
|
+
|
|
|
|
|
+#define usb_read_ii(cgpu, intinfo, buf, bufsiz, read, cmd) \
|
|
|
|
|
+ _usb_read(cgpu, intinfo, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false)
|
|
|
|
|
|
|
|
#define usb_read_once(cgpu, buf, bufsiz, read, cmd) \
|
|
#define usb_read_once(cgpu, buf, bufsiz, read, cmd) \
|
|
|
- _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, true)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, true)
|
|
|
|
|
+
|
|
|
|
|
+#define usb_read_ii_once(cgpu, intinfo, buf, bufsiz, read, cmd) \
|
|
|
|
|
+ _usb_read(cgpu, intinfo, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, true)
|
|
|
|
|
|
|
|
#define usb_read_once_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
|
|
#define usb_read_once_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
|
|
|
- _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, true)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, true)
|
|
|
|
|
+
|
|
|
|
|
+#define usb_read_ii_once_timeout(cgpu, intinfo, buf, bufsiz, read, timeout, cmd) \
|
|
|
|
|
+ _usb_read(cgpu, intinfo, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, true)
|
|
|
|
|
|
|
|
#define usb_read_nl(cgpu, buf, bufsiz, read, cmd) \
|
|
#define usb_read_nl(cgpu, buf, bufsiz, read, cmd) \
|
|
|
- _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, false)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, false)
|
|
|
|
|
|
|
|
#define usb_read_nl_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
|
|
#define usb_read_nl_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
|
|
|
- _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, timeout, "\n", cmd, false)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, timeout, "\n", cmd, false)
|
|
|
|
|
|
|
|
#define usb_read_ok(cgpu, buf, bufsiz, read, cmd) \
|
|
#define usb_read_ok(cgpu, buf, bufsiz, read, cmd) \
|
|
|
- _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "OK\n", cmd, false)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "OK\n", cmd, false)
|
|
|
|
|
|
|
|
#define usb_read_ok_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
|
|
#define usb_read_ok_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
|
|
|
- _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, timeout, "OK\n", cmd, false)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, timeout, "OK\n", cmd, false)
|
|
|
|
|
|
|
|
#define usb_read_ep(cgpu, ep, buf, bufsiz, read, cmd) \
|
|
#define usb_read_ep(cgpu, ep, buf, bufsiz, read, cmd) \
|
|
|
- _usb_read(cgpu, ep, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, ep, buf, bufsiz, read, DEVTIMEOUT, NULL, cmd, false)
|
|
|
|
|
|
|
|
#define usb_read_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
|
|
#define usb_read_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
|
|
|
- _usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, false)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, false)
|
|
|
|
|
+
|
|
|
|
|
+#define usb_read_ii_timeout(cgpu, intinfo, buf, bufsiz, read, timeout, cmd) \
|
|
|
|
|
+ _usb_read(cgpu, intinfo, DEFAULT_EP_IN, buf, bufsiz, read, timeout, NULL, cmd, false)
|
|
|
|
|
|
|
|
#define usb_read_ep_timeout(cgpu, ep, buf, bufsiz, read, timeout, cmd) \
|
|
#define usb_read_ep_timeout(cgpu, ep, buf, bufsiz, read, timeout, cmd) \
|
|
|
- _usb_read(cgpu, ep, buf, bufsiz, read, timeout, NULL, cmd, false)
|
|
|
|
|
|
|
+ _usb_read(cgpu, DEFAULT_INTINFO, ep, buf, bufsiz, read, timeout, NULL, cmd, false)
|
|
|
|
|
|
|
|
#define usb_write(cgpu, buf, bufsiz, wrote, cmd) \
|
|
#define usb_write(cgpu, buf, bufsiz, wrote, cmd) \
|
|
|
- _usb_write(cgpu, DEFAULT_EP_OUT, buf, bufsiz, wrote, DEVTIMEOUT, cmd)
|
|
|
|
|
|
|
+ _usb_write(cgpu, DEFAULT_INTINFO, DEFAULT_EP_OUT, buf, bufsiz, wrote, DEVTIMEOUT, cmd)
|
|
|
|
|
+
|
|
|
|
|
+#define usb_write_ii(cgpu, intinfo, buf, bufsiz, wrote, cmd) \
|
|
|
|
|
+ _usb_write(cgpu, intinfo, DEFAULT_EP_OUT, buf, bufsiz, wrote, DEVTIMEOUT, cmd)
|
|
|
|
|
|
|
|
#define usb_write_ep(cgpu, ep, buf, bufsiz, wrote, cmd) \
|
|
#define usb_write_ep(cgpu, ep, buf, bufsiz, wrote, cmd) \
|
|
|
- _usb_write(cgpu, ep, buf, bufsiz, wrote, DEVTIMEOUT, cmd)
|
|
|
|
|
|
|
+ _usb_write(cgpu, DEFAULT_INTINFO, ep, buf, bufsiz, wrote, DEVTIMEOUT, cmd)
|
|
|
|
|
|
|
|
#define usb_write_timeout(cgpu, buf, bufsiz, wrote, timeout, cmd) \
|
|
#define usb_write_timeout(cgpu, buf, bufsiz, wrote, timeout, cmd) \
|
|
|
- _usb_write(cgpu, DEFAULT_EP_OUT, buf, bufsiz, wrote, timeout, cmd)
|
|
|
|
|
|
|
+ _usb_write(cgpu, DEFAULT_INTINFO, DEFAULT_EP_OUT, buf, bufsiz, wrote, timeout, cmd)
|
|
|
|
|
|
|
|
#define usb_write_ep_timeout(cgpu, ep, buf, bufsiz, wrote, timeout, cmd) \
|
|
#define usb_write_ep_timeout(cgpu, ep, buf, bufsiz, wrote, timeout, cmd) \
|
|
|
- _usb_write(cgpu, ep, buf, bufsiz, wrote, timeout, cmd)
|
|
|
|
|
|
|
+ _usb_write(cgpu, DEFAULT_INTINFO, ep, buf, bufsiz, wrote, timeout, cmd)
|
|
|
|
|
|
|
|
#define usb_transfer(cgpu, typ, req, val, idx, cmd) \
|
|
#define usb_transfer(cgpu, typ, req, val, idx, cmd) \
|
|
|
_usb_transfer(cgpu, typ, req, val, idx, NULL, 0, DEVTIMEOUT, cmd)
|
|
_usb_transfer(cgpu, typ, req, val, idx, NULL, 0, DEVTIMEOUT, cmd)
|