ispvar.h revision 45282
1254721Semaste/* $Id: ispvar.h,v 1.12 1999/03/25 22:52:45 mjacob Exp $ */ 2254721Semaste/* release_4_3_99 */ 3254721Semaste/* 4254721Semaste * Soft Definitions for for Qlogic ISP SCSI adapters. 5254721Semaste * 6254721Semaste *--------------------------------------- 7254721Semaste * Copyright (c) 1997, 1998 by Matthew Jacob 8254721Semaste * NASA/Ames Research Center 9254721Semaste * All rights reserved. 10254721Semaste *--------------------------------------- 11254721Semaste * Redistribution and use in source and binary forms, with or without 12254721Semaste * modification, are permitted provided that the following conditions 13254721Semaste * are met: 14254721Semaste * 1. Redistributions of source code must retain the above copyright 15254721Semaste * notice immediately at the beginning of the file, without modification, 16254721Semaste * this list of conditions, and the following disclaimer. 17296417Sdim * 2. Redistributions in binary form must reproduce the above copyright 18280031Sdim * notice, this list of conditions and the following disclaimer in the 19296417Sdim * documentation and/or other materials provided with the distribution. 20296417Sdim * 3. The name of the author may not be used to endorse or promote products 21296417Sdim * derived from this software without specific prior written permission. 22254721Semaste * 23254721Semaste * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 24280031Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25254721Semaste * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26254721Semaste * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 27254721Semaste * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28280031Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29254721Semaste * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30254721Semaste * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31254721Semaste * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32296417Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33254721Semaste * SUCH DAMAGE. 34254721Semaste * 35280031Sdim */ 36296417Sdim 37296417Sdim#ifndef _ISPVAR_H 38254721Semaste#define _ISPVAR_H 39254721Semaste 40254721Semaste#if defined(__NetBSD__) || defined(__OpenBSD__) 41254721Semaste#include <dev/ic/ispmbox.h> 42254721Semaste#endif 43296417Sdim#ifdef __FreeBSD__ 44254721Semaste#include <dev/isp/ispmbox.h> 45254721Semaste#endif 46254721Semaste#ifdef __linux__ 47254721Semaste#include "ispmbox.h" 48296417Sdim#endif 49254721Semaste 50296417Sdim#define ISP_CORE_VERSION_MAJOR 1 51296417Sdim#define ISP_CORE_VERSION_MINOR 7 52296417Sdim 53296417Sdim/* 54296417Sdim * Vector for bus specific code to provide specific services. 55296417Sdim */ 56296417Sdimstruct ispsoftc; 57296417Sdimstruct ispmdvec { 58254721Semaste u_int16_t (*dv_rd_reg) __P((struct ispsoftc *, int)); 59254721Semaste void (*dv_wr_reg) __P((struct ispsoftc *, int, u_int16_t)); 60296417Sdim int (*dv_mbxdma) __P((struct ispsoftc *)); 61254721Semaste int (*dv_dmaset) __P((struct ispsoftc *, 62296417Sdim ISP_SCSI_XFER_T *, ispreq_t *, u_int8_t *, u_int8_t)); 63296417Sdim void (*dv_dmaclr) 64296417Sdim __P((struct ispsoftc *, ISP_SCSI_XFER_T *, u_int32_t)); 65296417Sdim void (*dv_reset0) __P((struct ispsoftc *)); 66296417Sdim void (*dv_reset1) __P((struct ispsoftc *)); 67296417Sdim void (*dv_dregs) __P((struct ispsoftc *)); 68296417Sdim const u_int16_t *dv_ispfw; /* ptr to f/w */ 69296417Sdim u_int16_t dv_fwlen; /* length of f/w */ 70296417Sdim u_int16_t dv_codeorg; /* code ORG for f/w */ 71296417Sdim u_int16_t dv_fwrev; /* f/w revision */ 72296417Sdim /* 73296417Sdim * Initial values for conf1 register 74296417Sdim */ 75296417Sdim u_int16_t dv_conf1; 76296417Sdim u_int16_t dv_clock; /* clock frequency */ 77296417Sdim}; 78276479Sdim 79296417Sdim#define MAX_TARGETS 16 80296417Sdim#ifdef ISP2100_FABRIC 81296417Sdim#define MAX_FC_TARG 256 82296417Sdim#else 83296417Sdim#define MAX_FC_TARG 126 84296417Sdim#endif 85296417Sdim#define DEFAULT_LOOPID 113 86296417Sdim 87296417Sdim/* queue length must be a power of two */ 88276479Sdim#define QENTRY_LEN 64 89276479Sdim#define RQUEST_QUEUE_LEN MAXISPREQUEST 90254721Semaste#define RESULT_QUEUE_LEN (MAXISPREQUEST/2) 91254721Semaste#define ISP_QUEUE_ENTRY(q, idx) ((q) + ((idx) * QENTRY_LEN)) 92254721Semaste#define ISP_QUEUE_SIZE(n) ((n) * QENTRY_LEN) 93296417Sdim#define ISP_NXT_QENTRY(idx, qlen) (((idx) + 1) & ((qlen)-1)) 94296417Sdim#define ISP_QAVAIL(in, out, qlen) \ 95296417Sdim ((in == out)? (qlen - 1) : ((in > out)? \ 96254721Semaste ((qlen - 1) - (in - out)) : (out - in - 1))) 97254721Semaste/* 98254721Semaste * SCSI Specific Host Adapter Parameters 99254721Semaste */ 100254721Semaste 101254721Semastetypedef struct { 102254721Semaste u_int isp_req_ack_active_neg : 1, 103254721Semaste isp_data_line_active_neg: 1, 104254721Semaste isp_cmd_dma_burst_enable: 1, 105254721Semaste isp_data_dma_burst_enabl: 1, 106254721Semaste isp_fifo_threshold : 3, 107254721Semaste isp_ultramode : 1, 108254721Semaste isp_diffmode : 1, 109254721Semaste isp_lvdmode : 1, 110254721Semaste isp_fast_mttr : 1, 111254721Semaste isp_initiator_id : 4, 112254721Semaste isp_async_data_setup : 4; 113254721Semaste u_int16_t isp_selection_timeout; 114254721Semaste u_int16_t isp_max_queue_depth; 115254721Semaste u_int16_t isp_clock; 116254721Semaste u_int8_t isp_tag_aging; 117254721Semaste u_int8_t isp_bus_reset_delay; 118254721Semaste u_int8_t isp_retry_count; 119254721Semaste u_int8_t isp_retry_delay; 120296417Sdim struct { 121296417Sdim u_int 122296417Sdim dev_enable : 1, 123276479Sdim dev_announced : 1, 124254721Semaste dev_update : 1, 125254721Semaste dev_refresh : 1, 126254721Semaste exc_throttle : 8, 127254721Semaste cur_offset : 4, 128254721Semaste sync_offset : 4; 129254721Semaste u_int8_t cur_period; /* current sync period */ 130254721Semaste u_int8_t sync_period; /* goal sync period */ 131254721Semaste u_int16_t dev_flags; /* goal device flags */ 132254721Semaste u_int16_t cur_dflags; /* current device flags */ 133254721Semaste } isp_devparam[MAX_TARGETS]; 134254721Semaste} sdparam; /* scsi device parameters */ 135254721Semaste 136254721Semaste/* 137254721Semaste * Device Flags 138254721Semaste */ 139254721Semaste#define DPARM_DISC 0x8000 140254721Semaste#define DPARM_PARITY 0x4000 141254721Semaste#define DPARM_WIDE 0x2000 142254721Semaste#define DPARM_SYNC 0x1000 143254721Semaste#define DPARM_TQING 0x0800 144276479Sdim#define DPARM_ARQ 0x0400 145254721Semaste#define DPARM_QFRZ 0x0200 146254721Semaste#define DPARM_RENEG 0x0100 147254721Semaste#define DPARM_NARROW 0x0080 /* Possibly only available with >= 7.55 fw */ 148254721Semaste#define DPARM_ASYNC 0x0040 /* Possibly only available with >= 7.55 fw */ 149254721Semaste#define DPARM_DEFAULT (0xFF00 & ~DPARM_QFRZ) 150254721Semaste#define DPARM_SAFE_DFLT (DPARM_DEFAULT & ~(DPARM_WIDE|DPARM_SYNC|DPARM_TQING)) 151254721Semaste 152254721Semaste 153254721Semaste/* technically, not really correct, as they need to be rated based upon clock */ 154296417Sdim#define ISP_40M_SYNCPARMS 0x080a 155296417Sdim#define ISP_20M_SYNCPARMS 0x080c 156296417Sdim#define ISP_10M_SYNCPARMS 0x0c19 157296417Sdim#define ISP_08M_SYNCPARMS 0x0c25 158296417Sdim#define ISP_05M_SYNCPARMS 0x0c32 159296417Sdim#define ISP_04M_SYNCPARMS 0x0c41 160296417Sdim 161254721Semaste/* 162296417Sdim * Fibre Channel Specifics 163296417Sdim */ 164296417Sdimtypedef struct { 165254721Semaste u_int64_t isp_wwn; /* WWN of adapter */ 166254721Semaste u_int8_t isp_loopid; /* hard loop id */ 167254721Semaste u_int8_t isp_alpa; /* ALPA */ 168254721Semaste u_int8_t isp_execthrottle; 169254721Semaste u_int8_t isp_retry_delay; 170254721Semaste u_int8_t isp_retry_count; 171254721Semaste u_int8_t isp_fwstate; /* ISP F/W state */ 172254721Semaste u_int16_t isp_maxalloc; 173254721Semaste u_int16_t isp_maxfrmlen; 174254721Semaste u_int16_t isp_fwoptions; 175254721Semaste /* 176254721Semaste * Port Data Base 177254721Semaste */ 178254721Semaste isp_pdb_t isp_pdb[MAX_FC_TARG]; 179254721Semaste 180254721Semaste /* 181254721Semaste * Scratch DMA mapped in area to fetch Port Database stuff, etc. 182254721Semaste */ 183254721Semaste volatile caddr_t isp_scratch; 184254721Semaste u_int32_t isp_scdma; 185254721Semaste} fcparam; 186254721Semaste 187254721Semaste#define ISP2100_SCRLEN 0x100 188254721Semaste 189254721Semaste#define FW_CONFIG_WAIT 0x0000 190254721Semaste#define FW_WAIT_AL_PA 0x0001 191254721Semaste#define FW_WAIT_LOGIN 0x0002 192254721Semaste#define FW_READY 0x0003 193254721Semaste#define FW_LOSS_OF_SYNC 0x0004 194254721Semaste#define FW_ERROR 0x0005 195296417Sdim#define FW_REINIT 0x0006 196254721Semaste#define FW_NON_PART 0x0007 197296417Sdim 198254721Semaste#ifdef ISP_TARGET_MODE 199296417Sdim/* 200254721Semaste * Some temporary Target Mode definitions 201254721Semaste */ 202254721Semastetypedef struct tmd_cmd { 203254721Semaste u_int8_t cd_iid; /* initiator */ 204296417Sdim u_int8_t cd_tgt; /* target */ 205254721Semaste u_int8_t cd_lun; /* LUN for this command */ 206254721Semaste u_int8_t cd_state; 207296417Sdim u_int8_t cd_cdb[16]; /* command bytes */ 208254721Semaste u_int8_t cd_sensedata[20]; 209254721Semaste u_int16_t cd_rxid; 210296417Sdim u_int32_t cd_datalen; 211254721Semaste u_int32_t cd_totbytes; 212254721Semaste void * cd_hba; 213254721Semaste} tmd_cmd_t; 214254721Semaste 215254721Semaste/* 216296417Sdim * Async Target Mode Event Definitions 217254721Semaste */ 218254721Semaste#define TMD_BUS_RESET 0 219254721Semaste#define TMD_BDR 1 220254721Semaste 221254721Semaste/* 222296417Sdim * Immediate Notify data structure. 223254721Semaste */ 224254721Semaste#define NOTIFY_MSGLEN 5 225296417Sdimtypedef struct { 226254721Semaste u_int8_t nt_iid; /* initiator */ 227254721Semaste u_int8_t nt_tgt; /* target */ 228296417Sdim u_int8_t nt_lun; /* LUN for this command */ 229254721Semaste u_int8_t nt_msg[NOTIFY_MSGLEN]; /* SCSI message byte(s) */ 230254721Semaste} tmd_notify_t; 231254721Semaste 232254721Semaste#endif 233254721Semaste 234296417Sdim/* 235296417Sdim * Soft Structure per host adapter 236296417Sdim */ 237296417Sdimstruct ispsoftc { 238296417Sdim /* 239296417Sdim * Platform (OS) specific data 240254721Semaste */ 241296417Sdim struct isposinfo isp_osinfo; 242254721Semaste 243254721Semaste /* 244254721Semaste * Pointer to bus specific data 245254721Semaste */ 246254721Semaste struct ispmdvec * isp_mdvec; 247254721Semaste 248254721Semaste /* 249254721Semaste * Mostly nonvolatile state, debugging, etc.. 250254721Semaste */ 251254721Semaste 252254721Semaste u_int : 8, 253254721Semaste isp_confopts : 8, 254254721Semaste isp_port : 1, /* for dual ported impls */ 255254721Semaste isp_used : 1, 256254721Semaste isp_dblev : 3, 257254721Semaste isp_gotdparms : 1, 258296417Sdim isp_dogactive : 1, 259296417Sdim isp_bustype : 1, /* BUS Implementation */ 260254721Semaste isp_type : 8; /* HBA Type and Revision */ 261254721Semaste 262296417Sdim u_int16_t isp_fwrev[3]; /* Running F/W revision */ 263280031Sdim u_int16_t isp_romfw_rev[3]; /* 'ROM' F/W revision */ 264280031Sdim void * isp_param; 265296417Sdim 266254721Semaste /* 267254721Semaste * Volatile state 268296417Sdim */ 269280031Sdim 270280031Sdim volatile u_int 271280031Sdim : 19, 272296417Sdim isp_state : 3, 273280031Sdim isp_sendmarker : 1, /* send a marker entry */ 274280031Sdim isp_update : 1, /* update parameters */ 275296417Sdim isp_nactive : 9; /* how many commands active */ 276280031Sdim 277280031Sdim /* 278280031Sdim * Result and Request Queue indices. 279280031Sdim */ 280280031Sdim volatile u_int8_t isp_reqodx; /* index of last ISP pickup */ 281280031Sdim volatile u_int8_t isp_reqidx; /* index of next request */ 282280031Sdim volatile u_int8_t isp_residx; /* index of next result */ 283280031Sdim volatile u_int8_t isp_seqno; /* rolling sequence # */ 284280031Sdim 285288943Sdim /* 286280031Sdim * Sheer laziness, but it gets us around the problem 287280031Sdim * where we don't have a clean way of remembering 288280031Sdim * which transaction is bound to which ISP queue entry. 289280031Sdim * 290280031Sdim * There are other more clever ways to do this, but, 291296417Sdim * jeez, so I blow a couple of KB per host adapter... 292280031Sdim * and it *is* faster. 293280031Sdim */ 294280031Sdim ISP_SCSI_XFER_T *isp_xflist[RQUEST_QUEUE_LEN]; 295280031Sdim 296296417Sdim /* 297280031Sdim * request/result queues and dma handles for them. 298280031Sdim */ 299296417Sdim volatile caddr_t isp_rquest; 300280031Sdim volatile caddr_t isp_result; 301296417Sdim u_int32_t isp_rquest_dma; 302280031Sdim u_int32_t isp_result_dma; 303254721Semaste 304254721Semaste#ifdef ISP_TARGET_MODE 305254721Semaste /* 306254721Semaste * Vectors for handling target mode support. 307254721Semaste * 308254721Semaste * isp_tmd_newcmd is for feeding a newly arrived command to some 309254721Semaste * upper layer. 310254721Semaste * 311254721Semaste * isp_tmd_event is for notifying some upper layer that an event has 312254721Semaste * occurred that is not necessarily tied to any target (e.g., a SCSI 313254721Semaste * Bus Reset). 314254721Semaste * 315254721Semaste * isp_tmd_notify is for notifying some upper layer that some 316254721Semaste * event is now occurring that is either pertinent for a specific 317254721Semaste * device or for a specific command (e.g., BDR or ABORT TAG). 318296417Sdim * 319296417Sdim * It is left undefined (for now) how pools of commands are managed. 320296417Sdim */ 321296417Sdim void (*isp_tmd_newcmd) __P((void *, tmd_cmd_t *)); 322296417Sdim void (*isp_tmd_event) __P((void *, int)); 323296417Sdim void (*isp_tmd_notify) __P((void *, tmd_notify_t *)); 324296417Sdim#endif 325254721Semaste}; 326254721Semaste 327254721Semaste/* 328254721Semaste * ISP States 329254721Semaste */ 330254721Semaste#define ISP_NILSTATE 0 331254721Semaste#define ISP_RESETSTATE 1 332254721Semaste#define ISP_INITSTATE 2 333254721Semaste#define ISP_RUNSTATE 3 334254721Semaste 335254721Semaste/* 336254721Semaste * ISP Configuration Options 337254721Semaste */ 338254721Semaste#define ISP_CFG_NORELOAD 0x80 /* don't download f/w */ 339254721Semaste#define ISP_CFG_NONVRAM 0x40 /* ignore NVRAM */ 340254721Semaste 341254721Semaste#define ISP_FW_REV(maj, min, mic) ((maj << 24) | (min << 16) | mic) 342254721Semaste#define ISP_FW_REVX(xp) ((xp[0 ]<< 24) | (xp[1] << 16) | xp[2]) 343254721Semaste 344254721Semaste 345276479Sdim/* 346276479Sdim * Bus (implementation) types 347254721Semaste */ 348254721Semaste#define ISP_BT_PCI 0 /* PCI Implementations */ 349254721Semaste#define ISP_BT_SBUS 1 /* SBus Implementations */ 350254721Semaste 351254721Semaste/* 352254721Semaste * Chip Types 353254721Semaste */ 354254721Semaste#define ISP_HA_SCSI 0xf 355254721Semaste#define ISP_HA_SCSI_UNKNOWN 0x1 356254721Semaste#define ISP_HA_SCSI_1020 0x2 357254721Semaste#define ISP_HA_SCSI_1020A 0x3 358254721Semaste#define ISP_HA_SCSI_1040 0x4 359254721Semaste#define ISP_HA_SCSI_1040A 0x5 360254721Semaste#define ISP_HA_SCSI_1040B 0x6 361254721Semaste#define ISP_HA_SCSI_1040C 0x7 362254721Semaste#define ISP_HA_SCSI_1080 0xd 363254721Semaste#define ISP_HA_SCSI_12X0 0xe 364254721Semaste#define ISP_HA_FC 0xf0 365254721Semaste#define ISP_HA_FC_2100 0x10 366254721Semaste 367254721Semaste#define IS_SCSI(isp) (isp->isp_type & ISP_HA_SCSI) 368254721Semaste#define IS_1080(isp) (isp->isp_type == ISP_HA_SCSI_1080) 369254721Semaste#define IS_12X0(isp) (isp->isp_type == ISP_HA_SCSI_12X0) 370254721Semaste#define IS_FC(isp) (isp->isp_type & ISP_HA_FC) 371254721Semaste 372254721Semaste/* 373296417Sdim * Macros to read, write ISP registers through bus specific code. 374254721Semaste */ 375254721Semaste 376254721Semaste#define ISP_READ(isp, reg) \ 377254721Semaste (*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg)) 378254721Semaste 379254721Semaste#define ISP_WRITE(isp, reg, val) \ 380254721Semaste (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), (val)) 381254721Semaste 382254721Semaste#define ISP_MBOXDMASETUP(isp) \ 383254721Semaste (*(isp)->isp_mdvec->dv_mbxdma)((isp)) 384254721Semaste 385254721Semaste#define ISP_DMASETUP(isp, xs, req, iptrp, optr) \ 386254721Semaste (*(isp)->isp_mdvec->dv_dmaset)((isp), (xs), (req), (iptrp), (optr)) 387254721Semaste 388254721Semaste#define ISP_DMAFREE(isp, xs, seqno) \ 389254721Semaste if ((isp)->isp_mdvec->dv_dmaclr) \ 390254721Semaste (*(isp)->isp_mdvec->dv_dmaclr)((isp), (xs), (seqno)) 391254721Semaste 392254721Semaste#define ISP_RESET0(isp) \ 393254721Semaste if ((isp)->isp_mdvec->dv_reset0) (*(isp)->isp_mdvec->dv_reset0)((isp)) 394254721Semaste#define ISP_RESET1(isp) \ 395254721Semaste if ((isp)->isp_mdvec->dv_reset1) (*(isp)->isp_mdvec->dv_reset1)((isp)) 396254721Semaste#define ISP_DUMPREGS(isp) \ 397254721Semaste if ((isp)->isp_mdvec->dv_dregs) (*(isp)->isp_mdvec->dv_dregs)((isp)) 398254721Semaste 399296417Sdim#define ISP_SETBITS(isp, reg, val) \ 400296417Sdim (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), ISP_READ((isp), (reg)) | (val)) 401296417Sdim 402296417Sdim#define ISP_CLRBITS(isp, reg, val) \ 403296417Sdim (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), ISP_READ((isp), (reg)) & ~(val)) 404296417Sdim 405296417Sdim/* 406296417Sdim * Function Prototypes 407296417Sdim */ 408296417Sdim 409296417Sdim/* 410296417Sdim * Reset Hardware. Totally. Assumes that you'll follow this with 411296417Sdim * a call to isp_init. 412296417Sdim */ 413296417Sdimvoid isp_reset __P((struct ispsoftc *)); 414254721Semaste 415254721Semaste/* 416254721Semaste * Initialize Hardware to known state 417254721Semaste */ 418254721Semastevoid isp_init __P((struct ispsoftc *)); 419254721Semaste 420254721Semaste/* 421254721Semaste * Reset the ISP and call completion for any orphaned commands. 422254721Semaste */ 423254721Semastevoid isp_restart __P((struct ispsoftc *)); 424254721Semaste 425254721Semaste/* 426254721Semaste * Interrupt Service Routine 427254721Semaste */ 428254721Semasteint isp_intr __P((void *)); 429254721Semaste 430254721Semaste/* 431254721Semaste * Command Entry Point 432296417Sdim */ 433254721Semasteint32_t ispscsicmd __P((ISP_SCSI_XFER_T *)); 434254721Semaste 435254721Semaste/* 436296417Sdim * Platform Dependent to External to Internal Control Function 437254721Semaste * 438296417Sdim * For: Aborting a running command - arg is an ISP_SCSI_XFER_T * 439296417Sdim * Resetting a Device - arg is target to reset 440254721Semaste * Resetting a BUS - arg is ignored 441254721Semaste * Updating parameters - arg is ignored 442254721Semaste * 443254721Semaste * First argument is this instance's softc pointer. 444296417Sdim * Second argument is an index into xflist array. 445296417Sdim * Assumes all locks must be held already. 446296417Sdim */ 447254721Semastetypedef enum { 448254721Semaste ISPCTL_RESET_BUS, 449254721Semaste ISPCTL_RESET_DEV, 450254721Semaste ISPCTL_ABORT_CMD, 451254721Semaste ISPCTL_UPDATE_PARAMS, 452254721Semaste ISPCTL_FCLINK_TEST 453254721Semaste} ispctl_t; 454254721Semasteint isp_control __P((struct ispsoftc *, ispctl_t, void *)); 455254721Semaste 456254721Semaste 457254721Semaste/* 458254721Semaste * Platform Dependent to Internal to External Control Function 459254721Semaste * (each platform must provide such a function) 460254721Semaste * 461296417Sdim * For: Announcing Target Paramter Changes (arg is target) 462254721Semaste * 463254721Semaste * Assumes all locks are held. 464254721Semaste */ 465254721Semaste 466254721Semastetypedef enum { 467254721Semaste ISPASYNC_NEW_TGT_PARAMS, 468254721Semaste ISPASYNC_BUS_RESET, /* Bus Reset */ 469254721Semaste ISPASYNC_LOOP_DOWN, /* Obvious FC only */ 470254721Semaste ISPASYNC_LOOP_UP, /* "" */ 471254721Semaste ISPASYNC_PDB_CHANGE_COMPLETE, /* "" */ 472254721Semaste ISPASYNC_CHANGE_NOTIFY /* "" */ 473296417Sdim} ispasync_t; 474296417Sdimint isp_async __P((struct ispsoftc *, ispasync_t, void *)); 475254721Semaste 476254721Semaste/* 477254721Semaste * lost command routine (XXXX IN TRANSITION XXXX) 478254721Semaste */ 479254721Semastevoid isp_lostcmd __P((struct ispsoftc *, ISP_SCSI_XFER_T *)); 480254721Semaste 481296417Sdim 482254721Semaste#endif /* _ISPVAR_H */ 483254721Semaste