1 /*- 2 * Copyright (c) 1982, 1986 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 * 7 * @(#)htreg.h 7.3 (Berkeley) 05/08/91 8 */ 9 10 struct htdevice 11 { 12 int htcs1; /* control status register */ 13 int htds; /* drive status register */ 14 int hter; /* error register */ 15 int htmr; /* maintenance register */ 16 int htas; /* attention status register */ 17 int htfc; /* frame counter */ 18 int htdt; /* drive type register */ 19 int htck; /* nrzi check (crc) error character */ 20 int htsn; /* serial number register */ 21 int httc; /* tape controll register */ 22 }; 23 24 /* htcs1 */ 25 #define HT_GO 000001 /* go bit */ 26 #define HT_SENSE 000000 /* no operations (sense) */ 27 #define HT_REWOFFL 000002 /* rewind offline */ 28 #define HT_REW 000006 /* rewind */ 29 #define HT_DCLR 000010 /* drive clear */ 30 #define HT_RIP 000020 /* read in preset */ 31 #define HT_ERASE 000024 /* erase */ 32 #define HT_WEOF 000026 /* write tape mark */ 33 #define HT_SFORW 000030 /* space forward */ 34 #define HT_SREV 000032 /* space reverse */ 35 #define HT_WCHFWD 000050 /* write check forward */ 36 #define HT_WCHREV 000056 /* write check reverse */ 37 #define HT_WCOM 000060 /* write forward */ 38 #define HT_RCOM 000070 /* read forward */ 39 #define HT_RREV 000076 /* read reverse */ 40 41 /* htds */ 42 #define HTDS_ATA 0100000 /* attention active */ 43 #define HTDS_ERR 0040000 /* composite error */ 44 #define HTDS_PIP 0020000 /* positioning in progress */ 45 #define HTDS_MOL 0010000 /* medium on line */ 46 #define HTDS_WRL 0004000 /* write lock */ 47 #define HTDS_EOT 0002000 /* end of tape */ 48 /* bit 9 is unused */ 49 #define HTDS_DPR 0000400 /* drive present (always 1) */ 50 #define HTDS_DRY 0000200 /* drive ready */ 51 #define HTDS_SSC 0000100 /* slave status change */ 52 #define HTDS_PES 0000040 /* phase-encoded status */ 53 #define HTDS_SDWN 0000020 /* settle down */ 54 #define HTDS_IDB 0000010 /* identification burst */ 55 #define HTDS_TM 0000004 /* tape mark */ 56 #define HTDS_BOT 0000002 /* beginning of tape */ 57 #define HTDS_SLA 0000001 /* slave attention */ 58 59 #define HTDS_BITS \ 60 "\10\20ATA\17ERR\16PIP\15MOL\14WRL\13EOT\11DPR\10DRY\ 61 \7SSC\6PES\5SDWN\4IDB\3TM\2BOT\1SLA" 62 63 /* hter */ 64 #define HTER_CORCRC 0100000 /* correctible data or ecc */ 65 #define HTER_UNS 0040000 /* unsafe */ 66 #define HTER_OPI 0020000 /* operation incomplete */ 67 #define HTER_DTE 0010000 /* drive timing error */ 68 #define HTER_NEF 0004000 /* non-executable function */ 69 #define HTER_CSITM 0002000 /* correctable skew/illegal tape mark */ 70 #define HTER_FCE 0001000 /* frame count error */ 71 #define HTER_NSG 0000400 /* non-standard gap */ 72 #define HTER_PEFLRC 0000200 /* format error or lrc error */ 73 #define HTER_INCVPE 0000100 /* incorrectable data error or vertical 74 parity error */ 75 #define HTER_DPAR 0000040 /* data parity error */ 76 #define HTER_FMT 0000020 /* format error */ 77 #define HTER_CPAR 0000010 /* control bus parity error */ 78 #define HTER_RMR 0000004 /* register modification refused */ 79 #define HTER_ILR 0000002 /* illegal register */ 80 #define HTER_ILF 0000001 /* illegal function */ 81 82 #define HTER_BITS \ 83 "\10\20CORCRC\17UNS\16OPI\15DTE\14NEF\13CSITM\12FCE\11NSG\10PEFLRC\ 84 \7INCVPE\6DPAR\5FMT\4CPAR\3RMR\2ILR\1ILF" 85 #define HTER_HARD \ 86 (HTER_UNS|HTER_OPI|HTER_NEF|HTER_DPAR|HTER_FMT|HTER_CPAR| \ 87 HTER_RMR|HTER_ILR|HTER_ILF) 88 89 /* htdt */ 90 #define HTDT_NSA 0100000 /* not sector addressed; always 1 */ 91 #define HTDT_TAP 0040000 /* tape; always 1 */ 92 #define HTDT_MOH 0020000 /* moving head; always 0 */ 93 #define HTDT_7CH 0010000 /* 7 channel; always 0 */ 94 #define HTDT_DRQ 0004000 /* drive requested; always 0 */ 95 #define HTDT_SPR 0002000 /* slave present */ 96 /* bit 9 is spare */ 97 /* bits 8-0 are formatter/transport type */ 98 99 /* httc */ 100 #define HTTC_ACCL 0100000 /* transport is not reading/writing */ 101 #define HTTC_FCS 0040000 /* frame count status */ 102 #define HTTC_SAC 0020000 /* slave address change */ 103 #define HTTC_EAODTE 0010000 /* enable abort on data xfer errors */ 104 /* bits 8-10 are density select */ 105 #define HTTC_800BPI 0001400 /* in bits 8-10, dens=1600 */ 106 #define HTTC_1600BPI 0002000 /* in bits 8-10, dens=800 */ 107 #define HTTC_6250BPI 0003400 /* in bits 8-10, dens=6250 */ 108 /* bits 4-7 are format select */ 109 #define HTTC_PDP11 0000300 /* in bits 4-7, pdp11 normal format */ 110 #define HTTC_EVEN 0000010 /* select even parity */ 111 /* bits 0 - 2 are slave select */ 112 113 #define b_repcnt b_bcount 114 #define b_command b_resid 115