Skip to content

Commit

Permalink
Reduce the AUC timeout, don't read again on P_DETECT pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangfu committed Nov 16, 2014
1 parent 8a8f3d5 commit fe0c303
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion driver-avalon4.c
Expand Up @@ -599,7 +599,7 @@ static int avalon4_iic_xfer_pkg(struct cgpu_info *avalon4, uint8_t slave_addr,

avalon4_iic_init_pkg(wbuf, &iic_info, (uint8_t *)pkg, AVA4_WRITE_SIZE, rlen);
err = avalon4_iic_xfer(avalon4, wbuf, wbuf[0], &wcnt, rbuf, rlen, &rcnt);
if (err == -7 && rcnt == 0 && rlen) {
if ((pkg->type != AVA4_P_DETECT) && err == -7 && !rcnt && rlen) {
avalon4_iic_init_pkg(wbuf, &iic_info, NULL, 0, rlen);
err = avalon4_iic_xfer(avalon4, wbuf, wbuf[0], &wcnt, rbuf, rlen, &rcnt);
applog(LOG_DEBUG, "Avalon4: IIC read again!(err:%d)", err);
Expand Down
3 changes: 2 additions & 1 deletion usbutils.c
Expand Up @@ -84,6 +84,7 @@ static cgtimer_t usb11_cgt;
#define BITFORCE_TIMEOUT_MS 200
#define MODMINER_TIMEOUT_MS 100
#define AVALON_TIMEOUT_MS 200
#define AVALON4_TIMEOUT_MS 50
#define KLONDIKE_TIMEOUT_MS 200
#define COINTERRA_TIMEOUT_MS 200
#define HASHFAST_TIMEOUT_MS 500
Expand Down Expand Up @@ -643,7 +644,7 @@ static struct usb_find_devices find_dev[] = {
.idVendor = 0x29f1,
.idProduct = 0x33f2,
.config = 1,
.timeout = AVALON_TIMEOUT_MS,
.timeout = AVALON4_TIMEOUT_MS,
.latency = LATENCY_UNUSED,
INTINFO(ava4_ints) },
#endif
Expand Down

0 comments on commit fe0c303

Please sign in to comment.