Subject: kern/2220: implementation of SCIOCRESET ioctl for generic scsi subsystem
To: None <netbsd-gnats@wizardz.com>
From: Daniel Hagerty <hag@wizardz.com>
List: netbsd-bugs
Date: 03/16/1996 02:04:10
>Number: 2220
>Category: kern
>Synopsis: implementation of SCIOCRESET ioctl for generic scsi subsystem
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Mar 16 02:20:01 1996
>Last-Modified:
>Originator: Daniel Hagerty
>Organization:
>Release: gnats-3.2
>Environment:
System: NetBSD zardoz.wizardz.com 1.1A NetBSD 1.1A (ZARDOZ) #64: Sat Mar 16 01:22:43 EST 1996 hag@zardoz.wizardz.com:/src/netbsd/sys/arch/i386/compile/ZARDOZ i386
>Description:
I have a tape drive that occassionally loses on boot, and
needs a quick kick, the unimplemented SCIOCRESET ioctl is the right
thing. Enclosed is a quick implementation, that seems to do the
thing.
>How-To-Repeat:
>Fix:
Index: scsi_ioctl.c
===================================================================
RCS file: /src/cvsroot/netbsd/sys/scsi/scsi_ioctl.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 scsi_ioctl.c
*** scsi_ioctl.c 1996/02/27 23:39:28 1.1.1.2
--- scsi_ioctl.c 1996/03/16 03:08:32
***************
*** 356,361 ****
--- 356,368 ----
sca->lun = sc_link->lun;
return 0;
}
+
+ #define GENRETRY 1 /* XXX this should be somewhere else */
+ case SCIOCRESET: {
+ scsi_scsi_cmd(sc_link, 0, 0, 0, 0, GENRETRY, 2000, NULL,
+ SCSI_RESET);
+ return 0;
+ }
default:
return ENOTTY;
}
>Audit-Trail:
>Unformatted: