Subject: Re: SCSI timeout errors????
To: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
From: NetBSD Bob <nbsdbob@weedcon1.cropsci.ncsu.edu>
List: port-pmax
Date: 10/21/1999 09:32:50
> I delightfully announce tape drive now can work with DECstation MI SCSI.
> 
> Michael Hitch discovered the reason why every tape drive access result
> in SCSI timeout errors.  It's an integer math overflow of 32bit system
> which cause negative timeout value.   NetBSD/pmax has 256HZ hardclock
> which is a higher precision than any other 32bit systems have.   Look at
> a single statement in dev/ic/ncr53c9x.c;
> 
>      timeout(ncr53c9x_timeout, ecb, (ecb->timeout * hz) / 1000); 
> 
> If ecb->timeout (signed int) value was large enough, intermidate
> arithmetic would produce negatives.
> 
> The instant solution is reduce tape operation timeout value. In a file
> 'dev/scsipi/st.c';
> 
>     #define ST_SPC_TIME     (4 * 60 * 60 * 1000)    /* 4 hours */
> 
> Timeout after 4 hours looks aweful someshow, let's say '1 hour' for now.
> 
> With this st.c hack, my kernel is running very well with EXB8505 drive.
> I will check PMAZ-A and tape drives as many as possible.
> 
> Tohru Nishimura
> Nara Institute of Science and Technology

Excellent!

Out of curiosity, I was getting scsi timeouts on the sun3 port last time
I tried it, a few months back.  Is/could/would something like this be
causing that in the sun3 port?  It made tapes hell to use on older sun3
VME machines.

I am bouncing this to the sun3 porting list, just in case.

Can anyone on the sun3 list comment on this?

Thanks

Bob