Commit 2b5467c44c247d7ca1d2670fc0b56e77b3276adf

Con Kolivas 2012-12-10T10:32:50

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

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/libztex.c b/libztex.c
index a34227e..e640a75 100644
--- a/libztex.c
+++ b/libztex.c
@@ -535,6 +535,7 @@ int libztex_selectFpga(struct libztex_device *ztex)
 		cnt = libusb_control_transfer(ztex->root->hndl, 0x40, 0x51, (uint16_t)number, 0, NULL, 0, 500);
 		if (unlikely(cnt < 0)) {
 			applog(LOG_ERR, "Ztex check device: Failed to set fpga with err %d", cnt);
+			ztex->root->selectedFpga = -1;
 			return cnt;
 		}
 		ztex->root->selectedFpga = number;