1*2635Swnj /* hpreg.h 4.3 81/02/23 */ 22551Swnj 3*2635Swnj struct hpdevice 42551Swnj { 5*2635Swnj int hpcs1; /* control and status register 1 */ 6*2635Swnj int hpds; /* drive status */ 7*2635Swnj int hper1; /* error register 1 */ 8*2635Swnj int hpmr; /* maintenance */ 9*2635Swnj int hpas; /* attention summary */ 10*2635Swnj int hpda; /* desired address register */ 11*2635Swnj int hpdt; /* drive type */ 12*2635Swnj int hpla; /* look ahead */ 132551Swnj int hpsn; /* serial number */ 14*2635Swnj int hpof; /* offset register */ 15*2635Swnj int hpdc; /* desired cylinder address register */ 16*2635Swnj int hpcc; /* current cylinder */ 17*2635Swnj int hper2; /* error register 2 */ 18*2635Swnj int hper3; /* error register 3 */ 19*2635Swnj int hpec1; /* burst error bit position */ 20*2635Swnj int hpec2; /* burst error bit pattern */ 212551Swnj }; 222551Swnj 23*2635Swnj /* hpcs1 */ 24*2635Swnj #define HP_SC 0100000 /* special condition */ 25*2635Swnj #define HP_TRE 0040000 /* transfer error */ 26*2635Swnj #define HP_DVA 0004000 /* drive available */ 27*2635Swnj #define HP_RDY 0000200 /* controller ready */ 28*2635Swnj #define HP_IE 0000100 /* interrupt enable */ 29*2635Swnj /* bits 5-1 are the command */ 30*2635Swnj #define HP_GO 0000001 312551Swnj 32*2635Swnj /* commands */ 33*2635Swnj #define HP_NOP 000 /* no operation */ 34*2635Swnj #define HP_UNLOAD 002 /* offline drive */ 35*2635Swnj #define HP_SEEK 004 /* seek */ 36*2635Swnj #define HP_RECAL 006 /* recalibrate */ 37*2635Swnj #define HP_DCLR 010 /* drive clear */ 38*2635Swnj #define HP_RELEASE 012 /* release */ 39*2635Swnj #define HP_OFFSET 014 /* offset */ 40*2635Swnj #define HP_RTC 016 /* return to centerline */ 41*2635Swnj #define HP_PRESET 020 /* read-in preset */ 42*2635Swnj #define HP_PACK 022 /* pack acknowledge */ 43*2635Swnj #define HP_SEARCH 030 /* search */ 44*2635Swnj #define HP_DIAGNOSE 034 /* diagnose drive */ 45*2635Swnj #define HP_WCDATA 050 /* write check data */ 46*2635Swnj #define HP_WCHDR 052 /* write check header and data */ 47*2635Swnj #define HP_WCOM 060 /* write data */ 48*2635Swnj #define HP_WHDR 062 /* write header */ 49*2635Swnj #define HP_WTRACKD 064 /* write track descriptor */ 50*2635Swnj #define HP_RCOM 070 /* read data */ 51*2635Swnj #define HP_RHDR 072 /* read header and data */ 52*2635Swnj #define HP_RTRACKD 074 /* read track descriptor */ 53*2635Swnj 54*2635Swnj /* hpds */ 55*2635Swnj #define HP_ATA 0100000 /* attention active */ 56*2635Swnj #define HP_ERR 0040000 /* composite drive error */ 57*2635Swnj #define HP_PIP 0020000 /* positioning in progress */ 58*2635Swnj #define HP_MOL 0010000 /* medium on line */ 59*2635Swnj #define HP_WRL 0004000 /* write locked */ 60*2635Swnj #define HP_LST 0002000 /* last sector transferred */ 61*2635Swnj #define HP_PGM 0001000 /* programmable */ 62*2635Swnj #define HP_DPR 0000400 /* drive present */ 63*2635Swnj #define HP_DRY 0000200 /* drive ready */ 64*2635Swnj #define HP_VV 0000100 /* volume valid */ 65*2635Swnj /* bits 1-5 are spare */ 66*2635Swnj #define HP_OM 0000001 /* offset mode */ 67*2635Swnj 68*2635Swnj /* hper1 */ 69*2635Swnj #define HP_DCK 0100000 /* data check */ 70*2635Swnj #define HP_UNS 0040000 /* drive unsafe */ 71*2635Swnj #define HP_OPI 0020000 /* operation incomplete */ 72*2635Swnj #define HP_DTE 0010000 /* drive timing error */ 73*2635Swnj #define HP_WLE 0004000 /* write lock error */ 74*2635Swnj #define HP_IAE 0002000 /* invalid address error */ 75*2635Swnj #define HP_AOE 0001000 /* address overflow error */ 76*2635Swnj #define HP_HCRC 0000400 /* header crc error */ 77*2635Swnj #define HP_HCE 0000200 /* header compare error */ 78*2635Swnj #define HP_ECH 0000100 /* ecc hard error */ 79*2635Swnj #define HP_WCF 0000040 /* write clock fail */ 80*2635Swnj #define HP_FER 0000020 /* format error */ 81*2635Swnj #define HP_PAR 0000010 /* parity error */ 82*2635Swnj #define HP_RMR 0000004 /* register modification refused */ 83*2635Swnj #define HP_ILR 0000002 /* illegal register */ 84*2635Swnj #define HP_ILF 0000001 /* illegal function */ 85*2635Swnj 86*2635Swnj /* THIS NEEDS TO BE DOUBLE CHECKED... */ 87*2635Swnj #define HPER1_HARD (HP_UNS|HP_WLE|HP_IAE|HP_AOE|HP_FER|HP_RMR|HP_ILR|HP_ILF) 88*2635Swnj 89*2635Swnj /* hper2 */ 90*2635Swnj #define HP_BSE 0100000 /* bad sector error */ 91*2635Swnj #define HP_SKI 0040000 /* seek incomplete */ 92*2635Swnj #define HP_OPE 0020000 /* operator plug error */ 93*2635Swnj #define HP_IVC 0010000 /* invalid command */ 94*2635Swnj #define HP_LSC 0004000 /* loss of system clock */ 95*2635Swnj #define HP_LBC 0002000 /* loss of bit check */ 96*2635Swnj #define HP_DVC 0000200 /* device check */ 97*2635Swnj #define HP_DPE 0000010 /* data parity error */ 98*2635Swnj 99*2635Swnj #define HPER2_HARD (HP_BSE|HP_OPE) 100*2635Swnj 101*2635Swnj /* hpof */ 102*2635Swnj #define HP_CMO 0100000 /* command modifier */ 103*2635Swnj #define HP_MTD 0040000 /* move track descriptor */ 104*2635Swnj #define HP_FMT22 0010000 /* 16 bit format */ 105*2635Swnj #define HP_ECI 0004000 /* ecc inhibit */ 106*2635Swnj #define HP_HCI 0002000 /* header compare inhibit */ 107*2635Swnj #define HP_SSEI 0001000 /* skip sector inhibit */ 108*2635Swnj 109*2635Swnj #define HP_P400 020 /* +400 uinches */ 110*2635Swnj #define HP_M400 0220 /* -400 uinches */ 111*2635Swnj #define HP_P800 040 /* +800 uinches */ 112*2635Swnj #define HP_M800 0240 /* -800 uinches */ 113*2635Swnj #define HP_P1200 060 /* +1200 uinches */ 114*2635Swnj #define HP_M1200 0260 /* -1200 uinches */ 115