Subject: Re: NCR Driver Problems
To: Curt Sampson <>
From: Stefan Esser <>
List: current-users
Date: 01/23/1996 01:45:13
On Jan 19, 11:36, Curt Sampson wrote:
} Subject: Re: NCR Driver Problems
} On Fri, 19 Jan 1996, Stefan Esser wrote:

There is one new explanation for your problems,
which was found by somebody doing extensive tests
under FreeBSD. Seems that the generic SCSI code 
may cause problems with certain drives !

Please try, whether the following patch can be 
applied to NetBSD. It removes a call to start 
the SCSI drive, in case it doesn't power up by
default. A few drives seem to strongly dislike
this command, after they once received a command
with a tag!

Please let me know, whether this patch makes any 

Index: /sys/scsi/sd.c
RCS file: /usr/cvs/src/sys/scsi/sd.c,v
retrieving revision 1.83
diff -C2 -r1.83 sd.c
*** sd.c	1996/01/05 20:12:49	1.83
--- sd.c	1996/01/22 23:32:26
*** 311,315 ****
--- 311,317 ----
  	 * not needed for  most hard drives (ignore failure)
+ #ifdef undef
  	scsi_start_unit(sc_link, SCSI_ERR_OK | SCSI_SILENT);
+ #endif

} > Please send log messages. That HP seems to have problems
} > if tagged command queues are enabled, and it is the only
} > drive except the Sequel 5400 (an old 5" DEC design, I've
} > been told), that doesn't work reliably with tags.
} This is all that appeared in the log, unfortunately:
} Jan 17 19:28:51 cynic /netbsd: sd2(ncr0:4:0): command aborted
} Jan 17 19:28:51 cynic /netbsd: sd2: dos partition I/O error
} Jan 17 19:28:51 cynic /netbsd: sd2(ncr0:4:0): command aborted

Well, the error messages of the FreeBSD version are a lot
more detailed ... 

} Is there something I can enable in the driver to get more details
} about the abort? Will turning on DEBUG_TAGS help with this? If I
} don't have the kernel debugger enabled, is there any easy way of
} setting ncr_debug whilst the system is running, or must I patch my
} kernel binary and reboot? (Actually, I just noticed that this is
} a static; I reckon I must recompile my kernel to change this.)

The ncr_debug variable will only be used, if 

options "SCSI_DEBUG_FLAGS=0"

is added to the kernel config file. Else, the variable 
will exist, but all references have been optimized away!

DEBUG_TAGS won't help much, since it only reports about
the first and last use of a particular tag.

} I did notice when I ran ncrstat that of all my drives (two Quantum
} Lightnings, a Sony CD-ROM and the HP) only the HP supported tags
} (up to 4). Oddly enough, though the same drive is running just fine
} on a NetBSD 1.1 machine with a Buslogic controller. Does the bt driver
} not support tagged command queuing? I notice that there's no mention
} at all of the word `tag' in the driver.

I'm not sure. Many drivers and controllers don't support
tags at all. E.g. it was added to Solaris 2.3 for selected
drives, and hat not been in any Sun kernel before (i.e. 
there is no driver in SunOS that knows about tags, AFAIK!)

} > It is a nearly up to date version. I merged in a few NetBSD
} > compatibility patches recently, and will do a further update
} > as soon as my time permits. NetBSD kernel interfaces changed 
} > between 1.0 and 1.1, and I don't have a NetBSD system to do
} > any tests (or test compilations) of my own on.
} It would be nice if the driver going into the NetBSD source tree
} had a comment mentioning which version of Stefan's driver it was
} derived from (or perhaps we just want to use the same version
} number?) Comments from those committing these changes?

The FreeBSD revision string could just be left in. In fact,
my goal is to have the FreeBSD version be identical to the 
NetBSD version.

} Actually, the interface changed very little between 1.0 and 1.1;
} I just have to change a few include files and the names of a few
} variables to back-port a driver.

Yes, I know. But without a NetBSD system to find these changes,
it is near impossible to do :)

} At any rate, I'll be upgrading to 1.1 in the next couple of months
} anyway, and I'd be happy to help test out any changes to your
} driver. 


} I'm not sure if I'm going to keep this drive, however, if it doesn't
} support tags. If anybody wants to send me their recommendation (by
} private e-mail; I'll summarise to those who have interest) on an
} equivalantly fast 1.2GB drive (I get 4MB/sec from the HP on a
} Buslogic controller) that's not horribly expensive and works well,
} I'd appreciate it.

It is well possible, that it fully supports tags. 
It is just picky about non-tagged commands (even
NOP commands) sent when any tagged command is 

} As per usual on this thread, please cc to both me and Stephen as neither
} of us is on the NetBSD-current list.

Regards, STefan
 Stefan Esser, Zentrum fuer Paralleles Rechnen		Tel:	+49 221 4706021
 Universitaet zu Koeln, Weyertal 80, 50931 Koeln	FAX:	+49 221 4705160
 ==============================================================================			  <se@ZPR.Uni-Koeln.DE>