NetBSD Problem Report #1275

From gnats  Tue Jul 25 10:29:50 1995
Received: from saavik.ann-arbor.mi.us (root@saavik.ann-arbor.mi.us [198.108.60.226]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id KAA25175 for <gnats-bugs@gnats.netbsd.org>; Tue, 25 Jul 1995 10:29:49 -0400
Message-Id: <199507251429.KAA09234@saavik.ann-arbor.mi.us>
Date: Tue, 25 Jul 1995 10:29:38 -0400
From: mju@merit.edu
Reply-To: mju@merit.edu
To: gnats-bugs@gnats.netbsd.org
Subject: st driver does not return useful values for MTIOCGET ioctl
X-Send-Pr-Version: 3.2

>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
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 25 10:35:01 +0000 1995
>Closed-Date:    Sat Jul 04 02:14:07 +0000 1998
>Last-Modified:  Sat Jul 04 02:15:56 +0000 1998
>Originator:     Marc Unangst
>Release:        1.0A as of 7/10/95
>Organization:
Merit Network, Inc.
>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.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mjacob 
State-Changed-When: Fri Jul 3 19:14:07 PDT 1998 
State-Changed-Why:  
mostly fixed. dsreg && erreg have values set in them. There is a  resid 
(which is partially useless at being 16 bits). Names of specific tape 
devices won't be done. 


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.