[6733] in Athena Bugs
vax 7.2P: /usr/include/sys/mtio.h is inconsistant across kernels
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Fri Dec 28 15:10:14 1990
To: bugs@ATHENA.MIT.EDU
Cc: dkk@ATHENA.MIT.EDU
Date: Fri, 28 Dec 90 15:09:54 EST
From: Ezra Peisach <epeisach@ATHENA.MIT.EDU>
System name: medusa
Type and version: CVAXSTAR 7.2P (1 update(s) to same version)
Display type: SM
What were you trying to do?
Trying to get mt to understand some of the newer devices
What's wrong:
The field for mt_type definitions has values that depend on what
kernel is on the machine.
MT_ISTMSCP is different on different platforms.
The default definitions are correct for a VS2 but not a VAX650.
There is no way to build a version of mt that will work on all vaxen.
What should have happened:
There should be one ser of defintions.
Please describe any relevant documentation references:
mtio(4)
In the current header file:
#if defined(VAXSTAR) && defined(VAX630)
.
.
.
.
/* Get status definitions for device type word (mt_type) */
#define MT_ISTS 0x01 /* ts11/ts05/tu80 */
#define MT_ISHT 0x02 /* tm03/te16/tu45/tu77 */
#define MT_ISTM 0x03 /* tm11/te10 */
#define MT_ISMT 0x04 /* tm78/tu78 */
#define MT_ISUT 0x05 /* tu45 */
/* notice DEC is cheating here, using SUN's numbers. */
#define MT_ISTMSCP 0x06 /* All tmscp tape drives */
#define MT_ISST 0x07 /* TZK50 on vaxstar */
#else /* !VAXSTAR */
/*
* Constants for mt_type byte. These are the same
* for controllers compatible with the types listed.
*/
#define MT_ISTS 0x01 /* TS-11 */
#define MT_ISHT 0x02 /* TM03 Massbus: TE16, TU45, TU77 */
#define MT_ISTM 0x03 /* TM11/TE10 Unibus */
#define MT_ISMT 0x04 /* TM78/TU78 Massbus */
#define MT_ISUT 0x05 /* SI TU-45 emulation on Unibus */
#define MT_ISCPC 0x06 /* SUN */
#define MT_ISAR 0x07 /* SUN */
#define MT_ISTMSCP 0x08 /* DEC TMSCP protocol (TU81, TK50) */
#endif /* VAXSTAR */
------------------------------------------------------
In the man page:
/*
* Constants for mt_type byte. These are the same
* for other controllers compatible with the types listed.
*/
#define MT_ISTS 0x01 /* TS-11 */
#define MT_ISHT 0x02 /* TM03 Massbus: TE16, TU45, TU77 */
#define MT_ISTM 0x03 /* TM11/TE10 Unibus */
#define MT_ISMT 0x04 /* TM78/TU78 Massbus */
#define MT_ISUT 0x05 /* SI TU-45 emulation on Unibus */
#define MT_ISCPC 0x06 /* SUN */
#define MT_ISAR 0x07 /* SUN */
#define MT_ISTMSCP 0x08 /* DEC TMSCP protocol (TU81, TK50) */
---------------------------------------------------------------
In ultrix header files:
/* Get status definitions for device type word (mt_type) */
#define MT_ISTS 0x01 /* ts11/ts05/tu80 */
#define MT_ISHT 0x02 /* tm03/te16/tu45/tu77 */
#define MT_ISTM 0x03 /* tm11/te10 */
#define MT_ISMT 0x04 /* tm78/tu78 */
#define MT_ISUT 0x05 /* tu45 */
#define MT_ISTMSCP 0x06 /* All tmscp tape drives */
#define MT_ISST 0x07 /* TZK50 on VS2000/MV2000 */
#define MT_ISSCSI 0x08 /* SCSI tapes (TZK50 & TZ30) */
-----------------------------------------------------------------------
From reno:
/*
* Constants for mt_type byte. These are the same
* for controllers compatible with the types listed.
*/
#define MT_ISTS 0x01 /* TS-11 */
#define MT_ISHT 0x02 /* TM03 Massbus: TE16, TU45, TU77 */
#define MT_ISTM 0x03 /* TM11/TE10 Unibus */
#define MT_ISMT 0x04 /* TM78/TU78 Massbus */
#define MT_ISUT 0x05 /* SI TU-45 emulation on Unibus */
#define MT_ISCPC 0x06 /* SUN */
#define MT_ISAR 0x07 /* SUN */
#define MT_ISTMSCP 0x08 /* DEC TMSCP protocol (TU81, TK50) */
#define MT_ISCY 0x09 /* CCI Cipher */
-------------------------------------------------------------
For 7.3 I propose the following:
I think we should choose one set and be consistant and make them the
same across platforms.
/*
* Constants for mt_type byte. These are the same
* for controllers compatible with the types listed.
*/
#define MT_ISTS 0x01 /* TS-11 */
#define MT_ISHT 0x02 /* TM03 Massbus: TE16, TU45, TU77 */
#define MT_ISTM 0x03 /* TM11/TE10 Unibus */
#define MT_ISMT 0x04 /* TM78/TU78 Massbus */
#define MT_ISUT 0x05 /* SI TU-45 emulation on Unibus */
#define MT_ISCPC 0x06 /* SUN */
#define MT_ISAR 0x07 /* SUN */
#define MT_ISTMSCP 0x08 /* DEC TMSCP protocol (TU81, TK50) */
#define MT_ISCY 0x09 /* CCI Cipher */
#define MT_ISST 0x0a /* TZK50 on VS2000/MV2000 */
#define MT_ISSCSI 0x0b /* SCSI tapes (TZK50 & TZ30) */
Let's not see the ball drop on this one...
Ezra