Deleted Added
full compact
isp_freebsd.h (64092) isp_freebsd.h (65140)
1/* $FreeBSD: head/sys/dev/isp/isp_freebsd.h 64092 2000-08-01 06:29:55Z mjacob $ */
1/* $FreeBSD: head/sys/dev/isp/isp_freebsd.h 65140 2000-08-27 23:38:44Z mjacob $ */
2/*
3 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions (CAM version)
2/*
3 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions (CAM version)
4 *---------------------------------------
5 * Copyright (c) 1997, 1998, 1999 by Matthew Jacob
6 * NASA/Ames Research Center
7 * All rights reserved.
8 *---------------------------------------
4 * Copyright (c) 1997, 1998, 1999, 2000 by Matthew Jacob
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice immediately at the beginning of the file, without modification,
15 * 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.
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
10 * notice immediately at the beginning of the file, without modification,
11 * this list of conditions, and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
19 * 3. The name of the author may not be used to endorse or promote products
20 * derived from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

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

94 u_int64_t default_wwn;
95 char name[8];
96 int unit;
97 struct cam_sim *sim;
98 struct cam_path *path;
99 struct cam_sim *sim2;
100 struct cam_path *path2;
101 struct intr_config_hook ehook;
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

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

88 u_int64_t default_wwn;
89 char name[8];
90 int unit;
91 struct cam_sim *sim;
92 struct cam_path *path;
93 struct cam_sim *sim2;
94 struct cam_path *path2;
95 struct intr_config_hook ehook;
102 volatile u_int16_t : 14,
103 islocked : 1,
104 intsok : 1;
105 u_int8_t mboxwaiting;
106 u_int8_t simqfrozen;
96 u_int8_t mboxwaiting;
97 u_int8_t simqfrozen;
98 u_int8_t drain;
99#ifdef SERVICING_INTERRUPT
100 u_int8_t intsok;
101#else
102 u_int8_t padding;
103#endif
104 volatile u_int32_t islocked;
107 int splsaved;
108#ifdef ISP_TARGET_MODE
109#define TM_WANTED 0x01
110#define TM_BUSY 0x02
111#define TM_TMODE_ENABLED 0x80
112 u_int8_t tmflags;
113 u_int8_t rstatus;
114 u_int16_t rollinfo;

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

309 * Platform specific inline functions
310 */
311
312static INLINE void isp_lock(struct ispsoftc *);
313static INLINE void
314isp_lock(struct ispsoftc *isp)
315{
316 int s = splcam();
105 int splsaved;
106#ifdef ISP_TARGET_MODE
107#define TM_WANTED 0x01
108#define TM_BUSY 0x02
109#define TM_TMODE_ENABLED 0x80
110 u_int8_t tmflags;
111 u_int8_t rstatus;
112 u_int16_t rollinfo;

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

307 * Platform specific inline functions
308 */
309
310static INLINE void isp_lock(struct ispsoftc *);
311static INLINE void
312isp_lock(struct ispsoftc *isp)
313{
314 int s = splcam();
317 if (isp->isp_osinfo.islocked == 0) {
318 isp->isp_osinfo.islocked = 1;
315 if (isp->isp_osinfo.islocked++ == 0) {
319 isp->isp_osinfo.splsaved = s;
320 } else {
321 splx(s);
322 }
323}
324
325static INLINE void isp_unlock(struct ispsoftc *);
326static INLINE void
327isp_unlock(struct ispsoftc *isp)
328{
316 isp->isp_osinfo.splsaved = s;
317 } else {
318 splx(s);
319 }
320}
321
322static INLINE void isp_unlock(struct ispsoftc *);
323static INLINE void
324isp_unlock(struct ispsoftc *isp)
325{
329 if (isp->isp_osinfo.islocked) {
330 isp->isp_osinfo.islocked = 0;
326 if (--isp->isp_osinfo.islocked == 0) {
331 splx(isp->isp_osinfo.splsaved);
332 }
333}
334
335static INLINE void isp_mbox_wait_complete(struct ispsoftc *);
336static INLINE void
337isp_mbox_wait_complete(struct ispsoftc *isp)
338{

--- 87 unchanged lines hidden ---
327 splx(isp->isp_osinfo.splsaved);
328 }
329}
330
331static INLINE void isp_mbox_wait_complete(struct ispsoftc *);
332static INLINE void
333isp_mbox_wait_complete(struct ispsoftc *isp)
334{

--- 87 unchanged lines hidden ---