1: /*
   2:  * Copyright (c) 1982, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)mtreg.h	7.1 (Berkeley) 6/5/86
   7:  */
   8: 
   9: /*
  10:  * TU78 registers.
  11:  */
  12: 
  13: struct mtdevice {
  14:     int mtcs;       /* control status register */
  15:     int mter;       /* error register */
  16:     int mtca;       /* command address, rec cnt, skp cnt reg */
  17:     int mtmr1;      /* maintenance register */
  18:     int mtas;       /* attention summary register */
  19:     int mtbc;       /* byte count register */
  20:     int mtdt;       /* drive type register */
  21:     int mtds;       /* drive status register */
  22:     int mtsn;       /* serial number register */
  23:     int mtmr2;      /* maintenance register */
  24:     int mtmr3;      /* maintenance register */
  25:     int mtner;      /* non-data transfer error register */
  26:     int mtncs[4];   /* non-data transfer command registers */
  27:     int mtia;       /* internal address */
  28:     int mtid;       /* internal data */
  29: };
  30: 
  31: /* mtcs */
  32: #define MT_GO       000001      /* go bit */
  33: #define MT_NOOP     000002      /* no operation */
  34: #define MT_UNLOAD   000004      /* unload tape */
  35: #define MT_REW      000006      /* rewind */
  36: #define MT_SENSE    000010      /* sense */
  37: #define MT_DSE      000012      /* data security erase */
  38: #define MT_WTMPE    000014      /* write phase encoded tape mark */
  39: #define MT_WTM      MT_WTMPE    /* generic write tape mark */
  40: #define MT_WTMGCR   000016      /* write GCR tape mark */
  41: #define MT_SFORW    000020      /* space forward record */
  42: #define MT_SREV     000022      /* space reverse record */
  43: #define MT_SFORWF   000024      /* space forward file */
  44: #define MT_SREVF    000026      /* space reverse file */
  45: #define MT_SFORWE   000030      /* space forward either */
  46: #define MT_SREVE    000032      /* space reverse either */
  47: #define MT_ERGPE    000034      /* erase tape, set PE */
  48: #define MT_ERASE    MT_ERGPE    /* generic erase tape */
  49: #define MT_ERGGCR   000036      /* erase tape, set GCR */
  50: #define MT_CLSPE    000040      /* close file PE */
  51: #define MT_CLS      MT_CLSPE    /* generic close file */
  52: #define MT_CLSGCR   000042      /* close file GCR */
  53: #define MT_SLEOT    000044      /* space to logical EOT */
  54: #define MT_SFLEOT   000046      /* space forward file, stop on LEOT */
  55: #define MT_WCHFWD   000050      /* write check forward */
  56: #define MT_WCHREV   000056      /* write check reverse */
  57: #define MT_WRITEPE  000060      /* write phase encoded */
  58: #define MT_WRITE    MT_WRITEPE  /* generic write */
  59: #define MT_WRITEGCR 000062      /* write group coded */
  60: #define MT_READ     000070      /* read forward */
  61: #define MT_EXSNS    000072      /* read extended sense error log */
  62: #define MT_READREV  000076      /* read reverse */
  63: #define MT_GCR      000002      /* make generic ops GCR ops */
  64: 
  65: /* mtds */
  66: #define MTDS_RDY    0100000     /* tape ready */
  67: #define MTDS_PRES   0040000     /* tape unit has power */
  68: #define MTDS_ONL    0020000     /* online */
  69: #define MTDS_REW    0010000     /* tape rewinding */
  70: #define MTDS_PE     0004000     /* tape set for phase encoded */
  71: #define MTDS_BOT    0002000     /* tape at BOT */
  72: #define MTDS_EOT    0001000     /* tape at EOT */
  73: #define MTDS_FPT    0000400     /* write protected */
  74: #define MTDS_AVAIL  0000200     /* unit available */
  75: #define MTDS_SHR    0000100     /* unit is shared */
  76: #define MTDS_MAINT  0000040     /* maintenance mode */
  77: #define MTDS_DSE    0000020     /* DSE in progress */
  78: 
  79: #define MTDS_BITS   \
  80: "\10\20RDY\17PRES\16ONL\15REW\14PE\13BOT\12EOT\11FPT\10AVAIL\
  81: \7SHR\6MAINT\5DSE"
  82: 
  83: /* mter */
  84: #define MTER_INTCODE    0377        /* mask for interrupt code */
  85: #define MTER_FAILCODE   0176000     /* failure code */
  86: 
  87: /* interrupt codes */
  88: #define MTER_DONE   001     /* operation complete */
  89: #define MTER_TM     002     /* unexpected tape mark */
  90: #define MTER_BOT    003     /* unexpected BOT detected */
  91: #define MTER_EOT    004     /* tape positioned beyond EOT */
  92: #define MTER_LEOT   005     /* unexpected LEOT detected */
  93: #define MTER_NOOP   006     /* no-op completed */
  94: #define MTER_RWDING 007     /* rewinding */
  95: #define MTER_FPT    010     /* write protect error */
  96: #define MTER_NOTRDY 011     /* not ready */
  97: #define MTER_NOTAVL 012     /* not available */
  98: #define MTER_OFFLINE    013     /* offline */
  99: #define MTER_NONEX  014     /* unit does not exist */
 100: #define MTER_NOTCAP 015     /* not capable */
 101: #define MTER_ONLINE 017     /* tape came online */
 102: #define MTER_LONGREC    020     /* long tape record */
 103: #define MTER_SHRTREC    021     /* short tape record */
 104: #define MTER_RETRY  022     /* retry */
 105: #define MTER_RDOPP  023     /* read opposite */
 106: #define MTER_UNREAD 024     /* unreadable */
 107: #define MTER_ERROR  025     /* error */
 108: #define MTER_EOTERR 026     /* EOT error */
 109: #define MTER_BADTAPE    027     /* tape position lost */
 110: #define MTER_TMFLTA 030     /* TM fault A */
 111: #define MTER_TUFLTA 031     /* TU fault A */
 112: #define MTER_TMFLTB 032     /* TM fault B */
 113: #define MTER_MBFLT  034     /* Massbus fault */
 114: #define MTER_KEYFAIL    077     /* keypad entry error */
 115: 
 116: /* mtdt */
 117: #define MTDT_NSA    0100000     /* not sector addressed; always 1 */
 118: #define MTDT_TAP    0040000     /* tape; always 1 */
 119: #define MTDT_MOH    0020000     /* moving head; always 0 */
 120: #define MTDT_7CH    0010000     /* 7 channel; always 0 */
 121: #define MTDT_DRQ    0004000     /* drive request required */
 122: #define MTDT_SPR    0002000     /* slave present; always 1 ??? */
 123: /* bit 9 is spare */
 124: /* bits 8-0 are formatter/transport type */
 125: 
 126: /* mtid */
 127: #define MTID_RDY    0100000     /* controller ready */
 128: #define MTID_CLR    0040000     /* controller clear */
 129: 
 130: #define b_repcnt  b_bcount
 131: #define b_command b_resid

