From 37cb2ad56c9b5f8f3860315f93d57f69b1a72f63 Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Wed, 2 Mar 2016 21:04:36 +0000 Subject: [PATCH] Bump read timeout in usbhid_recv() to 300 ms. In some situations (e.g. when accessing a DW-fused device), 100 ms have proven to be too short. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1387 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 4 ++++ usb_hidapi.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bc4ac224..f39f04bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-03-02 Joerg Wunsch + + * usb_hidapi.c (usbhid_recv): Bump read timeout to 300 ms. + 2016-02-20 Joerg Wunsch * jtag3.c: add support for libhidapi as (optional) transport for diff --git a/usb_hidapi.c b/usb_hidapi.c index 53229df0..6af5dd53 100644 --- a/usb_hidapi.c +++ b/usb_hidapi.c @@ -294,7 +294,7 @@ static int usbhid_recv(union filedescriptor *fd, unsigned char *buf, size_t nbyt if (udev == NULL) return -1; - rv = i = hid_read_timeout(udev, buf, nbytes, 100); + rv = i = hid_read_timeout(udev, buf, nbytes, 300); if (i != nbytes) avrdude_message(MSG_INFO, "%s: Short read, read only %d out of %u bytes\n",