backend/avision: fix lock-up of scanners not supporting fastfeed

de19ebc introduced a regression, where some scanners would lock-up
completely and require a full power cycle.

To fix that, do not call release_unit for any scanners not supporting
fastfeed for now, since that leads to lock-ups on at least one device.
Currently, it isn't clear what exactly is causing the problems, so it
maybe be enabled in a correct way again, later.

Resolves issue !337.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
merge-requests/540/head
Michael Niewöhner 2020-08-10 19:26:24 +02:00
rodzic d289b42ad7
commit 743290300a
1 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -6747,7 +6747,7 @@ do_eof (Avision_Scanner *s)
static SANE_Status
do_cancel (Avision_Scanner* s)
{
int status, release_type = 0;
int status;
DBG (3, "do_cancel:\n");
@ -6770,11 +6770,11 @@ do_cancel (Avision_Scanner* s)
sanei_thread_invalidate (s->reader_pid);
}
if (s->hw->hw->feature_type & AV_FASTFEED_ON_CANCEL)
release_type = 1;
status = release_unit (s, release_type);
if (status != SANE_STATUS_GOOD)
DBG (1, "do_cancel: release_unit failed\n");
if (s->hw->hw->feature_type & AV_FASTFEED_ON_CANCEL) {
status = release_unit (s, 1);
if (status != SANE_STATUS_GOOD)
DBG (1, "do_cancel: release_unit failed\n");
}
return SANE_STATUS_CANCELLED;
}