[sane-devel] (Solution) Colorpage-SP2 with MS-PNR SCSI card.

cantremember@zipmail.com.br cantremember@zipmail.com.br
Tue, 16 Sep 2003 17:39:34 -0300


For those struggling to get their old Genius Colorpage-SP2
scanner with the MS-PNR card working in Linux, here is the
solution:



ATTENTION:
This has only been verified in kernel 2.6.0-test5.
It will NOT work with the 2.4.X kernels or older.



Compile your kernel with the following options enabled:
ATTENTION: With 2.6.0-test5, the patch attached is required.

SCSI Device Support:
  SCSI Low-Level Drivers:
    > Generic NCR5380/53c400 PIO Support.
    > Enable NCR53c400 Extensions. 


If you compiled it as monolithic, put the following line
in your lilo.conf:

append="ncr53c400a=<PORT>,255"


Or, if you compiled it as a module, activate it with this:
(Remember to have your scanner turned on!)

modprobe g_NCR5380 ncr_53c400a=1 ncr_addr=<PORT> ncr_irq=255


The <PORT> value must be one of those: 0x280, 0x290, 0x300,
0x310, 0x320, 0x330, 0x340, 0x350
(I use 0x280 here with no problems.)

And let SANE detect your scanner with sane-find-scanner!
It is reported as a Microtek Model, as it should be, and
works flawlessly!



PATCH:
There is a strange problem with the driver in 2.6.0-test5,
that requires you to apply the patch below. This patch might
not be necessary in future versions.
(Apply it inside drivers/scsi directory)


--- NCR5380.c.orig	2003-09-16 18:24:00.000000000 +0000
+++ NCR5380.c	2003-09-16 18:53:59.000000000 +0000
@@ -371,18 +371,18 @@
 	while( n-- > 0)
 	{
 		r = NCR5380_read(reg);
 		if((r & bit) == val)
-			return r;
+			return 0;
 		cpu_relax();
 	}
 	
 	/* t time yet ? */
 	while(time_before(jiffies, end))
 	{
 		r = NCR5380_read(reg);
 		if((r & bit) == val)
-			return r; 
+			return 0; 
 		if(!in_interrupt())
 			yield();
 		else
 			cpu_relax();






------------------------------------------
Use o melhor sistema de busca da Internet
Radar UOL - http://www.radaruol.com.br