1 /* $NetBSD: hpreg.h,v 1.4 1996/02/11 13:19:35 ragge Exp $ */
3 * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
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
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.
71 #define HPCS_DVA 4000 /* Drive avail, in dual-port config */
72 #define HPCS_WRITE 061 /* Write data */
73 #define HPCS_WCHECK 051 /* Write check data */
74 #define HPCS_WHEAD 063 /* Write header and data */
75 #define HPCS_WCHEAD 053 /* Write check header and data */
76 #define HPCS_READ 071 /* Read data */
77 #define HPCS_RHEAD 073 /* Read header and data */
78 #define HPCS_SEEK 005 /* Just seek */
79 #define HPCS_RECAL 007 /* Recalibrate */
80 #define HPCS_RTC 017 /* Return to centerline */
81 #define HPCS_OFFSET 015 /* Offset */
82 #define HPCS_SEARCH 031 /* Search */
83 #define HPCS_UNLOAD 003 /* Unload pack (removable) */
84 #define HPCS_RELEASE 013 /* Release massbuss port */
85 #define HPCS_RPS 021 /* Read-in preset */
86 #define HPCS_PA 023 /* Pack acknowledge */
87 #define HPCS_DC 011 /* Drive clear */
90 #define HPDS_VV 0x40 /* Volume valid, not changed */
91 #define HPDS_DRY 0x80 /* Drive ready to accept commands */
92 #define HPDS_DPR 0x100 /* Drive present */
93 #define HPDS_PGM 0x200 /* Programmable in dual-port config */
94 #define HPDS_LBT 0x400 /* Last block transferred */
95 #define HPDS_WRL 0x800 /* Write locked media */
96 #define HPDS_MOL 0x1000 /* Medium on-line */
97 #define HPDS_PIP 0x2000 /* Positioning in progress */
98 #define HPDS_ERR 0x4000 /* ORed error bit, something wrong */
99 #define HPDS_ATA 0x8000 /* Attention drive */
101 #define HPDT_DRQ 0x800 /* Dual-port disk */
103 #define HPOF_FMT 0x1000 /* 16/18 bit data */
106 * Error registers. The defines are the corresponding bit number
107 * in the error register, instead of a bit mask.
108 * Use (1<<HPER1_FOO) when touching registers.
110 #define HPER1_ILF 0 /* Illegal function */
111 #define HPER1_ILR 1 /* Illegal register */
112 #define HPER1_RMR 2 /* Register modification refused */
113 #define HPER1_PAR 3 /* Parity error */
114 #define HPER1_FER 4 /* Format error */
115 #define HPER1_WCF 5 /* Write clock failed */
116 #define HPER1_ECH 6 /* ECC hard error */
117 #define HPER1_HCE 7 /* Header compare error */
118 #define HPER1_HCRC 8 /* Header CRC error */
119 #define HPER1_AOE 9 /* Address overflow error */
120 #define HPER1_IAE 10 /* Invalid address error */
121 #define HPER1_WLE 11 /* Write lock error */
122 #define HPER1_DTE 12 /* Drive timing error */
123 #define HPER1_OPI 13 /* Operation incomplete */
124 #define HPER1_UNS 14 /* Unsafe drive */
125 #define HPER1_DCK 15 /* Data check error */