xref: /original-bsd/sys/hp300/dev/acvar.h (revision 9639f1d4)
1 /*
2  * Copyright (c) 1991 University of Utah.
3  * Copyright (c) 1990, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department.
9  *
10  * %sccs.include.redist.c%
11  *
12  * from: Utah $Hdr: acvar.h 1.1 91/06/19$
13  *
14  *	@(#)acvar.h	8.1 (Berkeley) 06/10/93
15  */
16 
17 struct	ac_softc {
18 	struct	hp_device *sc_hd;
19 	int	sc_flags;
20 	struct	buf *sc_bp;
21 	struct	scsi_fmt_cdb *sc_cmd;
22 	struct	acinfo sc_einfo;
23 	short	sc_punit;
24 	short	sc_picker;
25 	struct	devqueue sc_dq;
26 };
27 
28 #define	ACF_ALIVE	0x01
29 #define ACF_OPEN	0x02
30 #define ACF_ACTIVE	0x04
31 
32 #define ACCMD_INITES	0x07
33 #define	ACCMD_MODESENSE	0x1A
34 #define ACCMD_READES	0xB8
35 #define ACCMD_MOVEM	0xA5
36 
37 struct	ac_restathdr {
38 	short	ac_felt;	/* first element reported */
39 	short	ac_nelt;	/* number of elements reported */
40 	long	ac_bcount;	/* length of report (really only 24 bits) */
41 };
42 
43 struct	ac_restatphdr {
44 	char	ac_type;	/* type code */
45 	char	ac_res;
46 	short	ac_dlen;	/* element descriptor length */
47 	long	ac_bcount;	/* byte count (really only 24 bits) */
48 };
49 
50 struct	ac_restatdb {
51 	short	ac_eaddr;	/* element address */
52 	u_int	ac_res1:2,
53 		ac_ie:1,	/* import enabled (IEE only) */
54 		ac_ee:1,	/* export enabled (IEE only) */
55 		ac_acc:1,	/* accessible from MTE */
56 		ac_exc:1,	/* element in abnormal state */
57 		ac_imp:1,	/* 1 == user inserted medium (IEE only) */
58 		ac_full:1;	/* element contains media */
59 };
60