Defined struct's

mtdevice defined in line 13; used 34 times

Defined macros

MTDS_AVAIL defined in line 74; used 1 times
MTDS_BITS defined in line 79; used 1 times
MTDS_BOT defined in line 71; used 1 times
MTDS_DSE defined in line 77; never used
MTDS_EOT defined in line 72; never used
MTDS_FPT defined in line 73; used 1 times
MTDS_MAINT defined in line 76; never used
MTDS_ONL defined in line 68; used 1 times
MTDS_PE defined in line 70; used 2 times
MTDS_PRES defined in line 67; used 1 times
MTDS_RDY defined in line 66; never used
MTDS_REW defined in line 69; never used
MTDS_SHR defined in line 75; never used
MTDT_7CH defined in line 120; never used
MTDT_DRQ defined in line 121; never used
MTDT_MOH defined in line 119; never used
MTDT_NSA defined in line 117; never used
MTDT_SPR defined in line 122; never used
MTDT_TAP defined in line 118; never used
MTER_BADTAPE defined in line 109; never used
MTER_BOT defined in line 90; never used
MTER_DONE defined in line 88; used 1 times
MTER_EOT defined in line 91; never used
MTER_EOTERR defined in line 108; never used
MTER_ERROR defined in line 107; never used
MTER_FAILCODE defined in line 85; used 13 times
MTER_FPT defined in line 95; never used
MTER_INTCODE defined in line 84; used 16 times
MTER_KEYFAIL defined in line 114; never used
MTER_LEOT defined in line 92; never used
MTER_LONGREC defined in line 102; never used
MTER_MBFLT defined in line 113; used 3 times
MTER_NONEX defined in line 99; never used
MTER_NOOP defined in line 93; never used
MTER_NOTAVL defined in line 97; never used
MTER_NOTCAP defined in line 100; never used
MTER_NOTRDY defined in line 96; never used
MTER_OFFLINE defined in line 98; never used
MTER_ONLINE defined in line 101; used 1 times
MTER_RDOPP defined in line 105; never used
MTER_RETRY defined in line 104; never used
MTER_RWDING defined in line 94; never used
MTER_SHRTREC defined in line 103; never used
MTER_TM defined in line 89; never used
MTER_TMFLTA defined in line 110; never used
MTER_TMFLTB defined in line 112; used 3 times
MTER_TUFLTA defined in line 111; never used
MTER_UNREAD defined in line 106; never used
MTID_CLR defined in line 128; used 3 times
MTID_RDY defined in line 127; used 3 times
MT_CLS defined in line 51; used 1 times
MT_CLSGCR defined in line 52; never used
MT_CLSPE defined in line 50; used 1 times
  • in line 51
MT_DSE defined in line 37; never used
MT_ERASE defined in line 48; never used
MT_ERGGCR defined in line 49; never used
MT_ERGPE defined in line 47; used 1 times
  • in line 48
MT_EXSNS defined in line 61; never used
MT_GCR defined in line 63; used 3 times
MT_GO defined in line 32; used 11 times
MT_NOOP defined in line 33; never used
MT_READ defined in line 60; used 1 times
MT_READREV defined in line 62; used 1 times
MT_REW defined in line 35; used 5 times
MT_SENSE defined in line 36; used 6 times
MT_SFLEOT defined in line 54; never used
MT_SFORW defined in line 41; used 2 times
MT_SFORWE defined in line 45; never used
MT_SFORWF defined in line 43; used 2 times
MT_SLEOT defined in line 53; never used
MT_SREV defined in line 42; used 1 times
MT_SREVE defined in line 46; never used
MT_SREVF defined in line 44; used 1 times
MT_UNLOAD defined in line 34; used 2 times
MT_WCHFWD defined in line 55; never used
MT_WCHREV defined in line 56; never used
MT_WRITE defined in line 58; used 1 times
MT_WRITEGCR defined in line 59; never used
MT_WRITEPE defined in line 57; used 1 times
  • in line 58
MT_WTM defined in line 39; used 2 times
MT_WTMGCR defined in line 40; never used
MT_WTMPE defined in line 38; used 1 times
  • in line 39
b_command defined in line 131; used 5 times
b_repcnt defined in line 130; used 4 times

Usage of this include

Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2024
Valid CSS Valid XHTML 1.0 Strict