From a4697bed57d91e399fd8bad8fc681b8518fa9667 Mon Sep 17 00:00:00 2001 From: Kano Date: Sun, 19 May 2013 21:11:45 +1000 Subject: [PATCH] icarus report usb write error information --- driver-icarus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver-icarus.c b/driver-icarus.c index e24bd4eb..c5e1a1eb 100644 --- a/driver-icarus.c +++ b/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); 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); icarus_initialise(icarus, info->baud); return 0;