Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Nov 1999 21:26:59 +0100
From:      Stefan Esser <se@zpr.uni-koeln.de>
To:        Jos Backus <Jos.Backus@nl.origin-it.com>
Cc:        freebsd-scsi@FreeBSD.ORG, Stefan Esser <se@freebsd.org>
Subject:   Re: Tape eject problem
Message-ID:  <19991121212659.A5103@dialup124.zpr.uni-koeln.de>
In-Reply-To: <19991121185852.A75911@hal.mpn.cp.philips.com>; from Jos Backus on Sun, Nov 21, 1999 at 06:58:52PM %2B0100
References:  <19991121185852.A75911@hal.mpn.cp.philips.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1999-11-21 18:58 +0100, Jos Backus <Jos.Backus@nl.origin-it.com> wrote:
> [This is with a -current kernel & world as of today.]
> 
> # mt rewoffl
> 
> used to rewind and eject a tape cartrigde, if present. It rewinds but no
> longer ejects, instead the unit just goes off-line.
> Also, I'm seeing
> 
> Nov 21 17:49:50 jos /kernel: (sa0:ahc0:0:3:0): READ(06). CDB: 8 0 2 0 0 0
> Nov 21 17:49:50 jos /kernel: (sa0:ahc0:0:3:0): UNIT ATTENTION asc:28,0
> Nov 21 17:49:50 jos /kernel: (sa0:ahc0:0:3:0): Not ready to ready change,
> medium may have changed
> 
> The tape drive is detected as
> 
> sa0 at ahc0 bus 0 target 3 lun 0
> sa0: <HP C1533A A708> Removable Sequential Access SCSI-2 device
> sa0: 10.000MB/s transfers (10.000MHz, offset 32)
> 
> ``camcontrol eject 0:3:0'' does eject the media.
> 
> Is the new mt behavior intentional? Is ``camcontrol eject'' the preferred way
> to eject media?

The problem appears to be caused by recent changes to scsi_sa.c.
You may want to try the following patch:

Index: /sys/cam/scsi/scsi_sa.c
===================================================================
RCS file: /usr/cvs/src/sys/cam/scsi/scsi_sa.c,v
retrieving revision 1.38
diff -u -2 -r1.38 scsi_sa.c
--- scsi_sa.c	1999/11/17 17:11:21	1.38
+++ scsi_sa.c	1999/11/21 20:25:15
@@ -1037,7 +1037,7 @@
 			 */
 
+			saprevent(periph, PR_ALLOW);
 			softc->flags &= ~(SA_FLAG_TAPE_LOCKED|
 			    SA_FLAG_TAPE_FROZEN|SA_FLAG_TAPE_MOUNTED);
-			saprevent(periph, PR_ALLOW);
 			if (error == 0)
 				error = saloadunload(periph, FALSE);

Regards, STefan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991121212659.A5103>