Commit 0a15beb74207907c8ec4615a95ee5993b94f6c88

Con Kolivas 2013-05-16T12:38:48

libusb_control_transfer 16 bit words are endian specific.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/usbutils.c b/usbutils.c
index f4efe61..081c292 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2071,7 +2071,7 @@ int _usb_transfer(struct cgpu_info *cgpu, uint8_t request_type, uint8_t bRequest
 
 	STATS_TIMEVAL(&tv_start);
 	err = libusb_control_transfer(usbdev->handle, request_type,
-		bRequest, wValue, wIndex, NULL, 0,
+		bRequest, htole16(wValue), htole16(wIndex), NULL, 0,
 		timeout == DEVTIMEOUT ? usbdev->found->timeout : timeout);
 	STATS_TIMEVAL(&tv_finish);
 	USB_STATS(cgpu, &tv_start, &tv_finish, err, cmd, SEQ0);