Subject: kern/5514: SCSI timeout with media changer
To: None <gnats-bugs@gnats.netbsd.org>
From: Chris Jones <cjones@clydesdale.math.montana.edu>
List: netbsd-bugs
Date: 05/30/1998 18:39:04
>Number:         5514
>Category:       kern
>Synopsis:       SCSI timeout with media changer
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 30 17:50:01 1998
>Last-Modified:
>Originator:     Chris Jones
>Organization:
-------------------------------------------------------------------------------
Chris Jones                                           cjones@math.montana.edu
           Mad scientist at large                     cjones@honors.montana.edu
"Is this going to be a stand-up programming session, sir, or another bug hunt?"
>Release:        <NetBSD-current source date>
>Environment:
	
System: NetBSD clydesdale.math.montana.edu 1.3.2 NetBSD 1.3.2 (CLYDESDALE) #0: Sat May 30 18:16:58 MDT 1998 cjones@rupert.honors.montana.edu:/usr/src/sys/arch/i386/compile/CLYDESDALE i386


>Description:
I've got an exabyte 10h attached:

May 30 18:19:18 clydesdale /netbsd: st0 at scsibus0 targ 2 lun 0: <EXABYTE, EXB-85058HE-0000, 0096> SCSI2 1/sequential removable
May 30 18:19:18 clydesdale /netbsd: st0: drive empty
May 30 18:19:18 clydesdale /netbsd: ch0 at scsibus0 targ 3 lun 0: <EXABYTE, EXB-10e, 1.9> SCSI2 8/changer removable
May 30 18:19:19 clydesdale /netbsd: ch0: 10 slots, 1 drive, 1 picker, 0 portals

When ch0 does a "chio ielem", it takes approx 8 seconds per slot, plus
an additional 27 for the tape drive (if the drive is empty), for a
total of 110 seconds.  Unfortunately, the aic6360 driver times out
SCSI commands after 100 seconds.

May 30 18:25:06 clydesdale /netbsd: st0(aic0:2:0): timed out
May 30 18:26:21 clydesdale /netbsd: aic0: reselect from target 2 lun 0 with no nexus; sending ABORT

>How-To-Repeat:

# mt offline
# chio ielem

>Fix:

Unknown.  It seems that there are two possibilities:

1. Increase the timeout in the aic driver.  Perhaps there's a maximum
time limit in the SCSI spec, and we could just use that?

2. Do something so that timeouts aren't an issue for the tape
changer.  I know this is really vague, but I don't understand the SCSI
system at all.  I'm just thinking that, if you had one of these with
10 times as many slots, it would take about 10 times as long, and who
knows how large people are going to make changers in the future?
>Audit-Trail:
>Unformatted: