1*23311Smckusick /* 2*23311Smckusick * Copyright (c) 1982 Regents of the University of California. 3*23311Smckusick * All rights reserved. The Berkeley software License Agreement 4*23311Smckusick * specifies the terms and conditions for redistribution. 5*23311Smckusick * 6*23311Smckusick * @(#)htreg.h 6.2 (Berkeley) 06/08/85 7*23311Smckusick */ 83336Swnj 93336Swnj struct htdevice 103336Swnj { 113336Swnj int htcs1; /* control status register */ 123336Swnj int htds; /* drive status register */ 133336Swnj int hter; /* error register */ 143336Swnj int htmr; /* maintenance register */ 153336Swnj int htas; /* attention status register */ 163336Swnj int htfc; /* frame counter */ 173336Swnj int htdt; /* drive type register */ 183336Swnj int htck; /* nrzi check (crc) error character */ 193336Swnj int htsn; /* serial number register */ 203336Swnj int httc; /* tape controll register */ 213336Swnj }; 223336Swnj 233336Swnj /* htcs1 */ 243336Swnj #define HT_GO 000001 /* go bit */ 253336Swnj #define HT_SENSE 000000 /* no operations (sense) */ 263336Swnj #define HT_REWOFFL 000002 /* rewind offline */ 273336Swnj #define HT_REW 000006 /* rewind */ 283336Swnj #define HT_DCLR 000010 /* drive clear */ 293336Swnj #define HT_RIP 000020 /* read in preset */ 303336Swnj #define HT_ERASE 000024 /* erase */ 313336Swnj #define HT_WEOF 000026 /* write tape mark */ 323336Swnj #define HT_SFORW 000030 /* space forward */ 333336Swnj #define HT_SREV 000032 /* space reverse */ 343336Swnj #define HT_WCHFWD 000050 /* write check forward */ 353336Swnj #define HT_WCHREV 000056 /* write check reverse */ 363336Swnj #define HT_WCOM 000060 /* write forward */ 373336Swnj #define HT_RCOM 000070 /* read forward */ 383336Swnj #define HT_RREV 000076 /* read reverse */ 393336Swnj 403336Swnj /* htds */ 413336Swnj #define HTDS_ATA 0100000 /* attention active */ 423336Swnj #define HTDS_ERR 0040000 /* composite error */ 433336Swnj #define HTDS_PIP 0020000 /* positioning in progress */ 443336Swnj #define HTDS_MOL 0010000 /* medium on line */ 453336Swnj #define HTDS_WRL 0004000 /* write lock */ 463336Swnj #define HTDS_EOT 0002000 /* end of tape */ 473336Swnj /* bit 9 is unused */ 483336Swnj #define HTDS_DPR 0000400 /* drive present (always 1) */ 493336Swnj #define HTDS_DRY 0000200 /* drive ready */ 503336Swnj #define HTDS_SSC 0000100 /* slave status change */ 513336Swnj #define HTDS_PES 0000040 /* phase-encoded status */ 523336Swnj #define HTDS_SDWN 0000020 /* settle down */ 533336Swnj #define HTDS_IDB 0000010 /* identification burst */ 543336Swnj #define HTDS_TM 0000004 /* tape mark */ 553336Swnj #define HTDS_BOT 0000002 /* beginning of tape */ 563336Swnj #define HTDS_SLA 0000001 /* slave attention */ 573336Swnj 583336Swnj #define HTDS_BITS \ 593336Swnj "\10\20ATA\17ERR\16PIP\15MOL\14WRL\13EOT\11DPR\10DRY\ 603336Swnj \7SSC\6PES\5SDWN\4IDB\3TM\2BOT\1SLA" 613336Swnj 623336Swnj /* hter */ 633336Swnj #define HTER_CORCRC 0100000 /* correctible data or ecc */ 643336Swnj #define HTER_UNS 0040000 /* unsafe */ 653336Swnj #define HTER_OPI 0020000 /* operation incomplete */ 663336Swnj #define HTER_DTE 0010000 /* drive timing error */ 673336Swnj #define HTER_NEF 0004000 /* non-executable function */ 683336Swnj #define HTER_CSITM 0002000 /* correctable skew/illegal tape mark */ 693336Swnj #define HTER_FCE 0001000 /* frame count error */ 703336Swnj #define HTER_NSG 0000400 /* non-standard gap */ 713336Swnj #define HTER_PEFLRC 0000200 /* format error or lrc error */ 723336Swnj #define HTER_INCVPE 0000100 /* incorrectable data error or vertical 733336Swnj parity error */ 743336Swnj #define HTER_DPAR 0000040 /* data parity error */ 753336Swnj #define HTER_FMT 0000020 /* format error */ 763336Swnj #define HTER_CPAR 0000010 /* control bus parity error */ 773336Swnj #define HTER_RMR 0000004 /* register modification refused */ 783336Swnj #define HTER_ILR 0000002 /* illegal register */ 793336Swnj #define HTER_ILF 0000001 /* illegal function */ 803336Swnj 813336Swnj #define HTER_BITS \ 823336Swnj "\10\20CORCRC\17UNS\16OPI\15DTE\14NEF\13CSITM\12FCE\11NSG\10PEFLRC\ 833336Swnj \7INCVPE\6DPAR\5FMT\4CPAR\3RMR\2ILR\1ILF" 843336Swnj #define HTER_HARD \ 853336Swnj (HTER_UNS|HTER_OPI|HTER_NEF|HTER_DPAR|HTER_FMT|HTER_CPAR| \ 863336Swnj HTER_RMR|HTER_ILR|HTER_ILF) 873336Swnj 883336Swnj /* htdt */ 893336Swnj #define HTDT_NSA 0100000 /* not sector addressed; always 1 */ 903336Swnj #define HTDT_TAP 0040000 /* tape; always 1 */ 913336Swnj #define HTDT_MOH 0020000 /* moving head; always 0 */ 923336Swnj #define HTDT_7CH 0010000 /* 7 channel; always 0 */ 933336Swnj #define HTDT_DRQ 0004000 /* drive requested; always 0 */ 943336Swnj #define HTDT_SPR 0002000 /* slave present */ 953336Swnj /* bit 9 is spare */ 963336Swnj /* bits 8-0 are formatter/transport type */ 973336Swnj 983336Swnj /* httc */ 993336Swnj #define HTTC_ACCL 0100000 /* transport is not reading/writing */ 1003336Swnj #define HTTC_FCS 0040000 /* frame count status */ 1013336Swnj #define HTTC_SAC 0020000 /* slave address change */ 1023336Swnj #define HTTC_EAODTE 0010000 /* enable abort on data xfer errors */ 1033336Swnj /* bits 8-10 are density select */ 1043336Swnj #define HTTC_800BPI 0001400 /* in bits 8-10, dens=1600 */ 1053336Swnj #define HTTC_1600BPI 0002000 /* in bits 8-10, dens=800 */ 1063336Swnj /* bits 4-7 are format select */ 1073336Swnj #define HTTC_PDP11 0000300 /* in bits 4-7, pdp11 normal format */ 1083336Swnj #define HTTC_EVEN 0000010 /* select even parity */ 1093336Swnj /* bits 0 - 2 are slave select */ 1103336Swnj 1113336Swnj #define b_repcnt b_bcount 1123336Swnj #define b_command b_resid 113