[sane-devel] MX375 no recovery from ADF empty when scan started

Rolf Bensch rolf at bensch-online.de
Tue May 20 20:44:25 UTC 2014


Hi Matthias,

Am 20.05.2014 17:49, schrieb Matthias Peter Walther:
> Hallo Rolf,
>
> sorry to bother you again. But here is another bug with my MX375.

No problem.

> If I start an ADF-scan while the ADF is empty, the scanner does not
> recover and needs to be restarted by hand.

Attached patch should fix this. The patch is based on recent git code.

> [...]
>
> I mean scanning ADF without paper in it is stupid, but it should not
> crash the device :)

It's not stupid. Maybe you started the job and forgot to put the paper
into the ADF. Then the job should start scanning if you put the paper
into the ADF *before* timeout counted down to 0 and aborts the job.

Please test, if scanning starts if you put paper into the ADF during
timeout counts down.

Cheers,
Rolf
-------------- next part --------------
--- ./pixma_mp150.c	2014-05-20 22:11:27.000000000 +0200
+++ ../sane-backends/backend/pixma_mp150.c	2014-05-20 22:29:41.000000000 +0200
@@ -1357,7 +1357,11 @@
             (2, "No paper in ADF. Timed out in %d sec.\n", tmo));
         }
       if (!has_paper (s))
+      {
+        mp->last_block = 0x38;   /* Force abort session */
+        mp150_finish_scan (s);
         return PIXMA_ENO_PAPER;
+      }
     }
 
   if (has_ccd_sensor (s) && (mp->generation <= 2))


More information about the sane-devel mailing list