Browse Source

icarus report usb write error information

nfactor-troky
Kano 12 years ago
parent
commit
a4697bed57
  1. 3
      driver-icarus.c

3
driver-icarus.c

@ -783,7 +783,8 @@ static int64_t icarus_scanhash(struct thr_info *thr, struct work *work,
err = usb_write(icarus, (char *)ob_bin, sizeof(ob_bin), &amount, C_SENDWORK); err = usb_write(icarus, (char *)ob_bin, sizeof(ob_bin), &amount, C_SENDWORK);
if (err < 0 || amount != sizeof(ob_bin)) { if (err < 0 || amount != sizeof(ob_bin)) {
applog(LOG_ERR, "%s%i: Comms error", icarus->drv->name, icarus->device_id); applog(LOG_ERR, "%s%i: Comms error (err=%d amt=%d)",
icarus->drv->name, icarus->device_id, err, amount);
dev_error(icarus, REASON_DEV_COMMS_ERROR); dev_error(icarus, REASON_DEV_COMMS_ERROR);
icarus_initialise(icarus, info->baud); icarus_initialise(icarus, info->baud);
return 0; return 0;

Loading…
Cancel
Save