From andrew@why.whine.com  Sun Aug  4 14:21:29 1996
Received: from cicerone.uunet.ca (root@cicerone.uunet.ca [142.77.1.11])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA24569
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 4 Aug 1996 14:21:28 -0700 (PDT)
Received: from why.whine.com ([205.150.249.1]) by mail.uunet.ca with ESMTP id <115607-11204>; Sun, 4 Aug 1996 17:21:20 -0400
Received: (from andrew@localhost) by why.whine.com (8.7.5/8.6.12) id RAA00439; Sun, 4 Aug 1996 17:21:14 -0400 (EDT)
Message-Id: <199608042121.RAA00439@why.whine.com>
Date: Sun, 4 Aug 1996 17:21:14 -0400
From: Andrew Herdman <andrew@why.whine.com>
Reply-To: andrew@why.whine.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Problem with scsi_prevent and DAT drive + solution
X-Send-Pr-Version: 3.2

>Number:         1467
>Category:       kern
>Synopsis:       scsi_prevent causing tape problems on close
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    mjacob
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug  4 14:30:01 PDT 1996
>Closed-Date:    Mon Jun 14 17:03:08 PDT 1999
>Last-Modified:  Mon Jun 14 17:03:55 PDT 1999
>Originator:     Andrew Herdman
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
Whine Technologies
>Environment:

	FreeBSD-Current as of August 3rd, 1996.  ASUS Pentium 133MHz,
	with 32Meg of memory, Buslogics 946c scsi controller, and 
	ARCHIVE Python 25501-009 2.18 DAT Drive.

>Description:

	Doing filesystem dumps or using tar on the non-rewind device
	on the tape drive caused the error message 'bt0 try to abort' 
	appear.  This also cause the tape drive to give up and rewind.

>How-To-Repeat:

	#!/bin/sh
	tar cvf /dev/nrst0 /bin
	tar cvf /dev/nrst0 /sbin

>Fix:
	
	The timeout on scsi_prevent is terribly low.  The following 
	context diff fixes the problem.

	# diff -c scsi_base.c.orig scsi_base.c
	*** scsi_base.c.orig    Sun Aug  4 17:02:52 1996
	--- scsi_base.c Sun Aug  4 16:35:07 1996
	***************
	*** 306,312 ****
	                0,
	                0,
	                2,
	!               5000,
	                NULL,
	                flags));
	  }
	--- 306,312 ----
	                0,
	                0,
	                2,
	!               100000,
	                NULL,
	                flags));
	  }
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: scrappy 
State-Changed-When: Tue Oct 22 21:56:35 PDT 1996 
State-Changed-Why:  

Confirm Status:  scsi_prevent causing tape problems on close 

State-Changed-From-To: feedback->open 
State-Changed-By: scrappy 
State-Changed-When: Wed Oct 23 12:51:12 PDT 1996 
State-Changed-Why:  

Problem Still Exists 

Originator supplied a patch... 

Responsible-Changed-From-To: freebsd-bugs->gibbs 
Responsible-Changed-By: scrappy 
Responsible-Changed-When: Wed Oct 23 13:21:02 PDT 1996 
Responsible-Changed-Why:  
he asked for it 
State-Changed-From-To: open->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Thu Jun 10 07:27:27 PDT 1999 
State-Changed-Why:  
Justin, I assume this PR was obsoleted by CAM? I seem to remember the low 
SCSI timeout issue been discussed to death and "solved"? 
Responsible-Changed-From-To: gibbs->mjacob 
Responsible-Changed-By: gibbs 
Responsible-Changed-When: Thu Jun 10 10:04:19 PDT 1999 
Responsible-Changed-Why:  
Matt is the tape guy.  He should confirm closure on this one. 
State-Changed-From-To: feedback->closed 
State-Changed-By: mjacob 
State-Changed-When: Mon Jun 14 17:03:08 PDT 1999 
State-Changed-Why:  
Made the suggested fix in the 2.x stream. 3.X already has the same fix (mostly) 
>Unformatted:
