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) |
4 * Copyright (c) 1997, 1998, 1999, 2000 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 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. |
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; |
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; |
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(); |
315 if (isp->isp_osinfo.islocked++ == 0) { |
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{ |
326 if (--isp->isp_osinfo.islocked == 0) { |
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 --- |