Subject: Re: kern/2841: NCR 53c810 driver is slow. Here's a faster one
To: Jim Howard <jiho@mail.c-zone.net>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 10/18/1996 18:36:28
On Fri, 18 Oct 1996, Jim Howard wrote:
> At 07:23 PM 10/16/96 -0500, Dave Huang <khym@bga.com> wrote:
> 
> > I don't have wide either, but I did see a lot of places where (something &
> > 7) was changed to (something & 0xf).
> 
> Those places increase the number of targets (devices) supported from 7 to
> 15.  That would be useful for some people, it has *no* bearing on your
> performance case.

Yeah, I know... that was in reference to my comment that the new driver
supports wide scsi, not the performance issue. Perhaps the old driver
supported wide transfers, but not devices with SCSI ID 8-15...

Hmm... actually, I think I might have found what made my Atlas slow. I
actually have a wide Atlas, with a wide to narrow adapter on it. The old
driver negotiates sync transfers, then wide. That's not good... wide
negotiation cancels sync negotiation, so you're supposed to negotiate wide
first, then sync. It could be that with the old driver, the drive was
doing async transfers. The new driver correctly negotiates wide first,
then sync. 

Compiling with NEGO_DEBUG turned on, the old driver does:
sd1: sd1(ncr0:1:0): sync msgout: 1-3-1-19-8.
sd1(ncr0:1:0): sync msgin: 1-3-1-19-8.
sd1(ncr0:1:0): sync: per=25 ofs=8 fak=0 chg=0.
sd1(ncr0:1:0): FAST SCSI-2 100ns (10 Mb/sec) offset 8.
sd1(ncr0:1:0): wide msgout: 1-2-3-0.
sd1(ncr0:1:0): wide msgin: 1-2-3-0.
sd1(ncr0:1:0): wide: wide=0 chg=0.
2151MB, 3907 cyl, 10 head, 112 sec, 512 bytes/sec

New driver does:
sd1: sd1(ncr0:1:0): wide msgout: 1-2-3-0.
sd1(ncr0:1:0): wide msgin: 1-2-3-0.
sd1(ncr0:1:0): wide: wide=0 chg=0.
sd1(ncr0:1:0): sync msgout: 1-3-1-19-8.
sd1(ncr0:1:0): sync msgin: 1-3-1-19-8.
sd1(ncr0:1:0): sync: per=25 ofs=8 fak=0 chg=0.
sd1(ncr0:1:0): FAST SCSI-2 100ns (10 Mb/sec) offset 8.
2151MB, 3907 cyl, 10 head, 112 sec, 512 bytes/sec

> Your patch seems to fill out the device support.  But I'm *still* at a loss
> as to why you would need it to get your Fast SCSI-2 Quantum Atlas running at
> normal speed with a 53C810.

I'm not sure either, but in a previous message you mentioned there not
being much of a difference between the Capella and the Atlas except for
the rotation speed... Unfortunately, Quantum seems to have removed the
detailed product brochures from their web site, but I seem to remember
that the Atlas uses a different SCSI controller chip; a faster one with
less latency and faster disconnect/reconnects or something. 

I bet the wide/sync negotation bug is the problem though, that seems like
the most likely explanation.
-- 
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 20 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++