ispvar.h revision 43793
143793Smjacob/* $Id: ispvar.h,v 1.9 1999/01/30 07:29:00 mjacob Exp $ */
243793Smjacob/* release_02_05_99 */
335388Smjacob/*
435388Smjacob * Soft Definitions for for Qlogic ISP SCSI adapters.
535388Smjacob *
635388Smjacob *---------------------------------------
735388Smjacob * Copyright (c) 1997, 1998 by Matthew Jacob
835388Smjacob * NASA/Ames Research Center
935388Smjacob * All rights reserved.
1035388Smjacob *---------------------------------------
1135388Smjacob * Redistribution and use in source and binary forms, with or without
1235388Smjacob * modification, are permitted provided that the following conditions
1335388Smjacob * are met:
1435388Smjacob * 1. Redistributions of source code must retain the above copyright
1535388Smjacob *    notice immediately at the beginning of the file, without modification,
1635388Smjacob *    this list of conditions, and the following disclaimer.
1735388Smjacob * 2. Redistributions in binary form must reproduce the above copyright
1835388Smjacob *    notice, this list of conditions and the following disclaimer in the
1935388Smjacob *    documentation and/or other materials provided with the distribution.
2035388Smjacob * 3. The name of the author may not be used to endorse or promote products
2135388Smjacob *    derived from this software without specific prior written permission.
2235388Smjacob *
2335388Smjacob * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2435388Smjacob * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2535388Smjacob * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2635388Smjacob * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
2735388Smjacob * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2835388Smjacob * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2935388Smjacob * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3035388Smjacob * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3135388Smjacob * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3235388Smjacob * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3335388Smjacob * SUCH DAMAGE.
3435388Smjacob *
3535388Smjacob */
3635388Smjacob
3735388Smjacob#ifndef	_ISPVAR_H
3835388Smjacob#define	_ISPVAR_H
3935388Smjacob
4035388Smjacob#ifdef	__NetBSD__
4135388Smjacob#include <dev/ic/ispmbox.h>
4235388Smjacob#endif
4335388Smjacob#ifdef	__FreeBSD__
4435388Smjacob#include <dev/isp/ispmbox.h>
4535388Smjacob#endif
4635388Smjacob#ifdef	__linux__
4742131Smjacob#include "ispmbox.h"
4835388Smjacob#endif
4935388Smjacob
5039235Sgibbs#define	ISP_CORE_VERSION_MAJOR	1
5143793Smjacob#define	ISP_CORE_VERSION_MINOR	6
5239235Sgibbs
5335388Smjacob/*
5443420Smjacob * Vector for bus specific code to provide specific services.
5535388Smjacob */
5635388Smjacobstruct ispsoftc;
5735388Smjacobstruct ispmdvec {
5835388Smjacob	u_int16_t	(*dv_rd_reg) __P((struct ispsoftc *, int));
5935388Smjacob	void		(*dv_wr_reg) __P((struct ispsoftc *, int, u_int16_t));
6035388Smjacob	int		(*dv_mbxdma) __P((struct ispsoftc *));
6135388Smjacob	int		(*dv_dmaset) __P((struct ispsoftc *,
6235388Smjacob		ISP_SCSI_XFER_T *, ispreq_t *, u_int8_t *, u_int8_t));
6335388Smjacob	void		(*dv_dmaclr)
6435388Smjacob		__P((struct ispsoftc *, ISP_SCSI_XFER_T *, u_int32_t));
6535388Smjacob	void		(*dv_reset0) __P((struct ispsoftc *));
6635388Smjacob	void		(*dv_reset1) __P((struct ispsoftc *));
6735388Smjacob	void		(*dv_dregs) __P((struct ispsoftc *));
6835388Smjacob	const u_int16_t *dv_ispfw;	/* ptr to f/w */
6935388Smjacob	u_int16_t 	dv_fwlen;	/* length of f/w */
7035388Smjacob	u_int16_t	dv_codeorg;	/* code ORG for f/w */
7135388Smjacob	u_int16_t	dv_fwrev;	/* f/w revision */
7235388Smjacob	/*
7335388Smjacob	 * Initial values for conf1 register
7435388Smjacob	 */
7535388Smjacob	u_int16_t	dv_conf1;
7635388Smjacob	u_int16_t	dv_clock;	/* clock frequency */
7735388Smjacob};
7835388Smjacob
7935388Smjacob#define	MAX_TARGETS	16
8035388Smjacob#define	MAX_FC_TARG	126
8141519Smjacob#define	DEFAULT_LOOPID	113
8235388Smjacob
8339235Sgibbs/* queue length must be a power of two */
8439235Sgibbs#define	QENTRY_LEN			64
8539235Sgibbs#define	RQUEST_QUEUE_LEN		MAXISPREQUEST
8639235Sgibbs#define	RESULT_QUEUE_LEN		(MAXISPREQUEST/4)
8739235Sgibbs#define	ISP_QUEUE_ENTRY(q, idx)		((q) + ((idx) * QENTRY_LEN))
8839235Sgibbs#define	ISP_QUEUE_SIZE(n)		((n) * QENTRY_LEN)
8939235Sgibbs#define	ISP_NXT_QENTRY(idx, qlen)	(((idx) + 1) & ((qlen)-1))
9039235Sgibbs#define ISP_QAVAIL(in, out, qlen)	\
9139235Sgibbs	((in == out)? (qlen - 1) : ((in > out)? \
9239235Sgibbs		((qlen - 1) - (in - out)) : (out - in - 1)))
9335388Smjacob/*
9443420Smjacob * SCSI Specific Host Adapter Parameters
9535388Smjacob */
9635388Smjacob
9735388Smjacobtypedef struct {
9839235Sgibbs        u_int		isp_req_ack_active_neg	: 1,
9935388Smjacob	        	isp_data_line_active_neg: 1,
10035388Smjacob			isp_cmd_dma_burst_enable: 1,
10135388Smjacob			isp_data_dma_burst_enabl: 1,
10242461Smjacob			isp_fifo_threshold	: 3,
10343420Smjacob			isp_ultramode		: 1,
10435388Smjacob			isp_diffmode		: 1,
10539235Sgibbs			isp_fast_mttr		: 1,
10635388Smjacob			isp_initiator_id	: 4,
10735388Smjacob        		isp_async_data_setup	: 4;
10835388Smjacob        u_int16_t	isp_selection_timeout;
10935388Smjacob        u_int16_t	isp_max_queue_depth;
11035388Smjacob	u_int16_t	isp_clock;
11135388Smjacob	u_int8_t	isp_tag_aging;
11235388Smjacob       	u_int8_t	isp_bus_reset_delay;
11335388Smjacob        u_int8_t	isp_retry_count;
11435388Smjacob        u_int8_t	isp_retry_delay;
11535388Smjacob	struct {
11643420Smjacob		u_int
11739235Sgibbs			dev_enable	:	1,
11843420Smjacob			dev_announced	:	1,
11943420Smjacob			dev_update	:	1,
12043420Smjacob			dev_refresh	:	1,
12139235Sgibbs			exc_throttle	:	7,
12239235Sgibbs			sync_offset	:	4,
12339235Sgibbs			sync_period	:	8;
12439235Sgibbs		u_int16_t dev_flags;		/* persistent device flags */
12539235Sgibbs		u_int16_t cur_dflags;		/* current device flags */
12635388Smjacob	} isp_devparam[MAX_TARGETS];
12735388Smjacob} sdparam;	/* scsi device parameters */
12835388Smjacob
12935388Smjacob/*
13035388Smjacob * Device Flags
13135388Smjacob */
13239235Sgibbs#define	DPARM_DISC	0x8000
13339235Sgibbs#define	DPARM_PARITY	0x4000
13439235Sgibbs#define	DPARM_WIDE	0x2000
13539235Sgibbs#define	DPARM_SYNC	0x1000
13639235Sgibbs#define	DPARM_TQING	0x0800
13739235Sgibbs#define	DPARM_ARQ	0x0400
13839235Sgibbs#define	DPARM_QFRZ	0x0200
13939235Sgibbs#define	DPARM_RENEG	0x0100
14039235Sgibbs#define	DPARM_NARROW	0x0080	/* Possibly only available with >= 7.55 fw */
14139235Sgibbs#define	DPARM_ASYNC	0x0040	/* Possibly only available with >= 7.55 fw */
14243793Smjacob#define	DPARM_DEFAULT	(0xFF00 & ~DPARM_QFRZ)
14339235Sgibbs#define	DPARM_SAFE_DFLT	(DPARM_DEFAULT & ~(DPARM_WIDE|DPARM_SYNC|DPARM_TQING))
14435388Smjacob
14539235Sgibbs
14635388Smjacob#define ISP_20M_SYNCPARMS	0x080c
14735388Smjacob#define ISP_10M_SYNCPARMS	0x0c19
14835388Smjacob#define ISP_08M_SYNCPARMS	0x0c25
14935388Smjacob#define ISP_05M_SYNCPARMS	0x0c32
15035388Smjacob#define ISP_04M_SYNCPARMS	0x0c41
15135388Smjacob
15235388Smjacob/*
15335388Smjacob * Fibre Channel Specifics
15435388Smjacob */
15535388Smjacobtypedef struct {
15635388Smjacob	u_int64_t		isp_wwn;	/* WWN of adapter */
15739235Sgibbs	u_int8_t		isp_loopid;	/* hard loop id */
15839235Sgibbs	u_int8_t		isp_alpa;	/* ALPA */
15939235Sgibbs	u_int8_t		isp_execthrottle;
16039235Sgibbs        u_int8_t		isp_retry_delay;
16135388Smjacob        u_int8_t		isp_retry_count;
16235388Smjacob	u_int8_t		isp_fwstate;	/* ISP F/W state */
16339235Sgibbs	u_int16_t		isp_maxalloc;
16439235Sgibbs	u_int16_t		isp_maxfrmlen;
16539235Sgibbs	u_int16_t		isp_fwoptions;
16635388Smjacob	/*
16735388Smjacob	 * Scratch DMA mapped in area to fetch Port Database stuff, etc.
16835388Smjacob	 */
16935388Smjacob	volatile caddr_t	isp_scratch;
17035388Smjacob	u_int32_t		isp_scdma;
17135388Smjacob} fcparam;
17235388Smjacob
17335388Smjacob#define	ISP2100_SCRLEN		0x100
17435388Smjacob
17535388Smjacob#define	FW_CONFIG_WAIT		0x0000
17635388Smjacob#define	FW_WAIT_AL_PA		0x0001
17735388Smjacob#define	FW_WAIT_LOGIN		0x0002
17835388Smjacob#define	FW_READY		0x0003
17935388Smjacob#define	FW_LOSS_OF_SYNC		0x0004
18035388Smjacob#define	FW_ERROR		0x0005
18135388Smjacob#define	FW_REINIT		0x0006
18235388Smjacob#define	FW_NON_PART		0x0007
18335388Smjacob
18442131Smjacob#ifdef	ISP_TARGET_MODE
18542131Smjacob/*
18642131Smjacob * Some temporary Target Mode definitions
18742131Smjacob */
18842131Smjacobtypedef struct tmd_cmd {
18942131Smjacob	u_int8_t	cd_iid;		/* initiator */
19042131Smjacob	u_int8_t	cd_tgt;		/* target */
19142131Smjacob	u_int8_t	cd_lun;		/* LUN for this command */
19242131Smjacob	u_int8_t	cd_state;
19342131Smjacob	u_int8_t	cd_cdb[16];	/* command bytes */
19442131Smjacob	u_int8_t	cd_sensedata[20];
19542131Smjacob	u_int16_t	cd_rxid;
19642131Smjacob	u_int32_t	cd_datalen;
19742131Smjacob	u_int32_t	cd_totbytes;
19842131Smjacob	void *		cd_hba;
19942131Smjacob} tmd_cmd_t;
20041519Smjacob
20135388Smjacob/*
20242131Smjacob * Async Target Mode Event Definitions
20342131Smjacob */
20442131Smjacob#define	TMD_BUS_RESET	0
20542131Smjacob#define	TMD_BDR		1
20642131Smjacob
20742131Smjacob/*
20842131Smjacob * Immediate Notify data structure.
20942131Smjacob */
21042131Smjacob#define NOTIFY_MSGLEN	5
21142131Smjacobtypedef struct {
21242131Smjacob	u_int8_t	nt_iid;			/* initiator */
21342131Smjacob	u_int8_t	nt_tgt;			/* target */
21442131Smjacob	u_int8_t	nt_lun;			/* LUN for this command */
21542131Smjacob	u_int8_t	nt_msg[NOTIFY_MSGLEN];	/* SCSI message byte(s) */
21642131Smjacob} tmd_notify_t;
21742131Smjacob
21842131Smjacob#endif
21942131Smjacob
22042131Smjacob/*
22135388Smjacob * Soft Structure per host adapter
22235388Smjacob */
22335388Smjacobstruct ispsoftc {
22435388Smjacob	/*
22535388Smjacob	 * Platform (OS) specific data
22635388Smjacob	 */
22735388Smjacob	struct isposinfo	isp_osinfo;
22835388Smjacob
22935388Smjacob	/*
23035388Smjacob	 * Pointer to bus specific data
23135388Smjacob	 */
23235388Smjacob	struct ispmdvec *	isp_mdvec;
23335388Smjacob
23435388Smjacob	/*
23541519Smjacob	 * Mostly nonvolatile state, debugging, etc..
23635388Smjacob	 */
23735388Smjacob
23839235Sgibbs	u_int				: 8,
23939235Sgibbs			isp_confopts	: 8,
24039235Sgibbs					: 2,
24139235Sgibbs			isp_dblev	: 3,
24239235Sgibbs			isp_gotdparms	: 1,
24335388Smjacob			isp_dogactive	: 1,
24439235Sgibbs			isp_bustype	: 1,	/* BUS Implementation */
24539235Sgibbs			isp_type	: 8;	/* HBA Type and Revision */
24635388Smjacob
24739235Sgibbs	u_int16_t		isp_fwrev;	/* Running F/W revision */
24839235Sgibbs	u_int16_t		isp_romfw_rev;	/* 'ROM' F/W revision */
24939235Sgibbs	void * 			isp_param;
25039235Sgibbs
25135388Smjacob	/*
25239235Sgibbs	 * Volatile state
25335388Smjacob	 */
25435388Smjacob
25539235Sgibbs	volatile u_int
25639235Sgibbs				:	19,
25739235Sgibbs		isp_state	:	3,
25839235Sgibbs		isp_sendmarker	:	1,	/* send a marker entry */
25939235Sgibbs		isp_update	:	1,	/* update paramters */
26039235Sgibbs		isp_nactive	:	9;	/* how many commands active */
26139235Sgibbs
26235388Smjacob	/*
26339235Sgibbs	 * Result and Request Queue indices.
26435388Smjacob	 */
26539235Sgibbs	volatile u_int8_t	isp_reqodx;	/* index of last ISP pickup */
26635388Smjacob	volatile u_int8_t	isp_reqidx;	/* index of next request */
26735388Smjacob	volatile u_int8_t	isp_residx;	/* index of next result */
26839235Sgibbs	volatile u_int8_t	isp_seqno;	/* rolling sequence # */
26935388Smjacob
27035388Smjacob	/*
27135388Smjacob	 * Sheer laziness, but it gets us around the problem
27235388Smjacob	 * where we don't have a clean way of remembering
27335388Smjacob	 * which transaction is bound to which ISP queue entry.
27435388Smjacob	 *
27535388Smjacob	 * There are other more clever ways to do this, but,
27635388Smjacob	 * jeez, so I blow a couple of KB per host adapter...
27735388Smjacob	 * and it *is* faster.
27835388Smjacob	 */
27943420Smjacob	ISP_SCSI_XFER_T *isp_xflist[RQUEST_QUEUE_LEN];
28035388Smjacob
28135388Smjacob	/*
28239235Sgibbs	 * request/result queues and dma handles for them.
28335388Smjacob	 */
28435388Smjacob	volatile caddr_t	isp_rquest;
28535388Smjacob	volatile caddr_t	isp_result;
28635388Smjacob	u_int32_t		isp_rquest_dma;
28735388Smjacob	u_int32_t		isp_result_dma;
28841519Smjacob
28942131Smjacob#ifdef	ISP_TARGET_MODE
29042131Smjacob	/*
29142131Smjacob	 * Vectors for handling target mode support.
29242131Smjacob	 *
29342131Smjacob	 * isp_tmd_newcmd is for feeding a newly arrived command to some
29442131Smjacob	 * upper layer.
29542131Smjacob	 *
29642131Smjacob	 * isp_tmd_event is for notifying some upper layer that an event has
29742131Smjacob	 * occurred that is not necessarily tied to any target (e.g., a SCSI
29842131Smjacob	 * Bus Reset).
29942131Smjacob	 *
30042131Smjacob	 * isp_tmd_notify is for notifying some upper layer that some
30142131Smjacob	 * event is now occurring that is either pertinent for a specific
30242131Smjacob	 * device or for a specific command (e.g., BDR or ABORT TAG).
30342131Smjacob	 *
30442131Smjacob	 * It is left undefined (for now) how pools of commands are managed.
30542131Smjacob	 */
30642131Smjacob	void		(*isp_tmd_newcmd) __P((void *, tmd_cmd_t *));
30742131Smjacob	void		(*isp_tmd_event) __P((void *, int));
30842131Smjacob	void		(*isp_tmd_notify) __P((void *, tmd_notify_t *));
30942131Smjacob#endif
31035388Smjacob};
31135388Smjacob
31235388Smjacob/*
31335388Smjacob * ISP States
31435388Smjacob */
31535388Smjacob#define	ISP_NILSTATE	0
31635388Smjacob#define	ISP_RESETSTATE	1
31735388Smjacob#define	ISP_INITSTATE	2
31835388Smjacob#define	ISP_RUNSTATE	3
31935388Smjacob
32035388Smjacob/*
32135388Smjacob * ISP Configuration Options
32235388Smjacob */
32335388Smjacob#define	ISP_CFG_NORELOAD	0x80	/* don't download f/w */
32443793Smjacob#define	ISP_CFG_NONVRAM		0x40	/* ignore NVRAM */
32535388Smjacob
32639235Sgibbs#define	ISP_FW_REV(maj, min)	((maj) << 10| (min))
32739235Sgibbs
32835388Smjacob/*
32939235Sgibbs * Bus (implementation) types
33035388Smjacob */
33139235Sgibbs#define	ISP_BT_PCI		0	/* PCI Implementations */
33239235Sgibbs#define	ISP_BT_SBUS		1	/* SBus Implementations */
33339235Sgibbs
33439235Sgibbs/*
33539235Sgibbs * Chip Types
33639235Sgibbs */
33735388Smjacob#define	ISP_HA_SCSI		0xf
33839235Sgibbs#define	ISP_HA_SCSI_UNKNOWN	0x1
33939235Sgibbs#define	ISP_HA_SCSI_1020	0x2
34039235Sgibbs#define	ISP_HA_SCSI_1020A	0x3
34139235Sgibbs#define	ISP_HA_SCSI_1040	0x4
34239235Sgibbs#define	ISP_HA_SCSI_1040A	0x5
34339235Sgibbs#define	ISP_HA_SCSI_1040B	0x6
34435388Smjacob#define	ISP_HA_FC		0xf0
34535388Smjacob#define	ISP_HA_FC_2100		0x10
34635388Smjacob
34735388Smjacob/*
34843420Smjacob * Macros to read, write ISP registers through bus specific code.
34935388Smjacob */
35035388Smjacob
35135388Smjacob#define	ISP_READ(isp, reg)	\
35235388Smjacob	(*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg))
35335388Smjacob
35435388Smjacob#define	ISP_WRITE(isp, reg, val)	\
35535388Smjacob	(*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), (val))
35635388Smjacob
35735388Smjacob#define	ISP_MBOXDMASETUP(isp)	\
35835388Smjacob	(*(isp)->isp_mdvec->dv_mbxdma)((isp))
35935388Smjacob
36035388Smjacob#define	ISP_DMASETUP(isp, xs, req, iptrp, optr)	\
36135388Smjacob	(*(isp)->isp_mdvec->dv_dmaset)((isp), (xs), (req), (iptrp), (optr))
36235388Smjacob
36335388Smjacob#define	ISP_DMAFREE(isp, xs, seqno)	\
36435388Smjacob	if ((isp)->isp_mdvec->dv_dmaclr) \
36535388Smjacob		 (*(isp)->isp_mdvec->dv_dmaclr)((isp), (xs), (seqno))
36635388Smjacob
36735388Smjacob#define	ISP_RESET0(isp)	\
36835388Smjacob	if ((isp)->isp_mdvec->dv_reset0) (*(isp)->isp_mdvec->dv_reset0)((isp))
36935388Smjacob#define	ISP_RESET1(isp)	\
37035388Smjacob	if ((isp)->isp_mdvec->dv_reset1) (*(isp)->isp_mdvec->dv_reset1)((isp))
37135388Smjacob#define	ISP_DUMPREGS(isp)	\
37235388Smjacob	if ((isp)->isp_mdvec->dv_dregs) (*(isp)->isp_mdvec->dv_dregs)((isp))
37335388Smjacob
37435388Smjacob#define	ISP_SETBITS(isp, reg, val)	\
37535388Smjacob (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), ISP_READ((isp), (reg)) | (val))
37635388Smjacob
37735388Smjacob#define	ISP_CLRBITS(isp, reg, val)	\
37835388Smjacob (*(isp)->isp_mdvec->dv_wr_reg)((isp), (reg), ISP_READ((isp), (reg)) & ~(val))
37935388Smjacob
38035388Smjacob/*
38135388Smjacob * Function Prototypes
38235388Smjacob */
38335388Smjacob
38435388Smjacob/*
38539235Sgibbs * Reset Hardware. Totally. Assumes that you'll follow this with
38639235Sgibbs * a call to isp_init.
38735388Smjacob */
38835388Smjacobvoid isp_reset __P((struct ispsoftc *));
38935388Smjacob
39035388Smjacob/*
39135388Smjacob * Initialize Hardware to known state
39235388Smjacob */
39335388Smjacobvoid isp_init __P((struct ispsoftc *));
39435388Smjacob
39535388Smjacob/*
39639235Sgibbs * Reset the ISP and call completion for any orphaned commands.
39739235Sgibbs */
39839235Sgibbsvoid isp_restart __P((struct ispsoftc *));
39939235Sgibbs
40039235Sgibbs/*
40135388Smjacob * Interrupt Service Routine
40235388Smjacob */
40335388Smjacobint isp_intr __P((void *));
40435388Smjacob
40535388Smjacob/*
40635388Smjacob * Command Entry Point
40735388Smjacob */
40839235Sgibbsint32_t ispscsicmd __P((ISP_SCSI_XFER_T *));
40935388Smjacob
41039235Sgibbs/*
41143420Smjacob * Platform Dependent to External to Internal Control Function
41239235Sgibbs *
41339235Sgibbs * For: 	Aborting a running command	- arg is an ISP_SCSI_XFER_T *
41439235Sgibbs *		Resetting a Device		- arg is target to reset
41539235Sgibbs *		Resetting a BUS			- arg is ignored
41639235Sgibbs *		Updating parameters		- arg is ignored
41739235Sgibbs *
41843420Smjacob * First argument is this instance's softc pointer.
41939235Sgibbs * Second argument is an index into xflist array.
42039235Sgibbs * Assumes all locks must be held already.
42139235Sgibbs */
42239235Sgibbstypedef enum {
42339235Sgibbs	ISPCTL_RESET_BUS,
42439235Sgibbs	ISPCTL_RESET_DEV,
42539235Sgibbs	ISPCTL_ABORT_CMD,
42639235Sgibbs	ISPCTL_UPDATE_PARAMS,
42739235Sgibbs} ispctl_t;
42839235Sgibbsint isp_control __P((struct ispsoftc *, ispctl_t, void *));
42939235Sgibbs
43043420Smjacob
43139235Sgibbs/*
43243420Smjacob * Platform Dependent to Internal to External Control Function
43343420Smjacob * (each platform must provide such a function)
43443420Smjacob *
43543420Smjacob * For: 	Announcing Target Paramter Changes (arg is target)
43643420Smjacob *
43743420Smjacob * Assumes all locks are held.
43843420Smjacob */
43943420Smjacob
44043420Smjacobtypedef enum {
44143793Smjacob	ISPASYNC_NEW_TGT_PARAMS,
44243793Smjacob	ISPASYNC_LOOP_DOWN,		/* Obvious FC only */
44343793Smjacob	ISPASYNC_LOOP_UP		/* Obvious FC only */
44443420Smjacob} ispasync_t;
44543420Smjacobint isp_async __P((struct ispsoftc *, ispasync_t, void *));
44643420Smjacob
44743420Smjacob/*
44839235Sgibbs * lost command routine (XXXX IN TRANSITION XXXX)
44939235Sgibbs */
45039235Sgibbsvoid isp_lostcmd __P((struct ispsoftc *, ISP_SCSI_XFER_T *));
45139235Sgibbs
45239235Sgibbs
45335388Smjacob#endif	/* _ISPVAR_H */
454