Subject: Re: more PC164+NCR boot problems
To: None <jc@joerch.org, port-alpha@netbsd.org>
From: Ross Harvey <ross@ghs.com>
List: port-alpha
Date: 07/29/1999 14:12:08
> From jc@joerch.org Thu Jul 29 13:30:10 1999
> From: Joerg Czeranski <jc@joerch.org>
> To: Ross Harvey <ross@ghs.com>, port-alpha@netbsd.org
> Date: Thu, 29 Jul 1999 22:29:35 +0200 (MET DST)
> Subject: Re: more PC164+NCR boot problems
>
> 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
>



Ok, very nice work.

It looks like scsipi_base.c started trying to interpret sense data in
1.13 1998/11/17, and yah, if it doesn't grok something it returns EIO.

But why do you suppose booting 1.3 first helps?  <sigh>

Thanks!
	ross.harvey@computer.org