ispvar.h (48602) | ispvar.h (49909) |
---|---|
1/* $Id: ispvar.h,v 1.16 1999/07/02 22:46:31 mjacob Exp $ */ 2/* release_6_5_99 */ | 1/* $Id: ispvar.h,v 1.17 1999/07/05 20:42:08 mjacob Exp $ */ |
3/* 4 * Soft Definitions for for Qlogic ISP SCSI adapters. 5 * 6 *--------------------------------------- 7 * Copyright (c) 1997, 1998, 1999 by Matthew Jacob 8 * NASA/Ames Research Center 9 * All rights reserved. 10 *--------------------------------------- --- 52 unchanged lines hidden (view full) --- 63 void (*dv_dmaclr) 64 __P((struct ispsoftc *, ISP_SCSI_XFER_T *, u_int32_t)); 65 void (*dv_reset0) __P((struct ispsoftc *)); 66 void (*dv_reset1) __P((struct ispsoftc *)); 67 void (*dv_dregs) __P((struct ispsoftc *)); 68 const u_int16_t *dv_ispfw; /* ptr to f/w */ 69 u_int16_t dv_fwlen; /* length of f/w */ 70 u_int16_t dv_codeorg; /* code ORG for f/w */ | 2/* 3 * Soft Definitions for for Qlogic ISP SCSI adapters. 4 * 5 *--------------------------------------- 6 * Copyright (c) 1997, 1998, 1999 by Matthew Jacob 7 * NASA/Ames Research Center 8 * All rights reserved. 9 *--------------------------------------- --- 52 unchanged lines hidden (view full) --- 62 void (*dv_dmaclr) 63 __P((struct ispsoftc *, ISP_SCSI_XFER_T *, u_int32_t)); 64 void (*dv_reset0) __P((struct ispsoftc *)); 65 void (*dv_reset1) __P((struct ispsoftc *)); 66 void (*dv_dregs) __P((struct ispsoftc *)); 67 const u_int16_t *dv_ispfw; /* ptr to f/w */ 68 u_int16_t dv_fwlen; /* length of f/w */ 69 u_int16_t dv_codeorg; /* code ORG for f/w */ |
71 u_int16_t dv_fwrev; /* f/w revision */ | 70 u_int32_t dv_fwrev; /* f/w revision */ |
72 /* 73 * Initial values for conf1 register 74 */ 75 u_int16_t dv_conf1; 76 u_int16_t dv_clock; /* clock frequency */ 77}; 78 79#define MAX_TARGETS 16 80#ifdef ISP2100_FABRIC 81#define MAX_FC_TARG 256 82#else 83#define MAX_FC_TARG 126 84#endif 85 | 71 /* 72 * Initial values for conf1 register 73 */ 74 u_int16_t dv_conf1; 75 u_int16_t dv_clock; /* clock frequency */ 76}; 77 78#define MAX_TARGETS 16 79#ifdef ISP2100_FABRIC 80#define MAX_FC_TARG 256 81#else 82#define MAX_FC_TARG 126 83#endif 84 |
85#define ISP_MAX_TARGETS(isp) (IS_FC(isp)? MAX_FC_TARG : MAX_TARGETS) 86#ifdef ISP2100_SCCLUN 87#define _ISP_FC_LUN(isp) 65536 88#else 89#define _ISP_FC_LUN(isp) 16 90#endif 91#define _ISP_SCSI_LUN(isp) \ 92 ((ISP_FW_REVX(isp->isp_fwrev) >= ISP_FW_REV(7, 55, 0))? 32 : 8) 93#define ISP_MAX_LUNS(isp) \ 94 (IS_FC(isp)? _ISP_FC_LUN(isp) : _ISP_SCSI_LUN(isp)) 95 |
|
86/* queue length must be a power of two */ 87#define QENTRY_LEN 64 88#define RQUEST_QUEUE_LEN MAXISPREQUEST 89#define RESULT_QUEUE_LEN (MAXISPREQUEST/2) 90#define ISP_QUEUE_ENTRY(q, idx) ((q) + ((idx) * QENTRY_LEN)) 91#define ISP_QUEUE_SIZE(n) ((n) * QENTRY_LEN) 92#define ISP_NXT_QENTRY(idx, qlen) (((idx) + 1) & ((qlen)-1)) 93#define ISP_QAVAIL(in, out, qlen) \ --- 254 unchanged lines hidden (view full) --- 348 * It is left undefined (for now) how pools of commands are managed. 349 */ 350 void (*isp_tmd_newcmd) __P((void *, tmd_cmd_t *)); 351 void (*isp_tmd_event) __P((void *, int)); 352 void (*isp_tmd_notify) __P((void *, tmd_notify_t *)); 353#endif 354}; 355 | 96/* queue length must be a power of two */ 97#define QENTRY_LEN 64 98#define RQUEST_QUEUE_LEN MAXISPREQUEST 99#define RESULT_QUEUE_LEN (MAXISPREQUEST/2) 100#define ISP_QUEUE_ENTRY(q, idx) ((q) + ((idx) * QENTRY_LEN)) 101#define ISP_QUEUE_SIZE(n) ((n) * QENTRY_LEN) 102#define ISP_NXT_QENTRY(idx, qlen) (((idx) + 1) & ((qlen)-1)) 103#define ISP_QAVAIL(in, out, qlen) \ --- 254 unchanged lines hidden (view full) --- 358 * It is left undefined (for now) how pools of commands are managed. 359 */ 360 void (*isp_tmd_newcmd) __P((void *, tmd_cmd_t *)); 361 void (*isp_tmd_event) __P((void *, int)); 362 void (*isp_tmd_notify) __P((void *, tmd_notify_t *)); 363#endif 364}; 365 |
366#define SDPARAM(isp) ((sdparam *) (isp)->isp_param) 367#define FCPARAM(isp) ((fcparam *) (isp)->isp_param) 368 |
|
356/* 357 * ISP States 358 */ 359#define ISP_NILSTATE 0 360#define ISP_RESETSTATE 1 361#define ISP_INITSTATE 2 362#define ISP_RUNSTATE 3 363 --- 144 unchanged lines hidden --- | 369/* 370 * ISP States 371 */ 372#define ISP_NILSTATE 0 373#define ISP_RESETSTATE 1 374#define ISP_INITSTATE 2 375#define ISP_RUNSTATE 3 376 --- 144 unchanged lines hidden --- |