Subject: kern/1275: st driver does not return useful values for MTIOCGET ioctl
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mju@merit.edu>
List: netbsd-bugs
Date: 07/25/1995 10:29:38
>Number: 1275
>Category: kern
>Synopsis: st driver does not return useful values for MTIOCGET ioctl
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 25 10:35:01 1995
>Last-Modified:
>Originator: Marc Unangst
>Organization:
Merit Network, Inc.
>Release: 1.0A as of 7/10/95
>Environment:
System: NetBSD saavik.ann-arbor.mi.us 1.0A NetBSD 1.0A (SAAVIK) #3: Wed Jul 19 13:48:01 EDT 1995 root@saavik.ann-arbor.mi.us:/usr/src/sys/arch/i386/compile/SAAVIK i386
Hardware:
aha0 at isa0 port 0x330-0x333 irq 11 drq 5
scsibus0 at aha0
aha0 targ 4 lun 0: <ARCHIVE, Python 25501-XXX, 2.50> SCSI2 1/sequential removable
st0 at scsibus0: drive empty
>Description:
The "st" SCSI tape driver does not return a useful mt_type
value. This makes the "mt status" command useless for SCSI tapes.
The st driver also fails to fill in the mt_dsreg, mt_erreg, and
mt_resid fields. (It doesn't fill in mt_fileno and mt_blkno, but at
least those are documented as unimplemented.)
>How-To-Repeat:
Run any program that executes a MTIOCGET ioctl on a SCSI
tape device. Observe that mt_type is set to 7 regardless of the
actual type of tape drive installed. Observe that mt_dsreg, mt_erreg,
and mt_resid are always set to 0.
>Fix:
Add code to scsi/st.c to recognize different types of SCSI
tape drive and correctly report their characteristics. Hopefully this
can be done without creating a table with IDENTIFY strings in it.
>Audit-Trail:
>Unformatted: