diff --git a/backend/epsonds-cmd.c b/backend/epsonds-cmd.c index ac04f106a..f57f84662 100644 --- a/backend/epsonds-cmd.c +++ b/backend/epsonds-cmd.c @@ -226,6 +226,8 @@ static SANE_Status esci2_cmd_simple(epsonds_scanner* s, char *cmd, SANE_Status ( SANE_Status esci2_fin(epsonds_scanner *s) { + DBG(5, "%s\n", __func__); + SANE_Status status = esci2_cmd_simple(s, "FIN x0000000", NULL); s->locked = 0; return status; diff --git a/backend/epsonds-io.c b/backend/epsonds-io.c index 5844dc5ad..28bacfc32 100644 --- a/backend/epsonds-io.c +++ b/backend/epsonds-io.c @@ -157,21 +157,15 @@ SANE_Status eds_fsx(epsonds_scanner *s) SANE_Status eds_lock(epsonds_scanner *s) { - int tries = 3; + SANE_Status status; + + DBG(5, "%s\n", __func__); if (s->hw->connection == SANE_EPSONDS_USB) { sanei_usb_set_timeout(USB_SHORT_TIMEOUT); } - SANE_Status status = eds_fsx(s); - if (status != SANE_STATUS_GOOD) { - - do { - sleep(1); - status = eds_fsx(s); - - } while (--tries && status != SANE_STATUS_GOOD); - } + status = eds_fsx(s); if (s->hw->connection == SANE_EPSONDS_USB) { sanei_usb_set_timeout(USB_TIMEOUT); diff --git a/backend/epsonds-io.h b/backend/epsonds-io.h index d208753ac..1a1b2b739 100644 --- a/backend/epsonds-io.h +++ b/backend/epsonds-io.h @@ -15,7 +15,7 @@ #define epsonds_io_h #define USB_TIMEOUT (6 * 1000) -#define USB_SHORT_TIMEOUT (1 * 500) +#define USB_SHORT_TIMEOUT (1 * 800) size_t eds_send(epsonds_scanner *s, void *buf, size_t length, SANE_Status *status); size_t eds_recv(epsonds_scanner *s, void *buf, size_t length, SANE_Status *status); diff --git a/backend/epsonds.c b/backend/epsonds.c index 9f0ed8fc3..3d1196bed 100644 --- a/backend/epsonds.c +++ b/backend/epsonds.c @@ -167,9 +167,6 @@ open_scanner(epsonds_scanner *s) if (s->hw->connection == SANE_EPSONDS_USB) { status = sanei_usb_open(s->hw->sane.name, &s->fd); - if (status == SANE_STATUS_GOOD) - sanei_usb_clear_halt(s->fd); - sanei_usb_set_timeout(USB_TIMEOUT); } else { diff --git a/backend/epsonds.h b/backend/epsonds.h index c8f3045d2..2c2e42240 100644 --- a/backend/epsonds.h +++ b/backend/epsonds.h @@ -153,8 +153,6 @@ typedef struct ring_buffer } ring_buffer; -// typedef struct epsonds_scanner epsonds_scanner; - /* an instance of a scanner */ struct epsonds_scanner