Subject: Question about st.c
To: None <tech-kern@NetBSD.ORG>
From: Brian Buhrow <buhrow@cats.ucsc.edu>
List: tech-kern
Date: 02/10/1997 20:38:18
	Hello NetBSD kernel gurus.  Today I attached an HP88780 1/2 inch tape
drive to an almost 1.2 system with  st.c Version:
/*	$NetBSD: st.c,v 1.66 1996/05/05 19:53:01 christos Exp $	*/
The tape drive works beautifully, including the automatic detection of the
proper density and so forth.  However, we would like the SunOS behavior of
automatically selecting the write density based upon the device which is
opened for writing.  It looks as if the upper 2 bits of the bottom four
bits of the minor number are used to determine what density will be
selected.  However, upon further investigation, we found that this is
overridden if the driver feels that the tape drive has been opened with a
previous value.  Since the drive indicates that it is using a particular
value when it is initialized, it seems as though the minor number can never
overturn the value previously assigned.  
Although we can successfully select the density we desire with the mt
command, we are not interested in altering our backup scripts to issue
density setting mt commands to make sure that we are getting 6250 out of
our drive even if it is set to 800 or 1600 BPI.
	So, is there a way we could insure that minor device 12-15 selects
6250, 7-11 selects 1600, and 4-7 selects 800, while 0-3 just uses the
default  tape drive setting?  Any help on this would be greatly
appreciated.
-thanks
-Brian