Subject: NCR SCSI Driver Woes
To: None <current-users@netbsd.org, port-i386@netbsd.org>
From: Oliver Fross <ofross@scms.sc.intel.com>
List: current-users
Date: 10/06/1998 18:28:30
Hello All-

	I have encountered a problem with the NCR 53c875 driver.  I appear
not to be the first person to have this problem, but the mailing-list
archive does not indicate that anyone has found a solution.  I'm running
1.3.2 with Perry's GENERIC kernel to ease in testing, but have had the same
problems in self-built kernels.  I'm using multiple drives that are pretty
much identical. (2G Seagate Hawk Differentials)

**==--Problem 1--==**
	The problem is that when I attach more than four drives to the
single chain, I get the following error in dmesg for subsequent drives:

Oct  4 11:16:02 vertel /netbsd: sd4 at scsibus0 targ 4 lun 0: <SEAGATE,
                                         ST32430W, HP04> SCSI2 0/direct fixed
Oct  4 11:16:02 vertel /netbsd: sd4: sd4(ncr0:4:0): WIDE SCSI (16 bit) enabled
Oct  4 11:16:02 vertel /netbsd: sd4(ncr0:4:0): 20.0 MB/s (100 ns, offset 15)
Oct  4 11:16:02 vertel /netbsd: drive offline
                                ^^^^^^^^^^^^^

	This makes any additional drives unusable, which really is a 
bummer.  Any time I try to talk to them, I get the following error:

disklabel: /dev/rsd4d: Input/output error


**==--Problem 2--==**
	I've had Problem 1 for about a month, and just today I got a new
and different error on one of the "ok" drives (4th on the chain). Here's
the dmesg output:

sd3(ncr0:3:0): COMMAND FAILED (9 80) @0xf09df800.
sd3(ncr0:3:0): extraneous data discarded.

	And here's the user-land error:

cd: Input/output error: /data/vol1


**==--Debugging Steps--==**
	NOTE: This is (to the best of my knowledge) *not* a termination
problem.  I get the same results with the last drive terminated, and with
an active terminator attached to the end of the chain.  A termination error
would look like this:

sd1(ncr0:2:0):  Check Condition on opcode 0x8
    SENSE KEY:  Aborted Command
     ASC/ASCQ:  Overlapped Commands Attempted

and I'm not getting that error now. Also, I've tried multiple drives in 
multiple configurations, and I always get the same results.  To further the 
debugging, I tried 6 drives on a friend's machine, who also has this NCR 
card, and got the *exact* same behavior. 

**==--Additional Curiosities--==**
	The NCR card spits out information indicating that it is
"single-ended," which I find unusual for a differential card.  Looking at
the source, we found that there is no time at which NetBSD will say
"Differential" for this card.  hmm.

	I'm open to suggestions, hacks, etc; I'm a willing guinea pig if
people have diffs to recommend.

TIA.
--oliver.

