1 /* $NetBSD: scsivar.h,v 1.4 2005/12/11 12:17:19 christos Exp $ */ 2 3 /* 4 * Copyright (c) 1982, 1990, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Van Jacobson of Lawrence Berkeley Laboratory and the Systems 9 * Programming Group of the University of Utah Computer Science Department. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 3. Neither the name of the University nor the names of its contributors 20 * may be used to endorse or promote products derived from this software 21 * without specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)scsivar.h 8.1 (Berkeley) 6/10/93 36 */ 37 38 struct scsi_softc { 39 int sc_ba; 40 char *sc_addr; 41 char sc_alive; 42 char sc_scsi_addr; 43 char sc_stat; 44 char sc_msg[7]; 45 }; 46 47 extern struct scsi_softc scsi_softc[]; 48 49 void scsiinit(void); 50 int scsialive(int); 51 void scsiabort(struct scsi_softc *, volatile struct scsidevice *); 52 int scsi_test_unit_rdy(int, int); 53 int scsi_request_sense(int, int, u_char *, unsigned int); 54 int scsi_read_capacity(int, int, u_char *, unsigned int); 55 int scsi_tt_read(int, int, u_char *, u_int, daddr_t, u_int); 56 int scsi_tt_write(int, int, u_char *, u_int, daddr_t, u_int); 57