From 19cedde244e29d5ca6c55410dce533fdca8df90e Mon Sep 17 00:00:00 2001 From: Ondrej Zary Date: Fri, 27 Jul 2012 10:45:55 +0200 Subject: [PATCH] canon: Fix cancel for Canon IX-4015 IX-4015 requires medium_position after cancelling a scan. Without that, it does not return to home position and refuses to accept any other commands. --- backend/canon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/canon.c b/backend/canon.c index 96a5fe90c..168b2d6d9 100644 --- a/backend/canon.c +++ b/backend/canon.c @@ -1671,7 +1671,9 @@ init_options (CANON_Scanner * s) s->opt[OPT_EJECT_AFTERSCAN].cap |= (s->hw->info.can_eject) ? 0 : SANE_CAP_INACTIVE; s->opt[OPT_EJECT_AFTERSCAN].type = SANE_TYPE_BOOL; - s->val[OPT_EJECT_AFTERSCAN].w = SANE_FALSE; + /* IX-4015 requires medium_position command after cancel */ + s->val[OPT_EJECT_AFTERSCAN].w = + (s->hw->info.model == IX4015) ? SANE_TRUE : SANE_FALSE; /* eject before exit */ s->opt[OPT_EJECT_BEFOREEXIT].name = "eject-before-exit";