xref: /dflybsd-src/sys/dev/disk/advansys/adwvar.h (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino /*
286d7f5d3SJohn Marino  * Generic driver definitions and exported functions for the Advanced
386d7f5d3SJohn Marino  * Systems Inc. Second Generation SCSI controllers
486d7f5d3SJohn Marino  *
586d7f5d3SJohn Marino  * Copyright (c) 1998, 1999, 2000 Justin Gibbs.
686d7f5d3SJohn Marino  * All rights reserved.
786d7f5d3SJohn Marino  *
886d7f5d3SJohn Marino  * Redistribution and use in source and binary forms, with or without
986d7f5d3SJohn Marino  * modification, are permitted provided that the following conditions
1086d7f5d3SJohn Marino  * are met:
1186d7f5d3SJohn Marino  * 1. Redistributions of source code must retain the above copyright
1286d7f5d3SJohn Marino  *    notice, this list of conditions, and the following disclaimer,
1386d7f5d3SJohn Marino  *    without modification.
1486d7f5d3SJohn Marino  * 2. Redistributions in binary form must reproduce the above copyright
1586d7f5d3SJohn Marino  *    notice, this list of conditions and the following disclaimer in the
1686d7f5d3SJohn Marino  *    documentation and/or other materials provided with the distribution.
1786d7f5d3SJohn Marino  * 3. The name of the author may not be used to endorse or promote products
1886d7f5d3SJohn Marino  *    derived from this software without specific prior written permission.
1986d7f5d3SJohn Marino  *
2086d7f5d3SJohn Marino  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2186d7f5d3SJohn Marino  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2286d7f5d3SJohn Marino  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2386d7f5d3SJohn Marino  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
2486d7f5d3SJohn Marino  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2586d7f5d3SJohn Marino  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2686d7f5d3SJohn Marino  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2786d7f5d3SJohn Marino  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2886d7f5d3SJohn Marino  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2986d7f5d3SJohn Marino  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3086d7f5d3SJohn Marino  * SUCH DAMAGE.
3186d7f5d3SJohn Marino  * All rights reserved.
3286d7f5d3SJohn Marino  *
3386d7f5d3SJohn Marino  * $FreeBSD: src/sys/dev/advansys/adwvar.h,v 1.3.2.1 2000/08/08 23:50:48 peter Exp $
3486d7f5d3SJohn Marino  * $DragonFly: src/sys/dev/disk/advansys/adwvar.h,v 1.3 2003/08/07 21:16:50 dillon Exp $
3586d7f5d3SJohn Marino  */
3686d7f5d3SJohn Marino 
3786d7f5d3SJohn Marino #ifndef _ADWVAR_H_
3886d7f5d3SJohn Marino #define _ADWVAR_H_
3986d7f5d3SJohn Marino 
4086d7f5d3SJohn Marino #include "adwlib.h"
4186d7f5d3SJohn Marino 
4286d7f5d3SJohn Marino struct adw_softc *	adw_alloc(device_t dev, struct resource *regs,
4386d7f5d3SJohn Marino 				  int regs_type, int regs_id);
4486d7f5d3SJohn Marino void			adw_map(void *arg, bus_dma_segment_t *segs,
4586d7f5d3SJohn Marino 				int nseg, int error);
4686d7f5d3SJohn Marino void 			adw_free(struct adw_softc *adw);
4786d7f5d3SJohn Marino int			adw_init(struct adw_softc *adw);
4886d7f5d3SJohn Marino void			adw_intr(void *arg);
4986d7f5d3SJohn Marino int			adw_attach(struct adw_softc *adw);
5086d7f5d3SJohn Marino void			adw_done(struct adw_softc *adw, union ccb* ccb,
5186d7f5d3SJohn Marino 				 u_int done_stat, u_int host_stat,
5286d7f5d3SJohn Marino 				 u_int scsi_stat, u_int q_no);
5386d7f5d3SJohn Marino timeout_t		adw_timeout;
5486d7f5d3SJohn Marino 
5586d7f5d3SJohn Marino extern u_long adw_unit;
5686d7f5d3SJohn Marino #endif /* _ADWVAR_H_ */
57