From 4794ce702e0dfc72d129e6b7c0cc33440b28238d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 25 May 2013 23:11:45 +1000 Subject: [PATCH] Send only a single byte reset. --- driver-avalon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/driver-avalon.c b/driver-avalon.c index 1e918f2b..d5c4661b 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -421,6 +421,7 @@ static void avalon_idle(struct cgpu_info *avalon, int fd) static int avalon_reset(struct cgpu_info *avalon, int fd) { struct avalon_result ar; + char reset = 0xad; uint8_t *buf; int ret, i = 0; struct timespec p; @@ -431,7 +432,7 @@ static int avalon_reset(struct cgpu_info *avalon, int fd) } /* Reset once, then send command to go idle */ - ret = avalon_write(fd, "ad", 2); + ret = avalon_write(fd, &reset, 1); if (unlikely(ret == AVA_SEND_ERROR)) return -1; /* Ignore first result as it may be corrupt with old work */ @@ -447,7 +448,7 @@ static int avalon_reset(struct cgpu_info *avalon, int fd) applog(LOG_ERR, "Avalon: Idle"); /* Reset again, then check result */ - ret = avalon_write(fd, "ad", 2); + ret = avalon_write(fd, &reset, 1); if (unlikely(ret == AVA_SEND_ERROR)) return -1;