1 /* 2 * Copyright (c) 1990, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Van Jacobson of Lawrence Berkeley Laboratory. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)scsivar.h 8.1 (Berkeley) 06/10/93 11 */ 12 13 14 struct scsi_queue { 15 struct scsi_queue *dq_forw; 16 struct scsi_queue *dq_back; 17 int dq_ctlr; 18 int dq_unit; 19 int dq_slave; 20 struct driver *dq_driver; 21 int dq_flags; 22 int dq_imax; 23 int dq_imin; 24 int dq_omax; 25 int dq_omin; 26 struct scsi_fmt_cdb *dq_cdb; 27 struct buf *dq_bp; 28 u_char *dq_xferp; /* Current Pointor */ 29 int dq_xfercnt; /* Data Counter */ 30 }; 31 32 /* dq_flags */ 33 34 #define DQ_DISCONNECT 0x00000001 35 36 struct scsi_softc { 37 struct hp_ctlr *sc_hc; 38 struct scsi_queue sc_sq; 39 struct scsi_queue sc_wq; 40 u_char *sc_cdb; /* CDB Buffer Pointor */ 41 u_char *sc_buf; /* Data Buffer Pointor*/ 42 int *sc_lock; /* Lock Flag addres */ 43 int sc_flags; /* SPC Status Flags */ 44 int sc_phase; /* Current SCSI Phase */ 45 int sc_cdblen; /* CDB length */ 46 int sc_len; /* Buffer Length */ 47 u_char sc_stat; 48 u_char sc_msg[7]; 49 }; 50 51 52 /* sc_lock */ 53 54 #define SC_IN_PROGRESS 0 55 #define SC_IO_COMPLETE 1 56 #define SC_DISCONNECTED 2 57 58 #define SC_BUSY -1 59 #define SC_IO_FAILED -2 60 #define SC_DEV_NOT_FOUND -3 61 #define SC_IO_TIMEOUT -4 62 63 /* sc_flags */ 64 65 #define SC_SEL_TIMEOUT 0x00000001 66