Subject: kern/16211: "eject tape" no longer works
To: None <gnats-bugs@gnats.netbsd.org>
From: Kimmo Suominen <kim@tac.nyc.ny.us>
List: netbsd-bugs
Date: 04/05/2002 22:03:12
>Number:         16211
>Category:       kern
>Synopsis:       "eject tape" no longer works
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 05 19:04:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Kimmo Suominen
>Release:        NetBSD 1.5ZC from 2002-03-21
>Organization:
>Environment:
System: NetBSD beowulf.gw.com 1.5ZC NetBSD 1.5ZC (GW-GENERIC) #45: Sun Mar 24 19:35:00 EST 2002 kim@nix.gw.com:/net/beowulf/src-1/NetBSD/cvsroot/src/sys/arch/i386/compile/GW-GENERIC i386
Architecture: i386
Machine: i386

ahc2 at pci0 dev 16 function 0
ahc2: interrupting at irq 9
ahc2: aic7892 Wide Channel A, SCSI Id=7, 16/255 SCBs
scsibus2 at ahc2: 16 targets, 8 luns per target

scsibus2: waiting 2 seconds for devices to settle...
st0 at scsibus2 target 3 lun 0: <QUANTUM, DLT7000, 3112> SCSI2 1/sequential removable
st0: drive empty
st0: sync (100.0ns offset 15), 16-bit (20.000MB/s) transfers
>Description:
Ejecting a DLT tape no longer works.  The following errors show up
in "dmesg":

    st0(ahc2:0:3:0):  Check Condition on CDB: 0x1b 00 00 00 00 00
	SENSE KEY:  Illegal Request
	 ASC/ASCQ:  Medium Removal Prevented

    st0: error 22 in st_load (op 0)
    st0(ahc2:0:3:0):  Check Condition on CDB: 0x1b 00 00 00 00 00
	SENSE KEY:  Illegal Request
	 ASC/ASCQ:  Medium Removal Prevented

    st0: error 22 in st_load (op 0)
    st0(ahc2:0:3:0):  Check Condition on CDB: 0x1b 00 00 00 00 00
	SENSE KEY:  Illegal Request
	 ASC/ASCQ:  Medium Removal Prevented

    st0: error 22 in st_load (op 0)
    st0(ahc2:0:3:0):  Check Condition on CDB: 0x00 00 00 00 00 00
	SENSE KEY:  Unit Attention
	 ASC/ASCQ:  Not Ready To Ready Transition (Medium May Have Changed)

    st0(ahc2:0:3:0):  Check Condition on CDB: 0x1b 00 00 00 00 00
	SENSE KEY:  Illegal Request
	 ASC/ASCQ:  Medium Removal Prevented

    st0: error 22 in st_load (op 0)
    st0(ahc2:0:3:0):  Check Condition on CDB: 0x1b 00 00 00 00 00
	SENSE KEY:  Illegal Request
	 ASC/ASCQ:  Medium Removal Prevented

    st0: error 22 in st_load (op 0)

This was working fine with my old kernel:

    @(#)NetBSD 1.5Y (GW-GENERIC) #2: Sat Nov 17 21:23:18 EST 2001

Eject not working prevents changing tapes in the drive without human
intervention (i.e. someone has to press the EJECT button now).
>How-To-Repeat:
    beowulf:~# eject tape
    eject: open: /dev/rst0: Input/output error
    Exit 1
    beowulf:~# eject tape
    beowulf:~# eject tape
    beowulf:~# dmesg|tail
    st0(ahc2:0:3:0):  Check Condition on CDB: 0x1b 00 00 00 00 00
	SENSE KEY:  Illegal Request
	 ASC/ASCQ:  Medium Removal Prevented

    st0: error 22 in st_load (op 0)
    st0(ahc2:0:3:0):  Check Condition on CDB: 0x1b 00 00 00 00 00
	SENSE KEY:  Illegal Request
	 ASC/ASCQ:  Medium Removal Prevented

    st0: error 22 in st_load (op 0)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: