[sane-devel] Epson Perfection 2450 and Transparency Unit

John Cotter john.cotter at phonecoop.coop
Tue Apr 28 08:07:47 UTC 2009


Hello,
Can you please take me off your distribution list manually?  I get about 30
of these per day.  The unsubscribe option below does not seem to be working
fully. Regards John

John Cotter
Lowestoft
Suffolk
United Kingdom


-----Original Message-----
From: sane-devel-bounces+john.cotter=phonecoop.coop at lists.alioth.debian.org
[mailto:sane-devel-bounces+john.cotter=phonecoop.coop at lists.alioth.debian.or
g] On Behalf Of Alessandro Zummo
Sent: 22 April 2009 23:39
To: Marc Deslauriers
Cc: sane-devel at lists.alioth.debian.org
Subject: Re: [sane-devel] Epson Perfection 2450 and Transparency Unit


On Wed, 22 Apr 2009 17:43:46 -0400
Marc Deslauriers <marcdeslauriers at videotron.ca> wrote:

> Yes, I was having this issue only when using the TPU.
> 
> I don't seem to be affected by the second change. It seems to be an 
> extra step to detect a TPU, but mine detects fine.

 Can you both try the attached patch?
 
 After the next release, when SANE will have the new status codes,  I'll
backport some parts of from sane evolution which handles  the warm up issue
way better.

diff -u -r1.23 epson2.c
--- backend/epson2.c	25 Feb 2009 02:11:17 -0000	1.23
+++ backend/epson2.c	22 Apr 2009 22:38:01 -0000
@@ -3856,36 +3856,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.
@@ -4020,20 +3990,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;
 }
 


-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


--
sane-devel mailing list: sane-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to sane-devel-request at lists.alioth.debian.org




More information about the sane-devel mailing list