isp_freebsd.h (41522) | isp_freebsd.h (42131) |
---|---|
1/* $Id: $ */ | 1/* $Id: $ */ |
2/* isp_freebsd.h 1.16 */ | 2/* release_12_28_98_A */ |
3/* 4 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions (non CAM version) 5 *--------------------------------------- 6 * Copyright (c) 1997, 1998 by Matthew Jacob 7 * NASA/Ames Research Center 8 * All rights reserved. 9 *--------------------------------------- 10 * --- 20 unchanged lines hidden (view full) --- 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#ifndef _ISP_FREEBSD_H 36#define _ISP_FREEBSD_H 37 38#define ISP_PLATFORM_VERSION_MAJOR 0 | 3/* 4 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions (non CAM version) 5 *--------------------------------------- 6 * Copyright (c) 1997, 1998 by Matthew Jacob 7 * NASA/Ames Research Center 8 * All rights reserved. 9 *--------------------------------------- 10 * --- 20 unchanged lines hidden (view full) --- 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#ifndef _ISP_FREEBSD_H 36#define _ISP_FREEBSD_H 37 38#define ISP_PLATFORM_VERSION_MAJOR 0 |
39#define ISP_PLATFORM_VERSION_MINOR 97 | 39#define ISP_PLATFORM_VERSION_MINOR 98 |
40 41#include <sys/param.h> 42 43#ifndef __FreeBSD_version 44#define __FreeBSD_version 226000 45#endif 46 47#if __FreeBSD_version >= 300004 --- 28 unchanged lines hidden (view full) --- 76#include <dev/isp/ispvar.h> 77#include <dev/isp/ispmbox.h> 78 79#define PRINTF printf 80#define IDPRINTF(lev, x) if (isp->isp_dblev >= lev) printf x 81#define DFLT_DBLEVEL 1 82 83#define ISP_LOCKVAL_DECL int isp_spl_save | 40 41#include <sys/param.h> 42 43#ifndef __FreeBSD_version 44#define __FreeBSD_version 226000 45#endif 46 47#if __FreeBSD_version >= 300004 --- 28 unchanged lines hidden (view full) --- 76#include <dev/isp/ispvar.h> 77#include <dev/isp/ispmbox.h> 78 79#define PRINTF printf 80#define IDPRINTF(lev, x) if (isp->isp_dblev >= lev) printf x 81#define DFLT_DBLEVEL 1 82 83#define ISP_LOCKVAL_DECL int isp_spl_save |
84#define ISP_ILOCKVAL_DECL ISP_LOCKVAL_DECL |
|
84#define ISP_UNLOCK(isp) (void) splx(isp_spl_save) 85#define ISP_LOCK(isp) isp_spl_save = splbio() 86#define ISP_ILOCK(isp) ISP_LOCK(isp) 87#define ISP_IUNLOCK(isp) ISP_UNLOCK(isp) 88#define IMASK bio_imask 89 90#define XS_NULL(xs) xs == NULL || xs->sc_link == NULL 91#define XS_ISP(xs) \ --- 34 unchanged lines hidden (view full) --- 126/* 127 * We decide whether to use tags based upon whether we're polling. 128 */ 129#define XS_CANTAG(xs) (((xs)->flags & SCSI_NOMASK) != 0) 130 131/* 132 * Our default tag 133 */ | 85#define ISP_UNLOCK(isp) (void) splx(isp_spl_save) 86#define ISP_LOCK(isp) isp_spl_save = splbio() 87#define ISP_ILOCK(isp) ISP_LOCK(isp) 88#define ISP_IUNLOCK(isp) ISP_UNLOCK(isp) 89#define IMASK bio_imask 90 91#define XS_NULL(xs) xs == NULL || xs->sc_link == NULL 92#define XS_ISP(xs) \ --- 34 unchanged lines hidden (view full) --- 127/* 128 * We decide whether to use tags based upon whether we're polling. 129 */ 130#define XS_CANTAG(xs) (((xs)->flags & SCSI_NOMASK) != 0) 131 132/* 133 * Our default tag 134 */ |
134#define XS_KINDOF_TAG(xs) REQFLAG_OTAG | 135#define XS_KINDOF_TAG(xs) REQFLAG_STAG |
135 136 137#define CMD_COMPLETE COMPLETE 138#define CMD_EAGAIN TRY_AGAIN_LATER 139#define CMD_QUEUED SUCCESSFULLY_QUEUED 140 | 136 137 138#define CMD_COMPLETE COMPLETE 139#define CMD_EAGAIN TRY_AGAIN_LATER 140#define CMD_QUEUED SUCCESSFULLY_QUEUED 141 |
141 142 | |
143#define isp_name isp_osinfo.name 144 | 142#define isp_name isp_osinfo.name 143 |
145 | |
146#define SYS_DELAY(x) DELAY(x) 147 148#define WATCH_INTERVAL 30 149#if __FreeBSD_version >= 300001 150#define START_WATCHDOG(f, s) \ 151 (s)->isp_osinfo.watchid = timeout(f, s, WATCH_INTERVAL * hz), \ 152 s->isp_dogactive = 1 153#define STOP_WATCHDOG(f, s) untimeout(f, s, (s)->isp_osinfo.watchid),\ 154 (s)->isp_dogactive = 0 155#else 156#define START_WATCHDOG(f, s) \ 157 timeout(f, s, WATCH_INTERVAL * hz), s->isp_dogactive = 1 158#define STOP_WATCHDOG(f, s) untimeout(f, s), (s)->isp_dogactive = 0 159#endif 160 161#define RESTART_WATCHDOG(f, s) START_WATCHDOG(f, s) 162extern void isp_attach __P((struct ispsoftc *)); | 144#define SYS_DELAY(x) DELAY(x) 145 146#define WATCH_INTERVAL 30 147#if __FreeBSD_version >= 300001 148#define START_WATCHDOG(f, s) \ 149 (s)->isp_osinfo.watchid = timeout(f, s, WATCH_INTERVAL * hz), \ 150 s->isp_dogactive = 1 151#define STOP_WATCHDOG(f, s) untimeout(f, s, (s)->isp_osinfo.watchid),\ 152 (s)->isp_dogactive = 0 153#else 154#define START_WATCHDOG(f, s) \ 155 timeout(f, s, WATCH_INTERVAL * hz), s->isp_dogactive = 1 156#define STOP_WATCHDOG(f, s) untimeout(f, s), (s)->isp_dogactive = 0 157#endif 158 159#define RESTART_WATCHDOG(f, s) START_WATCHDOG(f, s) 160extern void isp_attach __P((struct ispsoftc *)); |
161extern void isp_uninit __P((struct ispsoftc *)); |
|
163 164#define PVS "Qlogic ISP Driver, FreeBSD Non-Cam" 165 166#endif /* __FreeBSD_version >= 300004 */ 167#endif /* _ISP_FREEBSD_H */ | 162 163#define PVS "Qlogic ISP Driver, FreeBSD Non-Cam" 164 165#endif /* __FreeBSD_version >= 300004 */ 166#endif /* _ISP_FREEBSD_H */ |