xref: /csrg-svn/sys/hp300/dev/acvar.h (revision 63151)
153931Shibler /*
253931Shibler  * Copyright (c) 1991 University of Utah.
3*63151Sbostic  * Copyright (c) 1990, 1993
4*63151Sbostic  *	The Regents of the University of California.  All rights reserved.
553931Shibler  *
653931Shibler  * This code is derived from software contributed to Berkeley by
753931Shibler  * the Systems Programming Group of the University of Utah Computer
853931Shibler  * Science Department.
953931Shibler  *
1053931Shibler  * %sccs.include.redist.c%
1153931Shibler  *
1253931Shibler  * from: Utah $Hdr: acvar.h 1.1 91/06/19$
1353931Shibler  *
14*63151Sbostic  *	@(#)acvar.h	8.1 (Berkeley) 06/10/93
1553931Shibler  */
1653931Shibler 
1753931Shibler struct	ac_softc {
1853931Shibler 	struct	hp_device *sc_hd;
1953931Shibler 	int	sc_flags;
2053931Shibler 	struct	buf *sc_bp;
2153931Shibler 	struct	scsi_fmt_cdb *sc_cmd;
2253931Shibler 	struct	acinfo sc_einfo;
2353931Shibler 	short	sc_punit;
2453931Shibler 	short	sc_picker;
2553931Shibler 	struct	devqueue sc_dq;
2653931Shibler };
2753931Shibler 
2853931Shibler #define	ACF_ALIVE	0x01
2953931Shibler #define ACF_OPEN	0x02
3053931Shibler #define ACF_ACTIVE	0x04
3153931Shibler 
3253931Shibler #define ACCMD_INITES	0x07
3353931Shibler #define	ACCMD_MODESENSE	0x1A
3453931Shibler #define ACCMD_READES	0xB8
3553931Shibler #define ACCMD_MOVEM	0xA5
3653931Shibler 
3753931Shibler struct	ac_restathdr {
3853931Shibler 	short	ac_felt;	/* first element reported */
3953931Shibler 	short	ac_nelt;	/* number of elements reported */
4053931Shibler 	long	ac_bcount;	/* length of report (really only 24 bits) */
4153931Shibler };
4253931Shibler 
4353931Shibler struct	ac_restatphdr {
4453931Shibler 	char	ac_type;	/* type code */
4553931Shibler 	char	ac_res;
4653931Shibler 	short	ac_dlen;	/* element descriptor length */
4753931Shibler 	long	ac_bcount;	/* byte count (really only 24 bits) */
4853931Shibler };
4953931Shibler 
5053931Shibler struct	ac_restatdb {
5153931Shibler 	short	ac_eaddr;	/* element address */
5253931Shibler 	u_int	ac_res1:2,
5353931Shibler 		ac_ie:1,	/* import enabled (IEE only) */
5453931Shibler 		ac_ee:1,	/* export enabled (IEE only) */
5553931Shibler 		ac_acc:1,	/* accessible from MTE */
5653931Shibler 		ac_exc:1,	/* element in abnormal state */
5753931Shibler 		ac_imp:1,	/* 1 == user inserted medium (IEE only) */
5853931Shibler 		ac_full:1;	/* element contains media */
5953931Shibler };
60