From bacon@smithers.neuro.mcw.edu  Mon Dec 12 15:32:17 2005
Return-Path: <bacon@smithers.neuro.mcw.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C2CF716A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Dec 2005 15:32:17 +0000 (GMT)
	(envelope-from bacon@smithers.neuro.mcw.edu)
Received: from smithers.neuro.mcw.edu (smithers.neuro.mcw.edu [141.106.204.28])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8CBFB43D60
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Dec 2005 15:32:14 +0000 (GMT)
	(envelope-from bacon@smithers.neuro.mcw.edu)
Received: from smithers.neuro.mcw.edu (localhost [127.0.0.1])
	by smithers.neuro.mcw.edu (8.13.3/8.13.3) with ESMTP id jBCFWfbs040407
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Dec 2005 09:32:41 -0600 (CST)
	(envelope-from bacon@smithers.neuro.mcw.edu)
Received: (from bacon@localhost)
	by smithers.neuro.mcw.edu (8.13.3/8.13.3/Submit) id jBCFWfYG040406;
	Mon, 12 Dec 2005 09:32:41 -0600 (CST)
	(envelope-from bacon)
Message-Id: <200512121532.jBCFWfYG040406@smithers.neuro.mcw.edu>
Date: Mon, 12 Dec 2005 09:32:41 -0600 (CST)
From: Jason Bacon <bacon@smithers.neuro.mcw.edu>
Reply-To: Jason Bacon <bacon@smithers.neuro.mcw.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: SCSI bus resets cause loss of ch device
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         90282
>Category:       kern
>Synopsis:       [sym] SCSI bus resets cause loss of ch device
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-scsi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 12 15:40:02 GMT 2005
>Closed-Date:    Thu Apr 11 01:01:04 UTC 2013
>Last-Modified:  Thu Apr 11 01:01:04 UTC 2013
>Originator:     Jason Bacon
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
Medical College of Wisconsin
>Environment:
FreeBSD gizmo.neuro.mcw.edu 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Wed Nov 30 12:13:46 CST 2005     root@gizmo.neuro.mcw.edu:/usr/obj/usr/src/sys/gizmo  i386
>Description:
	When attempting to use the AIT3 tape drive in our Spectralogic
	215 library, SCSI bus resets occur, which are followed by the
	loss of /dev/ch0.  The library works fine as long as the tape drive
	isn't accessed - we can load and return tapes without problems.

	The host adapter is a Tekram DC-390U3W.  The transfer rate defaults
	to 160mb/s:

sym0: <1010-33> port 0xe000-0xe0ff mem 0xf8802000-0xf8803fff,0xf8808000-0xf88083
ff irq 11 at device 9.0 on pci0
sym0: Symbios NVRAM, ID 7, Fast-80, LVD, parity checking
sym0: open drain IRQ line driver, using on-chip SRAM
sym0: using LOAD/STORE-based firmware.
sym0: handling phase mismatch from SCRIPTS.
sym0: SCAN FOR LUNS disabled for targets 2.
sym1: <1010-33> port 0xe400-0xe4ff mem 0xf8800000-0xf8801fff,0xf8804000-0xf88043
ff irq 11 at device 9.1 on pci0
sym1: Symbios NVRAM, ID 7, Fast-80, SE, parity checking
sym1: open drain IRQ line driver, using on-chip SRAM
sym1: using LOAD/STORE-based firmware.
sym1: handling phase mismatch from SCRIPTS.
.
.
.
sa0 at sym0 bus 0 target 2 lun 0
sa0: <SONY SDX-500C 01b1> Removable Sequential Access SCSI-2 device 
sa0: 160.000MB/s transfers (80.000MHz, offset 62, 16bit)
Mounting root from ufs:/dev/ad0s1a
ch0 at sym0 bus 0 target 3 lun 0
ch0: <SPECTRA 215 1016> Removable Changer SCSI-2 device 
ch0: 3.300MB/s transfers
ch0: 15 slots, 1 drive, 1 picker, 0 portals
	
>How-To-Repeat:
	Load a tape, write for a while, then attempt to unload using
	chio.  After some period of write operation, a SCSI bus reset will
	occur, and /dev/ch0 will be removed, making it impossible to return
	the tape, and hence impossible to do multivolume backups.
>Fix:
	Restarting the tape library and the operating system both appear to
	be necessary to restore /dev/ch0.

	WORKAROUND TO PREVENT THE PROBLEM:

	Enter the Tekram SCSI BIOS, and reduce the transfer
	rate on the library and tape drive to 40 mb/s.  Since doing this,
	I've been through several backups without incident.  Other rates
	may work as well, but I haven't tested them all.  40 is fast enough
	to keep the drive streaming and slow enough to solve the bus reset
	issue.

	After adjusting the BIOS:

sa0 at sym0 bus 0 target 2 lun 0
sa0: <SONY SDX-500C 01b1> Removable Sequential Access SCSI-2 device 
sa0: 40.000MB/s transfers (20.000MHz, offset 31, 16bit)
Mounting root from ufs:/dev/ad0s1a
ch0 at sym0 bus 0 target 3 lun 0
ch0: <SPECTRA 215 1016> Removable Changer SCSI-2 device 
ch0: 3.300MB/s transfers
ch0: 15 slots, 1 drive, 1 picker, 0 portals
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Dec 14 19:07:06 UTC 2005 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90282 
State-Changed-From-To: open->closed 
State-Changed-By: sbruno 
State-Changed-When: Thu Apr 11 01:00:07 UTC 2013 
State-Changed-Why:  
While I doubt that this card is still in service, there's some amount 
of attention being given to sym(4) lately.   

If this is still an issue with a 10-current snapshot, let's open a 
new pr and get this fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90282 
>Unformatted:
