1 /* $NetBSD: hpreg.h,v 1.4 1996/02/11 13:19:35 ragge Exp $ */ 2 /* 3 * Copyright (c) 1994 Ludd, University of Lule}, Sweden. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed at Ludd, University of Lule}. 17 * 4. The name of the author may not be used to endorse or promote products 18 * derived from this software without specific prior written permission 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 struct hp_regs { 33 int hp_cs1; 34 int hp_ds; 35 int hp_er1; 36 int hp_mr1; 37 int hp_as; 38 int hp_da; 39 int hp_dt; 40 int hp_la; 41 int hp_sn; 42 int hp_of; 43 int hp_dc; 44 int hp_hr; 45 int hp_mr2; 46 int hp_er2; 47 int hp_ec1; 48 int hp_ec2; 49 int utrymme[16]; 50 }; 51 52 #define hp_drv hp_regs 53 54 #define HPCS_DVA 4000 /* Drive avail, in dual-port config */ 55 #define HPCS_WRITE 061 /* Write data */ 56 #define HPCS_WCHECK 051 /* Write check data */ 57 #define HPCS_WHEAD 063 /* Write header and data */ 58 #define HPCS_WCHEAD 053 /* Write check header and data */ 59 #define HPCS_READ 071 /* Read data */ 60 #define HPCS_RHEAD 073 /* Read header and data */ 61 #define HPCS_SEEK 005 /* Just seek */ 62 #define HPCS_RECAL 007 /* Recalibrate */ 63 #define HPCS_RTC 017 /* Return to centerline */ 64 #define HPCS_OFFSET 015 /* Offset */ 65 #define HPCS_SEARCH 031 /* Search */ 66 #define HPCS_UNLOAD 003 /* Unload pack (removable) */ 67 #define HPCS_RELEASE 013 /* Release massbuss port */ 68 #define HPCS_RPS 021 /* Read-in preset */ 69 #define HPCS_PA 023 /* Pack acknowledge */ 70 #define HPCS_DC 011 /* Drive clear */ 71 72 73 #define HPDS_VV 0x40 /* Volume valid, not changed */ 74 #define HPDS_DRY 0x80 /* Drive ready to accept commands */ 75 #define HPDS_DPR 0x100 /* Drive present */ 76 #define HPDS_PGM 0x200 /* Programmable in dual-port config */ 77 #define HPDS_LBT 0x400 /* Last block transferred */ 78 #define HPDS_WRL 0x800 /* Write locked media */ 79 #define HPDS_MOL 0x1000 /* Medium on-line */ 80 #define HPDS_PIP 0x2000 /* Positioning in progress */ 81 #define HPDS_ERR 0x4000 /* ORed error bit, something wrong */ 82 #define HPDS_ATA 0x8000 /* Attention drive */ 83 84 #define HPDT_DRQ 0x800 /* Dual-port disk */ 85 86 #define HPOF_FMT 0x1000 /* 16/18 bit data */ 87 88 /* 89 * Error registers. The defines are the corresponding bit number 90 * in the error register, instead of a bit mask. 91 * Use (1<<HPER1_FOO) when touching registers. 92 */ 93 #define HPER1_ILF 0 /* Illegal function */ 94 #define HPER1_ILR 1 /* Illegal register */ 95 #define HPER1_RMR 2 /* Register modification refused */ 96 #define HPER1_PAR 3 /* Parity error */ 97 #define HPER1_FER 4 /* Format error */ 98 #define HPER1_WCF 5 /* Write clock failed */ 99 #define HPER1_ECH 6 /* ECC hard error */ 100 #define HPER1_HCE 7 /* Header compare error */ 101 #define HPER1_HCRC 8 /* Header CRC error */ 102 #define HPER1_AOE 9 /* Address overflow error */ 103 #define HPER1_IAE 10 /* Invalid address error */ 104 #define HPER1_WLE 11 /* Write lock error */ 105 #define HPER1_DTE 12 /* Drive timing error */ 106 #define HPER1_OPI 13 /* Operation incomplete */ 107 #define HPER1_UNS 14 /* Unsafe drive */ 108 #define HPER1_DCK 15 /* Data check error */ 109