[sane-devel] HP ScanJet 4p (SCSI ncr53c400a) Solution

Anastasija WhiteUnicorn at mail.ru
Sun May 12 18:54:47 BST 2002


Hello !

> > I've got the HP ScanJet 4p with SCSI card on SymbiosLogic ncr53c400a chip
> > And I have a big trouble with it :(

The solution has been found and I think, what it should be posted to this 
mail-list for all people, who search through archives for the answers.

I`ve found the posting of Stephen R. van den Berg to the linux-scsi mail-list:
http://www.geocrawler.com/mail/msg.php3?msg_id=3545482&list=58

~~~ Start ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FROM: Stephen R. van den Berg
DATE: 04/03/2000 12:08:32
SUBJECT: RE:  Re; ncr53c400a

 [skip]
 Actually, I disassembled the mini400i.sys driver, and found the
 magic incantation which enables the HP-card and maps it into the
 IO-space.
 The mapping seems to work just fine.  The only part I`m still struggling
 with is the fact that the NCR5380.c driver appears to be *hopelessly* 
non-SMP 
 safe (and I happen to be running an SMP box).
 In case anyone cares (I`ll be including this in an official patch
 later, which also fixes the SMP-compliance, I hope), this is what the
 HP card needs to get mapped at port 0x280:
            /* wakeup sequence for the HP-NCR53C400A */
            outb(0x0f, 0x779);
            outb(0x22, 0x379);
            outb(0xf0, 0x379);
            outb(0x20, 0x379);
            outb(0x80, 0x379);
            outb(0x80, 0x379);
[skip]
~~~ End ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And what's you should do for the card to work:

1. Replace wakeup sequence in /usr/src/linux/drivers/scsi/g_NCR5380.c as 
above.

2. Compile the driver:
gcc  -I/lib/modules/$(uname -r)/build/include -Wall -D__KERNEL__ -DMODULE 
-O2 -c -o g_NCR5380.o g_NCR5380.c

3. Check it:
   # insmod g_NCR5380.o ncr_53c400a=1 ncr_addr=0x280

   The card should work now, as written in all READMEs, HOWTOs and so on.

> I don't have HP scanners, but some Mustek scanners also use NCR53c400a
> chips. I always use this line:
>
> modprobe g_NCR5380 ncr_addr=0x280 ncr_53c400a=1

Yes, it worked after I had applied the patch.

> > There is one jumper on the card (unlabeled). I tried to change it, but
> > there wasn't any effect.
>
> Maybe enable/disable IRQ?

Who knows ? :-/

Thanx for your help !

-- 

Best regards, Anastasija (aka WhiteUnicorn)
Welcome to http://Anastasija.virtualave.net



More information about the sane-devel mailing list