Hello!
I've got a scanner HP ScanJet 3p with a SCSI interface card. The interface
card has a chip marked as NCR53C400A and other smaller chips. It also has
a jumper without any information. The documantation that comes with the
scanner mentiones 4 jumpers, so presumably it's a slightly modified
version of the interface card.
Linux-2.2.13 cannot find the card. But if I boot it with loadlin from DOS
with the DOS driver loaded, it does find the card! I can even scan images
with SANE!
The parameters are:
modprobe g_NCR5380 ncr_53c400a=1 ncr_addr=0x280
My investigation shows that the DOS driver sends different values to the
ports 0x379 and 0x779
The attached patch makes Linux see my scanner. However, it is _not_ meant
to be applied.
If I understand correctly, the port 0x379 (write only) has to do with
IsaPNP. Although the scanner card is not a PnP card, it may have an ID
for configuring it through the port 0x379. That ID is different in my
case.
Possible solutions:
1) Specify the ID as a parameter. Not nice, but flexible.
2) Add a parameter ncr_brand. If it is "HP", use the values from my patch,
otherwise use the existing values.
I know that the last 2.3.x kernel has the same driver for NCR53C400A
Pavel Roskin
--- drivers/scsi/g_NCR5380.c.v0 Tue Oct 19 20:14:01 1999
+++ drivers/scsi/g_NCR5380.c Thu Nov 11 07:58:58 1999
@@ -317,11 +317,11 @@
/* wakeup sequence for the NCR53C400A and DTC3181E*/
/* Disable the adapter and look for a free io port */
- outb(0x59, 0x779);
- outb(0xb9, 0x379);
- outb(0xc5, 0x379);
- outb(0xae, 0x379);
- outb(0xa6, 0x379);
+ outb(0x0f, 0x779);
+ outb(0x22, 0x379);
+ outb(0xf0, 0x379);
+ outb(0x20, 0x379);
+ outb(0x80, 0x379);
outb(0x00, 0x379);
if (overrides[current_override].NCR5380_map_name != PORT_AUTO)
@@ -335,11 +335,11 @@
break;
}
if (ports[i]) {
- outb(0x59, 0x779);
- outb(0xb9, 0x379);
- outb(0xc5, 0x379);
- outb(0xae, 0x379);
- outb(0xa6, 0x379);
+ outb(0x0f, 0x779);
+ outb(0x22, 0x379);
+ outb(0xf0, 0x379);
+ outb(0x20, 0x379);
+ outb(0x80, 0x379);
outb(0x80 | i, 0x379); /* set io port to be used */
outb(0xc0, ports[i] + 9);
if (inb(ports[i] + 9) != 0x80)