Subject: Re: Migrating MI-SCSI-Code to pmax/PI-SCSI?
To: None <port-pmax@netbsd.org>
From: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
List: port-pmax
Date: 10/21/1999 10:38:28
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