Browse Source

Use a longer timeout for retrieving bflsc details.

Con Kolivas 12 years ago
parent
commit
641545aac7
2 changed files with 4 additions and 1 deletions
  1. 2 1
      driver-bflsc.c
  2. 2 0
      usbutils.c

+ 2 - 1
driver-bflsc.c

@@ -705,7 +705,8 @@ static bool getinfo(struct cgpu_info *bflsc, int dev)
 		return false;
 	}
 
-	err = usb_read_ok(bflsc, buf, sizeof(buf)-1, &amount, C_GETDETAILS);
+	err = usb_read_ok_timeout(bflsc, buf, sizeof(buf)-1, &amount,
+				  BFLSC_INFO_TIMEOUT, C_GETDETAILS);
 	if (err < 0 || amount < 1) {
 		if (err < 0) {
 			applog(LOG_ERR, "%s detect (%s) get details return invalid/timed out (%d:%d)",

+ 2 - 0
usbutils.c

@@ -50,6 +50,8 @@
 
 #define USB_CONFIG 1
 
+#define BFLSC_INFO_TIMEOUT 999
+
 #ifdef WIN32
 #define BFLSC_TIMEOUT_MS 999
 #define BITFORCE_TIMEOUT_MS 999