Subject: Re: more PC164+NCR boot problems
To: Ross Harvey <ross@ghs.com>
From: Joerg Czeranski <jc@joerch.org>
List: port-alpha
Date: 07/29/1999 22:29:35
Ross Harvey wrote:
> > From: Joerg Czeranski <jc@joerch.org>
> 
> >	[ lots of ncr.c failures ]
> 
> 
> Usually, those ncr errors go away, for me, when I do a >>> init or a power
> cycle.

Actually they always appear for me when I power cycle, they don't always
(or maybe never) appear when I boot 1.3.3 first, then halt, then boot
1.4.

> [about ncr driver problems]
> 
> Now, to get going: the driver hasn't really changed from 1.3.3, so I think
> what you are seeing is problems reinitializing the chip for different
> addresses and problems going back to SRM and then back again to NetBSD.

The changes in the driver are indeed small and maybe it's not even the
driver's fault but scsipi's.

I was able to fix it in dev/pci/ncr.c though:
In 1.4 there's support for relaying SCSI sense data to scsipi in the
ncr driver.  Sense data with key "no sense" gets no special treatment
in ncr.c, but in scsipi_base.c it results in EIO.

This patch to dev/pci/ncr.c solved it for me:

========== snip here ==========
--- ncr.c.ORIG	Sun Dec 13 01:11:37 1998
+++ ncr.c	Thu Jul 29 20:52:29 1999
@@ -5114,6 +5114,15 @@
 	};
 
 	/*
+	**	Treat "no sense" as plain "good"
+	*/
+	if ((cp->host_status == HS_COMPLETE)
+		&& (cp->scsi_status == (S_SENSE|S_GOOD))
+		&& ((cp->sense_data.flags & SSD_KEY) == SKEY_NO_SENSE)) {
+		cp->scsi_status &= ~S_SENSE;
+	}
+
+	/*
 	**	Check the status.
 	*/
 #ifdef __NetBSD__
========== snip here ==========

So my 1.4 is finally up and running and I can get back to the strange
benchmark effects. :)
joerch