|
|
@ -627,7 +627,8 @@ static void avalon_parse_results(struct cgpu_info *avalon, struct avalon_info *i |
|
|
|
struct work *work; |
|
|
|
struct work *work; |
|
|
|
|
|
|
|
|
|
|
|
ar = (struct avalon_result *)&buf[i]; |
|
|
|
ar = (struct avalon_result *)&buf[i]; |
|
|
|
if ((work = avalon_valid_result(avalon, ar)) != NULL) { |
|
|
|
work = avalon_valid_result(avalon, ar); |
|
|
|
|
|
|
|
if (work) { |
|
|
|
bool gettemp = false; |
|
|
|
bool gettemp = false; |
|
|
|
|
|
|
|
|
|
|
|
found = true; |
|
|
|
found = true; |
|
|
@ -651,6 +652,7 @@ static void avalon_parse_results(struct cgpu_info *avalon, struct avalon_info *i |
|
|
|
spare = *offset - AVALON_READ_SIZE - 1; |
|
|
|
spare = *offset - AVALON_READ_SIZE - 1; |
|
|
|
else |
|
|
|
else |
|
|
|
spare = AVALON_READ_SIZE + i; |
|
|
|
spare = AVALON_READ_SIZE + i; |
|
|
|
|
|
|
|
applog(LOG_WARNING, "Avalon: Discarding %d bytes from buffer", spare); |
|
|
|
*offset -= spare; |
|
|
|
*offset -= spare; |
|
|
|
memmove(buf, buf + spare, *offset); |
|
|
|
memmove(buf, buf + spare, *offset); |
|
|
|
if (!found) { |
|
|
|
if (!found) { |
|
|
@ -703,6 +705,11 @@ static void *avalon_get_results(void *userdata) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (opt_debug) { |
|
|
|
|
|
|
|
applog(LOG_DEBUG, "Avalon: get:"); |
|
|
|
|
|
|
|
hexdump((uint8_t *)buf, ret); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
memcpy(&readbuf[offset], buf, ret); |
|
|
|
memcpy(&readbuf[offset], buf, ret); |
|
|
|
offset += ret; |
|
|
|
offset += ret; |
|
|
|
|
|
|
|
|
|
|
|