(here's the whole dmesg output for completeness)

Oct  4 11:16:01 vertel /netbsd: Copyright (c) 1996, 1997, 1998
Oct  4 11:16:01 vertel /netbsd:     The NetBSD Foundation, Inc.  All rights reserved.
Oct  4 11:16:01 vertel /netbsd: Copyright (c) 1982, 1986, 1989, 1991, 1993
Oct  4 11:16:01 vertel /netbsd:     The Regents of the University of California.  All rights reserved.
Oct  4 11:16:01 vertel /netbsd: 
Oct  4 11:16:01 vertel /netbsd: NetBSD 1.3.2 (GENERIC) #0: Sun May 24 19:45:48 EDT 1998
Oct  4 11:16:01 vertel /netbsd:     perry@frankenstein.piermont.com:/usr/src/sys/arch/i386/compile/GENERIC
Oct  4 11:16:01 vertel /netbsd: cpu0: family 5 model 2 step c
Oct  4 11:16:01 vertel /netbsd: cpu0: Intel Pentium (P54C) (586-class)
Oct  4 11:16:01 vertel /netbsd: real mem  = 133820416
Oct  4 11:16:01 vertel /netbsd: avail mem = 128917504
Oct  4 11:16:01 vertel /netbsd: using 1659 buffers containing 6795264 bytes of memory
Oct  4 11:16:01 vertel /netbsd: mainbus0 (root)
Oct  4 11:16:01 vertel /netbsd: pci0 at mainbus0 bus 0: configuration mode 1
Oct  4 11:16:01 vertel /netbsd: pchb0 at pci0 dev 0 function 0
Oct  4 11:16:01 vertel /netbsd: pchb0: Intel 82439HX System Controller (TXC) (rev. 0x03)
Oct  4 11:16:01 vertel /netbsd: pcib0 at pci0 dev 7 function 0
Oct  4 11:16:01 vertel /netbsd: pcib0: Intel 82371SB PCI-to-ISA Bridge (PIIX3) (rev. 0x01)
Oct  4 11:16:01 vertel /netbsd: Intel 82371SB IDE Interface (PIIX3) (IDE mass storage, interface 0x80) at pci0 dev 7 function 1 not configured
Oct  4 11:16:01 vertel /netbsd: Number 9 Computer Company Imagine-128 II (VGA display, revision 0x02) at pci0 dev 13 function 0 not configured
Oct  4 11:16:01 vertel /netbsd: ncr0 at pci0 dev 15 function 0: ncr 53c875 fast20 wide scsi
Oct  4 11:16:01 vertel /netbsd: ncr0: interrupting at irq 5
Oct  4 11:16:01 vertel /netbsd: ncr0: minsync=12, maxsync=137, maxoffs=16, 128 dwords burst, large dma fifo
Oct  4 11:16:02 vertel /netbsd: ncr0: single-ended, open drain IRQ driver, using on-chip SRAM
Oct  4 11:16:02 vertel /netbsd: ncr0: restart (scsi reset).
Oct  4 11:16:02 vertel /netbsd: scsibus0 at ncr0: 16 targets
Oct  4 11:16:02 vertel /netbsd: sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST34371W, HP03> SCSI2 0/direct fixed
Oct  4 11:16:02 vertel /netbsd: sd0: sd0(ncr0:0:0): WIDE SCSI (16 bit) enabled
Oct  4 11:16:02 vertel /netbsd: sd0(ncr0:0:0): 40.0 MB/s (50 ns, offset 15)
Oct  4 11:16:02 vertel /netbsd: 4095MB, 5172 cyl, 10 head, 162 sec, 512 bytes/sect x 8388314 sectors
Oct  4 11:16:02 vertel /netbsd: sd1 at scsibus0 targ 1 lun 0: <SEAGATE, ST32430W, HP04> SCSI2 0/direct fixed
Oct  4 11:16:02 vertel /netbsd: sd1: sd1(ncr0:1:0): WIDE SCSI (16 bit) enabled
Oct  4 11:16:02 vertel /netbsd: sd1(ncr0:1:0): 20.0 MB/s (100 ns, offset 15)
Oct  4 11:16:02 vertel /netbsd: 2048MB, 3992 cyl, 9 head, 116 sec, 512 bytes/sect x 4194685 sectors
Oct  4 11:16:02 vertel /netbsd: sd2 at scsibus0 targ 2 lun 0: <SEAGATE, ST32430W, HP05> SCSI2 0/direct fixed
Oct  4 11:16:02 vertel /netbsd: sd2: sd2(ncr0:2:0): WIDE SCSI (16 bit) enabled
Oct  4 11:16:02 vertel /netbsd: sd2(ncr0:2:0): 20.0 MB/s (100 ns, offset 15)
Oct  4 11:16:02 vertel /netbsd: 2048MB, 3992 cyl, 9 head, 116 sec, 512 bytes/sect x 4194685 sectors
Oct  4 11:16:02 vertel /netbsd: sd3 at scsibus0 targ 3 lun 0: <SEAGATE, ST32430W, HP05> SCSI2 0/direct fixed
Oct  4 11:16:02 vertel /netbsd: sd3: sd3(ncr0:3:0): WIDE SCSI (16 bit) enabled
Oct  4 11:16:02 vertel /netbsd: sd3(ncr0:3:0): 20.0 MB/s (100 ns, offset 15)
Oct  4 11:16:02 vertel /netbsd: 2048MB, 3992 cyl, 9 head, 116 sec, 512 bytes/sect x 4194685 sectors
Oct  4 11:16:02 vertel /netbsd: sd4 at scsibus0 targ 4 lun 0: <SEAGATE, ST32430W, HP04> SCSI2 0/direct fixed
Oct  4 11:16:02 vertel /netbsd: sd4: sd4(ncr0:4:0): WIDE SCSI (16 bit) enabled
Oct  4 11:16:02 vertel /netbsd: sd4(ncr0:4:0): 20.0 MB/s (100 ns, offset 15)
Oct  4 11:16:02 vertel /netbsd: drive offline
Oct  4 11:16:02 vertel /netbsd: sd5 at scsibus0 targ 5 lun 0: <SEAGATE, ST32430W, HP04> SCSI2 0/direct fixed
Oct  4 11:16:02 vertel /netbsd: sd5: sd5(ncr0:5:0): WIDE SCSI (16 bit) enabled
Oct  4 11:16:02 vertel /netbsd: sd5(ncr0:5:0): 20.0 MB/s (100 ns, offset 15)
Oct  4 11:16:02 vertel /netbsd: drive offline
Oct  4 11:16:02 vertel /netbsd: isa0 at pcib0
Oct  4 11:16:03 vertel /netbsd: ne1 at isa0 port 0x300-0x31f irq 10
Oct  4 11:16:03 vertel /netbsd: ne1: NE2000 Ethernet
Oct  4 11:16:03 vertel /netbsd: ne1: Ethernet address 00:c0:a8:34:cd:40
Oct  4 11:16:03 vertel /netbsd: com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
Oct  4 11:16:03 vertel /netbsd: com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
Oct  4 11:16:03 vertel /netbsd: lpt0 at isa0 port 0x378-0x37b irq 7
Oct  4 11:16:03 vertel /netbsd: sb0 at isa0 port 0x220-0x237 irq 7 drq 1 drq2 5: dsp v4.13
Oct  4 11:16:03 vertel /netbsd: audio0 at sb0
Oct  4 11:16:03 vertel /netbsd: npx0 at isa0 port 0xf0-0xff: using exception 16
Oct  4 11:16:03 vertel /netbsd: pc0 at isa0 port 0x60-0x6f irq 1: color
Oct  4 11:16:03 vertel /netbsd: pc0: console
Oct  4 11:16:03 vertel /netbsd: fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
Oct  4 11:16:03 vertel /netbsd: fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
Oct  4 11:16:03 vertel /netbsd: biomask 60 netmask 460 ttymask 4e2
Oct  4 11:16:03 vertel /netbsd: sd0: no disk label
Oct  4 11:16:03 vertel /netbsd: findroot: can't open dev sd4a (5)
Oct  4 11:16:03 vertel /netbsd: findroot: can't open dev sd5a (5)
Oct  4 11:16:03 vertel /netbsd: boot device: sd1
Oct  4 11:16:03 vertel /netbsd: root on sd1a dumps on sd1b
Oct  4 11:16:03 vertel /netbsd: root file system type: ffs