Commit 8e4909f8d533dc3ffea7934cbbea565f94d3aa4d

Con Kolivas 2013-09-27T11:00:48

Merge branch 'master' of github.com:ckolivas/cgminer into redfury

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/usbutils.c b/usbutils.c
index ee36404..2150c07 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2296,7 +2296,7 @@ usb_bulk_transfer(struct libusb_device_handle *dev_handle,
 	if (length > MaxPacketSize)
 		length = MaxPacketSize;
 	buf = alloca(MaxPacketSize);
-	if (endpoint == LIBUSB_ENDPOINT_OUT)
+	if ((endpoint & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_OUT)
 		memcpy(buf, data, length);
 
 	USBDEBUG("USB debug: @usb_bulk_transfer(%s (nodev=%s),endpoint=%d,data=%p,length=%d,timeout=%u,mode=%d,cmd=%s,seq=%d)", cgpu->drv->name, bool_str(cgpu->usbinfo.nodev), (int)endpoint, data, length, timeout, mode, usb_cmdname(cmd), seq);