Subject: tmscp(4) man page is wrong (#146)
Index:	man/man4/tmscp.4 2.11BSD

Description:
	The tmscp man page had the major device wrong and the density
	select bits wrong.  Also the kernel config parameters and
	the autoconfig information were both out of date.

Repeat-By:
	Observation.  Or have a friend point out that "the tmscp man page
	has a few differences with reality".

Fix:
	Apply the patch below to tmscp.4, then:

		nroff -h -man tmscp.4 > /usr/man/cat4/tmscp.0
	
	to install the formatted version.
=================================cut here=============================
*** /usr/src/man/man4/tmscp.4.old	Tue Oct 23 16:00:42 1990
--- /usr/src/man/man4/tmscp.4	Wed Jul 28 20:35:25 1993
***************
*** 2,10 ****
  .\" All rights reserved.  The Berkeley software License Agreement
  .\" specifies the terms and conditions for redistribution.
  .\"
! .\"	@(#)tmscp.4	6.1 (Berkeley) 6/4/86
  .\"
! .TH TMSCP 4 "June 4, 1986"
  .UC 2
  .SH NAME
  tmscp \- DEC TMSCP magtape interface
--- 2,10 ----
  .\" All rights reserved.  The Berkeley software License Agreement
  .\" specifies the terms and conditions for redistribution.
  .\"
! .\"	@(#)tmscp.4	1.1 (2.11BSD) 7/28/93
  .\"
! .TH TMSCP 4 "July 28, 1993"
  .UC 2
  .SH NAME
  tmscp \- DEC TMSCP magtape interface
***************
*** 12,35 ****
  .ft B
  .nf
  /sys/conf/SYSTEM:
          NTMSCP       1     # TMSCP controllers
          NTMS         1     # TMSCP drives
          TMSCP_DEBUG  NO    # debugging code in in TMSCP drive (EXPENSIVE)
-         TMSCP_VEC    0260  # base of TMSCP interrupt vectors (OCTAL!!!)
  
  /etc/dtab:
  .ta .5i +\w'#Name 'u +\w'Unit# 'u +\w'177777 'u +\w'Vector 'u +\w'Br 'u +\w'xxxxxxx 'u +\w'xxxxxxx 'u
  	#Name	Unit#	Addr	Vector	Br	Handler(s)		# Comments
  	tms	?	174500	260	5	tmsintr		# tmscp driver
  .DT
  
  major device number(s):
!        raw: 33
         block: 12
  minor device encoding:
!        bits 0003 specify TMSCP drive
!        bits 0004 specifies no-rewind operation
!        bits 0010 specifies high density operation (TU81)
  .fi
  .ft R
  .SH DESCRIPTION
--- 12,44 ----
  .ft B
  .nf
  /sys/conf/SYSTEM:
+ 
          NTMSCP       1     # TMSCP controllers
          NTMS         1     # TMSCP drives
          TMSCP_DEBUG  NO    # debugging code in in TMSCP drive (EXPENSIVE)
  
  /etc/dtab:
  .ta .5i +\w'#Name 'u +\w'Unit# 'u +\w'177777 'u +\w'Vector 'u +\w'Br 'u +\w'xxxxxxx 'u +\w'xxxxxxx 'u
  	#Name	Unit#	Addr	Vector	Br	Handler(s)		# Comments
  	tms	?	174500	260	5	tmsintr		# tmscp driver
+ 	tms	?	164334	0	5	tmsintr		# alternate
  .DT
  
  major device number(s):
! 
!        raw: 23
         block: 12
+ 
  minor device encoding:
! 
! bit:    |7 | 6 | 5 | 4 | 3 | 2 | 1 | 0|
!         -------------------------------
!          C   C   X   D   D   N   U   U
! 
!        C = Controller # (max of 4 controllers)
!        D = Density
!        N = Norewind on close
!        U = Unit (drive) number (max of 4 drives per controller)
  .fi
  .ft R
  .SH DESCRIPTION
***************
*** 51,75 ****
  .br
  /dev/MAKEDEV.local	script to localize special files
  .DT
  .SH DIAGNOSTICS
! .BR "tmscp controller failed to init" .
  The controller initialization procedure failed.
  This probably indicates a hardware problem.
  .PP
! .BR "tmscp%d: sa 0%o, state %d" .
  (Additional status information given after a hard I/O error.)
  The values of the controller status register and the internal
  driver state are printed.
  .PP
! .BR "tmscp%d: random interrupt ignored" .
  An unexpected interrupt was received (e.g. when no i/o was
  pending).  The interrupt is ignored.
  .PP
! .BR "tmscp%d:  interrupt in unknown state %d ignored" .
  An interrupt was received when the driver was in an unknown
  internal state.  Indicates a hardware problem or a driver bug.
  .PP
! .BR "tmscp%d:  fatal error (0%o)" .
  The controller detected a ``fatal error'' in the status returned
  to the host.  The contents of the status register are displayed.
  .PP
--- 60,101 ----
  .br
  /dev/MAKEDEV.local	script to localize special files
  .DT
+ .PP
+ The vector specified in \fB/etc/dtab\fP may be given as an explicit
+ value in which case \fIautoconfig(8)\fP will attempt to allocate the 
+ specified vector.  The vector may also be (if the system is at revision
+ level 100 or higher) given as \fB0\fP - in which case \fIautoconfig(8)\fP
+ will request the kernel to allocate the next available vector (beginning
+ at 01000 and proceeding downward) which \fIautoconfig(8)\fP will
+ initialize.
+ .PP
+ Multiple drives on a single controller are supported.  Multiple controllers
+ are also supported.
+ .PP
+ Density selection is specified by bits 3 and 4 in the minor device number.
+ A value of 0 requests the lowest density of a drive and a value of 3
+ the highest density.  Values of 1 and 2 are essentially equivalent
+ (because because TMSCP only defines values for three densities) and
+ request the middle density (for tri-density tape drives).
  .SH DIAGNOSTICS
! .BR "tms controller failed to init" .
  The controller initialization procedure failed.
  This probably indicates a hardware problem.
  .PP
! .BR "tms%d: sa 0%o, state %d" .
  (Additional status information given after a hard I/O error.)
  The values of the controller status register and the internal
  driver state are printed.
  .PP
! .BR "tms%d: random interrupt ignored" .
  An unexpected interrupt was received (e.g. when no i/o was
  pending).  The interrupt is ignored.
  .PP
! .BR "tms%d:  interrupt in unknown state %d ignored" .
  An interrupt was received when the driver was in an unknown
  internal state.  Indicates a hardware problem or a driver bug.
  .PP
! .BR "tms%d:  fatal error (0%o)" .
  The controller detected a ``fatal error'' in the status returned
  to the host.  The contents of the status register are displayed.
  .PP
***************
*** 80,88 ****
  The following errors are interpretations of TMSCP error messages
  returned by the controller to the host.
  Each is preceded by either
! .B "tmscp%d: hard error"
  or
! .BR "tmscp%d: soft error" .
  .PP
  .BR "controller error, event 0%o" .
  .PP
--- 106,114 ----
  The following errors are interpretations of TMSCP error messages
  returned by the controller to the host.
  Each is preceded by either
! .B "tms%d: hard error"
  or
! .BR "tms%d: soft error" .
  .PP
  .BR "controller error, event 0%o" .
  .PP
***************
*** 104,114 ****
  If any non-data error is encountered on non-raw tape, it refuses to do anything
  more until closed.
  .PP
! Programmable vector devices do not fit well with the present autoconfigure
! scheme.  The vector given in the system configuration file must agree
! with that in \fI/etc/dtab\fP or the device will not operate correctly and
! possibly crash the system.  There is a global variable \fBTMSCPvec\fP which
! is initialized with the vector given in the config file - this global may
! be patched via \fIadb(1)\fP to agree with the value is \fI/etc/dtab\fP.
! .PP
! Multiple drives on a single controller are not currently supported.
--- 130,135 ----
  If any non-data error is encountered on non-raw tape, it refuses to do anything
  more until closed.
  .PP
! On quad-density tape drives (the Kennedy 9662 for example) the middle density 
! of 3200bpi is not host selectable (it can be manually selected from the
! drive's front panel) because TMSCP only defines 800, 1600 and 6250bpi.
