Deleted Added
full compact
isp_freebsd.h (92739) isp_freebsd.h (93706)
1/* $FreeBSD: head/sys/dev/isp/isp_freebsd.h 92739 2002-03-20 02:08:01Z alfred $ */
1/* $FreeBSD: head/sys/dev/isp/isp_freebsd.h 93706 2002-04-02 23:36:14Z mjacob $ */
2/*
3 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions
4 * Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

--- 48 unchanged lines hidden (view full) ---

58#include <cam/scsi/scsi_all.h>
59#include <cam/scsi/scsi_message.h>
60
61#include "opt_ddb.h"
62#include "opt_isp.h"
63/*
64 * Efficiency- get rid of SBus code && tests unless we need them.
65 */
2/*
3 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions
4 * Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

--- 48 unchanged lines hidden (view full) ---

58#include <cam/scsi/scsi_all.h>
59#include <cam/scsi/scsi_message.h>
60
61#include "opt_ddb.h"
62#include "opt_isp.h"
63/*
64 * Efficiency- get rid of SBus code && tests unless we need them.
65 */
66#if defined(__sparcv9__ ) || defined(__sparc__)
66#if _MACHINE_ARCH == sparc64
67#define ISP_SBUS_SUPPORTED 1
68#else
69#define ISP_SBUS_SUPPORTED 0
70#endif
71
72#define HANDLE_LOOPSTATE_IN_OUTER_LAYERS 1
73
74typedef void ispfwfunc(int, int, int, u_int16_t **);

--- 37 unchanged lines hidden (view full) ---

112 struct intr_config_hook ehook;
113 u_int8_t mboxwaiting;
114 u_int8_t simqfrozen;
115 u_int8_t drain;
116 u_int8_t intsok;
117 struct mtx lock;
118 struct cv kthread_cv;
119 struct proc *kproc;
67#define ISP_SBUS_SUPPORTED 1
68#else
69#define ISP_SBUS_SUPPORTED 0
70#endif
71
72#define HANDLE_LOOPSTATE_IN_OUTER_LAYERS 1
73
74typedef void ispfwfunc(int, int, int, u_int16_t **);

--- 37 unchanged lines hidden (view full) ---

112 struct intr_config_hook ehook;
113 u_int8_t mboxwaiting;
114 u_int8_t simqfrozen;
115 u_int8_t drain;
116 u_int8_t intsok;
117 struct mtx lock;
118 struct cv kthread_cv;
119 struct proc *kproc;
120 bus_dma_tag_t cdmat;
121 bus_dmamap_t cdmap;
122#define isp_cdmat isp_osinfo.cdmat
123#define isp_cdmap isp_osinfo.cdmap
120#ifdef ISP_TARGET_MODE
121#define TM_WANTED 0x80
122#define TM_BUSY 0x40
123#define TM_WILDCARD_ENABLED 0x02
124#define TM_TMODE_ENABLED 0x01
125 struct cv tgtcv0[2]; /* two busses */
126 struct cv tgtcv1[2]; /* two busses */
127 u_int8_t tmflags[2]; /* two busses */

--- 40 unchanged lines hidden (view full) ---

168
169#define NANOTIME_T struct timespec
170#define GET_NANOTIME nanotime
171#define GET_NANOSEC(x) ((x)->tv_sec * 1000000000 + (x)->tv_nsec)
172#define NANOTIME_SUB nanotime_sub
173
174#define MAXISPREQUEST(isp) 256
175
124#ifdef ISP_TARGET_MODE
125#define TM_WANTED 0x80
126#define TM_BUSY 0x40
127#define TM_WILDCARD_ENABLED 0x02
128#define TM_TMODE_ENABLED 0x01
129 struct cv tgtcv0[2]; /* two busses */
130 struct cv tgtcv1[2]; /* two busses */
131 u_int8_t tmflags[2]; /* two busses */

--- 40 unchanged lines hidden (view full) ---

172
173#define NANOTIME_T struct timespec
174#define GET_NANOTIME nanotime
175#define GET_NANOSEC(x) ((x)->tv_sec * 1000000000 + (x)->tv_nsec)
176#define NANOTIME_SUB nanotime_sub
177
178#define MAXISPREQUEST(isp) 256
179
176#if defined(__alpha__)
177#define MEMORYBARRIER(isp, type, offset, size) alpha_mb()
178#elif defined(__ia64__)
179#define MEMORYBARRIER(isp, type, offset, size) \
180 do { ia64_mf(); ia64_mf_a(); } while (0)
181#else
182#define MEMORYBARRIER(isp, type, offset, size)
183#endif
180#define MEMORYBARRIER(isp, type, offset, size) \
181switch (type) { \
182case SYNC_SFORDEV: \
183case SYNC_REQUEST: \
184 bus_dmamap_sync(isp->isp_cdmat, isp->isp_cdmap, \
185 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); \
186 break; \
187case SYNC_SFORCPU: \
188case SYNC_RESULT: \
189 bus_dmamap_sync(isp->isp_cdmat, isp->isp_cdmap, \
190 BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); \
191 break; \
192default: \
193 break; \
194}
184
185#define MBOX_ACQUIRE(isp)
186#define MBOX_WAIT_COMPLETE isp_mbox_wait_complete
187#define MBOX_NOTIFY_COMPLETE(isp) \
188 if (isp->isp_osinfo.mboxwaiting) { \
189 isp->isp_osinfo.mboxwaiting = 0; \
190 wakeup(&isp->isp_osinfo.mboxwaiting); \
191 } \

--- 250 unchanged lines hidden ---
195
196#define MBOX_ACQUIRE(isp)
197#define MBOX_WAIT_COMPLETE isp_mbox_wait_complete
198#define MBOX_NOTIFY_COMPLETE(isp) \
199 if (isp->isp_osinfo.mboxwaiting) { \
200 isp->isp_osinfo.mboxwaiting = 0; \
201 wakeup(&isp->isp_osinfo.mboxwaiting); \
202 } \

--- 250 unchanged lines hidden ---