diff -u sane-backends-1.0.19/debian/changelog sane-backends-1.0.19/debian/changelog --- sane-backends-1.0.19/debian/changelog +++ sane-backends-1.0.19/debian/changelog @@ -1,3 +1,9 @@ +sane-backends (1.0.19-23ubuntu8) jaunty; urgency=low + + * Add 43_epson2_warmup.dpatch: Fix warmup timeout in epson2 backend. + + -- Marc Deslauriers Fri, 24 Apr 2009 15:51:16 -0400 + sane-backends (1.0.19-23ubuntu7) jaunty; urgency=low * debian/libsane.preinst: Remove the old blacklist-scanner modprobe diff -u sane-backends-1.0.19/debian/patches/00list sane-backends-1.0.19/debian/patches/00list --- sane-backends-1.0.19/debian/patches/00list +++ sane-backends-1.0.19/debian/patches/00list @@ -23,0 +24 @@ +43_epson2_warmup only in patch2: unchanged: --- sane-backends-1.0.19.orig/debian/patches/43_epson2_warmup.dpatch +++ sane-backends-1.0.19/debian/patches/43_epson2_warmup.dpatch @@ -0,0 +1,84 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 43_epson2_warmup.dpatch by Marc Deslauriers +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Description: Fix warmup timeout for certain Epson scanners +## DP: Patch: http://lists.alioth.debian.org/pipermail/sane-devel/2009-April/024514.html + +@DPATCH@ +diff -urNad sane-backends-1.0.19~/backend/epson2.c sane-backends-1.0.19/backend/epson2.c +--- sane-backends-1.0.19~/backend/epson2.c 2009-04-22 18:59:25.000000000 -0400 ++++ sane-backends-1.0.19/backend/epson2.c 2009-04-22 19:01:34.000000000 -0400 +@@ -3832,36 +3832,6 @@ + return status; + } + +-/* Helper function to correct the error for warmup lamp +- * gotten from scanners with known buggy firmware. +- * Epson Perfection 4990 Photo +- */ +- +-static SANE_Status +-fix_warmup_lamp(Epson_Scanner * s, SANE_Status status) +-{ +- /* +- * Check for Perfection 4990 photo/GT-X800 scanner. +- * Scanner sometimes report "Fatal error" in status in informationblock when +- * lamp warm up. Solution send FS G one more time. +- */ +- if (e2_model(s, "GT-X800")) { +- SANE_Status status2; +- +- DBG(1, "%s: Epson Perfection 4990 lamp warm up problem \n", +- __func__); +- status2 = e2_wait_warm_up(s); +- if (status2 == SANE_STATUS_GOOD) { +- status = e2_start_ext_scan(s); +- return status; +- } +- } +- +- return status; +-} +- +- +- + /* + * This function is part of the SANE API and gets called from the front end to + * start the scan process. +@@ -3994,20 +3964,29 @@ + if (dev->extended_commands) { + status = e2_start_ext_scan(s); + +- /* this is a kind of read request */ +- if (dev->connection == SANE_EPSON_NET) +- sanei_epson_net_write(s, 0x2000, NULL, 0, +- s->ext_block_len + 1, &status); ++ /* check if the scanner signaled a warming up */ ++ if (status == SANE_STATUS_IO_ERROR && s->hw->use_extension) { ++ status = e2_wait_warm_up(s); ++ if (status == SANE_STATUS_GOOD) ++ status = e2_start_ext_scan(s); ++ } ++ + } else + status = e2_start_std_scan(s); + + if (status != SANE_STATUS_GOOD) { + DBG(1, "%s: start failed: %s\n", __func__, + sane_strstatus(status)); +- if (status == SANE_STATUS_IO_ERROR) +- status = fix_warmup_lamp(s, status); ++ ++ return status; + } + ++ /* this is a kind of read request */ ++ if (dev->connection == SANE_EPSON_NET) { ++ sanei_epson_net_write(s, 0x2000, NULL, 0, ++ s->ext_block_len + 1, &status); ++ } ++ + return status; + } +