xref: /original-bsd/sys/luna68k/stand/scsivar.h (revision 3705696b)
1 /*
2  * Copyright (c) 1992 OMRON Corporation.
3  * Copyright (c) 1992, 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  * OMRON Corporation.
8  *
9  * %sccs.include.redist.c%
10  *
11  *	@(#)scsivar.h	8.1 (Berkeley) 06/10/93
12  */
13 
14 struct	scsi_softc {
15 	struct	hp_ctlr *sc_hc;
16 	u_char	*sc_buf;				/* Data Buffer Pointor*/
17 	u_char	*sc_cdb;				/* CDB Buffer Pointor */
18 	int	*sc_lock;				/* Lock Flag addres   */
19 	int	sc_flags;				/* SPC Status Flags   */
20 	int	sc_phase;				/* Current SCSI Phase */
21 	int	sc_target;				/* Current Target ID  */
22 	int	sc_len;					/* Buffer Length      */
23 	int	sc_cdblen;				/* CDB length         */
24 	u_char	sc_stat;
25 	u_char	sc_msg[7];
26 };
27 
28 
29 /* sc_lock  */
30 
31 #define	SC_IN_PROGRESS		 0
32 #define SC_IO_COMPLETE		 1
33 #define	SC_DISCONNECTED		 2
34 
35 #define	SC_IO_FAILED		-1
36 #define	SC_DEV_NOT_FOUND	-2
37 
38 /* sc_flags */
39 
40 #define	SC_SEL_TIMEOUT	0x00000001
41