aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Bensch <roben-guest@alioth.debian.org>2016-10-05 19:51:35 +0200
committerRolf Bensch <roben-guest@alioth.debian.org>2016-10-05 19:52:02 +0200
commitc751a9ca22934ef93ca6b7afd3d0aaea4969c5fc (patch)
tree0f7aef311fe6bd27452579f144293e457aecc7a2
parenta9806de08ea65acb8a1109b480147a4a7ec76cb5 (diff)
fix ADF scanning for Canon MF57x0 devices
- ignore result from calibrate(): don't interrupt @ PIXMA_STATUS_BUSY - MF57x0 devices don't require abort_session() after the last page - reported by Dmitry Deshevoy
-rw-r--r--backend/pixma_mp730.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/backend/pixma_mp730.c b/backend/pixma_mp730.c
index 06bc9ee..6bf3f42 100644
--- a/backend/pixma_mp730.c
+++ b/backend/pixma_mp730.c
@@ -459,6 +459,10 @@ step1 (pixma_t * s)
default:
break;
}
+
+ // ignore result from calibrate()
+ // don't interrupt @ PIXMA_STATUS_BUSY
+ error = 0;
}
if (error >= 0)
error = activate (s, 0);
@@ -747,19 +751,23 @@ mp730_finish_scan (pixma_t * s)
query_status (s);
activate (s, 0);
- if (! aborted && s->cfg->pid == IR1020_PID)
- {
- error = abort_session (s);
- if (error < 0)
- {
- PDBG (pixma_dbg
- (1, "WARNING:abort_session() failed %s\n",
- pixma_strerror (error)));
- query_status (s);
- query_status (s);
- activate (s, 0);
- }
- }
+ // MF57x0 devices don't require abort_session() after the last page
+ if (!aborted &&
+ (s->param->source == PIXMA_SOURCE_ADF ||
+ s->param->source == PIXMA_SOURCE_ADFDUP) &&
+ has_paper (s) &&
+ (s->cfg->pid == MF5730_PID ||
+ s->cfg->pid == MF5750_PID ||
+ s->cfg->pid == MF5770_PID ||
+ s->cfg->pid == IR1020_PID))
+ {
+ error = abort_session (s);
+ if (error < 0)
+ PDBG (pixma_dbg
+ (1, "WARNING:abort_session() failed %s\n",
+ pixma_strerror (error)));
+ }
+
mp->buf = mp->lbuf = mp->imgbuf = NULL;
mp->state = state_idle;
/* fall through */