181588Sru/*	$NetBSD: dptivar.h,v 1.10 2021/11/01 21:28:03 andvar Exp $	*/
259892Sjasone
379754Sdd/*-
459892Sjasone * Copyright (c) 2001 The NetBSD Foundation, Inc.
559892Sjasone * All rights reserved.
659892Sjasone *
759892Sjasone * This code is derived from software contributed to The NetBSD Foundation
859892Sjasone * by Andrew Doran.
959892Sjasone *
1059892Sjasone * Redistribution and use in source and binary forms, with or without
1159892Sjasone * modification, are permitted provided that the following conditions
1259892Sjasone * are met:
1359892Sjasone * 1. Redistributions of source code must retain the above copyright
1459892Sjasone *    notice, this list of conditions and the following disclaimer.
1579754Sdd * 2. Redistributions in binary form must reproduce the above copyright
1659892Sjasone *    notice, this list of conditions and the following disclaimer in the
1759892Sjasone *    documentation and/or other materials provided with the distribution.
1859892Sjasone *
1959892Sjasone * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2059892Sjasone * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2159892Sjasone * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2259892Sjasone * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2359892Sjasone * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2459892Sjasone * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2559892Sjasone * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2659892Sjasone * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2779754Sdd * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2859892Sjasone * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29201892Sdelphij * POSSIBILITY OF SUCH DAMAGE.
3059892Sjasone */
3159892Sjasone
3259892Sjasone/*
3359944Sphantom * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
3459944Sphantom * Copyright (c) 2000 Adaptec Corporation
35110636Salfred * All rights reserved.
36110636Salfred *
3759944Sphantom * TERMS AND CONDITIONS OF USE
3859944Sphantom *
3980021Sjasone * Redistribution and use in source form, with or without modification, are
4080021Sjasone * permitted provided that redistributions of source code must retain the
4159944Sphantom * above copyright notice, this list of conditions and the following disclaimer.
4259944Sphantom *
4359944Sphantom * This software is provided `as is' by Adaptec and any express or implied
4459944Sphantom * warranties, including, but not limited to, the implied warranties of
4559944Sphantom * merchantability and fitness for a particular purpose, are disclaimed. In no
4659944Sphantom * event shall Adaptec be liable for any direct, indirect, incidental, special,
4759944Sphantom * exemplary or consequential damages (including, but not limited to,
4859944Sphantom * procurement of substitute goods or services; loss of use, data, or profits;
4959944Sphantom * or business interruptions) however caused and on any theory of liability,
5059944Sphantom * whether in contract, strict liability, or tort (including negligence or
5159944Sphantom * otherwise) arising in any way out of the use of this driver software, even
5259944Sphantom * if advised of the possibility of such damage.
5359892Sjasone */
5459892Sjasone
55124535Sru#ifndef	_I2O_DPTIVAR_H_
5659892Sjasone#define	_I2O_DPTIVAR_H_
5784306Sru
5859892Sjasone#define	DPTI_MAX_SEGS	17
5959892Sjasone
6059892Sjasone/*
6159892Sjasone * Runtime state.
6259892Sjasone */
63110636Salfredstruct dpti_softc {
64110636Salfred	device_t sc_dev;
65110636Salfred	int	sc_blinkled;
66110636Salfred};
6759892Sjasone
6859892Sjasonestruct dpti_ptbuf {
6959892Sjasone	void *	db_ptr;
7059892Sjasone	struct	proc *db_proc;
7180021Sjasone	int	db_size;
7280021Sjasone	int	db_out;
7380021Sjasone	int	db_nfrag;
7480021Sjasone	struct	iovec db_frags[DPTI_MAX_SEGS];
7559892Sjasone};
7659892Sjasone
7759892Sjasone/*
7859892Sjasone * Constants used by the `signature'.
7959892Sjasone */
8059892Sjasone
8159892Sjasone/* I2O */
8259892Sjasone#define	DPTI_VERSION		1
8359892Sjasone#define	DPTI_REVISION		0
8459892Sjasone#define	DPTI_SUBREVISION	0
8559892Sjasone
8659892Sjasone#define	DPTI_YEAR		1
8759892Sjasone#define	DPTI_MONTH		9
8859892Sjasone#define	DPTI_DAY		12
8960385Sbde
9059892Sjasone/* EATA */
9159892Sjasone#define	DPT_VERSION		1
9259892Sjasone#define	DPT_REVISION		0
9359892Sjasone#define	DPT_SUBREVISION		0
9459892Sjasone
9559892Sjasone#define	DPT_YEAR		1
9659892Sjasone#define	DPT_MONTH		9
9759892Sjasone#define	DPT_DAY			12
9859892Sjasone
9959892Sjasone/*
10059892Sjasone * ioctls.  We define only the lower 16 bits, since the DPT utilities don't
10159892Sjasone * seem to obey the ioctl encoding conventions of each platform - the high
10259892Sjasone * 16 bits are relatively meaningless.
10359892Sjasone */
10459944Sphantom#define	DPT_EATAUSRCMD		0x4441
10559892Sjasone#define	DPT_DEBUG		0x4442
10659892Sjasone#define	DPT_SIGNATURE		0x4443
10759892Sjasone#define	DPT_NUMCTRLS		0x4444
10859892Sjasone#define	DPT_CTRLINFO		0x4445
10959892Sjasone#define	DPT_STATINFO		0x4446
11059944Sphantom#define	DPT_CLRSTAT		0x4447
11159892Sjasone#define	DPT_SYSINFO		0x4448
11259892Sjasone#define	DPT_TIMEOUT		0x4449
11359892Sjasone#define	DPT_CONFIG		0x444a
11459892Sjasone#define	DPT_BLINKLED		0x444b
11559944Sphantom#define	DPT_I2OUSRCMD		0x444c
11659892Sjasone#define	DPT_I2ORESCANCMD	0x444d
11759892Sjasone#define	DPT_I2ORESETCMD		0x444e
11859892Sjasone#define	DPT_TARGET_BUSY		0x444f
11959944Sphantom
12059892Sjasone/*
12159892Sjasone * Controller and system info structures.
12259892Sjasone */
12379754Sddstruct dpt_ctlrinfo {
12459892Sjasone	u_int16_t	length;
12559892Sjasone	u_int16_t	drvrHBAnum;
12659892Sjasone	u_int32_t	baseAddr;
12759892Sjasone	u_int16_t	blinkState;
128110442Scharnier	u_int8_t	pciBusNum;
12959892Sjasone	u_int8_t	pciDeviceNum;
130110442Scharnier	u_int16_t	hbaFlags;
13159892Sjasone	u_int16_t	Interrupt;
13259892Sjasone	u_int32_t	reserved1;
13359892Sjasone	u_int32_t	reserved2;
13459892Sjasone	u_int32_t	reserved3;
13559944Sphantom};
136110442Scharnier#define	FLG_OSD_PCI_VALID 0x0001
13759892Sjasone#define	FLG_OSD_DMA       0x0002
138110442Scharnier#define	FLG_OSD_I2O       0x0004
13959892Sjasone
14059892Sjasonestruct dpt_eata_ctlrinfo {
14159892Sjasone	u_int8_t	state;
14259892Sjasone	u_int8_t	id;
14359916Sjasone	int		vect;
14459944Sphantom	int		base;
145110442Scharnier	int		njobs;
14659892Sjasone	int		qdepth;
147111447Sru	int		wakebase;
148110636Salfred	u_long		sgsize;
149111447Sru	u_int		heads;
15059892Sjasone	u_int		sectors;
15159892Sjasone	u_int8_t	do_drive32;
15259892Sjasone	u_int8_t	busquiet;
15359892Sjasone	u_int8_t	idpal[4];
15459892Sjasone	u_int8_t	primary;
15559892Sjasone	u_int8_t	eataVersion;
15659944Sphantom	u_long		cpLength;
157110442Scharnier	u_long		spLength;
15859892Sjasone	u_int8_t	drqNum;
159110442Scharnier	u_int8_t	flag1;
16059892Sjasone	u_int8_t	flag2;
16159892Sjasone};
16259892Sjasone
16359892Sjasonestruct dpt_targetbusy {
16459892Sjasone	u_long		channel;
16559944Sphantom	u_long		id;
166110442Scharnier	u_long		lun;
16759892Sjasone	u_long		isbusy;
168110442Scharnier};
16959892Sjasone
17059892Sjasone#if (!defined(dsDescription_size))
17159892Sjasone# define dsDescription_size 46
17259892Sjasone#endif
17359892Sjasone
17459944Sphantomstruct dpt_sig {
175110442Scharnier	char		dsSignature[6];      /* ALWAYS "dPtSiG" */
17659892Sjasone	u_int8_t	dsSigVersion;        /* sig version (currently 1) */
177110442Scharnier	u_int8_t	dsProcessorFamily;   /* what type of processor */
17859892Sjasone	u_int8_t	dsProcessor;         /* precise processor */
17959892Sjasone	u_int8_t	dsFiletype;          /* type of file */
18059892Sjasone	u_int8_t	dsFiletypeFlags;     /* flags to specify type, etc. */
18159892Sjasone	u_int8_t	dsOEM;               /* OEM file was created for */
18259892Sjasone	u_int32_t	dsOS;                /* which Operating systems */
18359892Sjasone	u_int16_t	dsCapabilities;      /* RAID levels, etc. */
18459892Sjasone	u_int16_t	dsDeviceSupp;        /* SCSI device types supported */
18559892Sjasone	u_int16_t	dsAdapterSupp;       /* DPT HBA families supported */
18659944Sphantom	u_int16_t	dsApplication;       /* applications file is for */
187110442Scharnier	u_int8_t	dsRequirements;      /* Other driver dependencies */
18859892Sjasone	u_int8_t	dsVersion;           /* 1 */
189110442Scharnier	u_int8_t	dsRevision;          /* 'J' */
19059892Sjasone	u_int8_t	dsSubRevision;       /* '9'   ' ' if N/A */
19159892Sjasone	u_int8_t	dsMonth;             /* creation month */
19259892Sjasone	u_int8_t	dsDay;               /* creation day */
19359892Sjasone	u_int8_t	dsYear;              /* creation year since 1980 (1993=13) */
19459892Sjasone	char		dsDescription[dsDescription_size];
19559892Sjasone};
19659892Sjasone
19759892Sjasonestruct dpt_dparam {
19859944Sphantom	u_int16_t	cylinders;      /* Upto 1024 */
199110442Scharnier	u_int8_t	heads;          /* Upto 255 */
20059892Sjasone	u_int8_t	sectors;        /* Upto 63 */
201110442Scharnier};
20259892Sjasone
20359892Sjasonestruct dpt_sysinfo {
20459892Sjasone	u_int8_t	drive0CMOS;             /* CMOS Drive 0 Type */
20559892Sjasone	u_int8_t	drive1CMOS;             /* CMOS Drive 1 Type */
20659892Sjasone	u_int8_t	numDrives;              /* 0040:0075 contents */
20759892Sjasone	u_int8_t	processorFamily;        /* Same as DPTSIG's defs */
20859892Sjasone	u_int8_t	processorType;          /* Same as DPTSIG's defs */
20959892Sjasone	u_int8_t	smartROMMajorVersion;
21059892Sjasone	u_int8_t	smartROMMinorVersion;   /* SmartROM version */
211110812Sphantom	u_int8_t	smartROMRevision;
212201892Sdelphij	u_int16_t	flags;                  /* See bit definitions above */
21359892Sjasone	u_int16_t	conventionalMemSize;    /* in KB */
21459892Sjasone	u_int32_t	extendedMemSize;        /* in KB */
21559892Sjasone	u_int32_t	osType;                 /* Same as DPTSIG's defs */
21659892Sjasone	u_int8_t	osMajorVersion;
21759892Sjasone	u_int8_t	osMinorVersion;         /* The OS version */
21859892Sjasone	u_int8_t	osRevision;
21959892Sjasone	u_int8_t	osSubRevision;
22059892Sjasone	u_int8_t	busType;                /* See defininitions above */
22159892Sjasone	u_int8_t	pad[3];                 /* For alignment */
22259892Sjasone	struct	dpt_dparam drives[16];		/* SmartROM Logical Drives */
22359892Sjasone};
224110442Scharnier
22573092Sru/*
22659944Sphantom * Defs pertaining to dpt_sysinfo.
227110442Scharnier */
22859892Sjasone
22959892Sjasone#define	SI_CMOS_Valid		0x0001
23059892Sjasone#define	SI_NumDrivesValid	0x0002
23159892Sjasone#define	SI_ProcessorValid	0x0004
23259892Sjasone#define	SI_MemorySizeValid	0x0008
23359892Sjasone#define	SI_DriveParamsValid	0x0010
23459892Sjasone#define	SI_SmartROMverValid	0x0020
23559892Sjasone#define	SI_OSversionValid	0x0040
23659892Sjasone#define	SI_OSspecificValid	0x0080
237110442Scharnier#define	SI_BusTypeValid		0x0100
23859944Sphantom#define	SI_ALL_VALID            0x0FFF
239#define	SI_NO_SmartROM          0x8000
240
241#define	SI_ISA_BUS	0x00
242#define	SI_MCA_BUS	0x01
243#define	SI_EISA_BUS	0x02
244#define	SI_PCI_BUS	0x04
245
246
247/*
248 * Defs pertaining to dpt_sig.
249 */
250
251/* Current Signature Version - u_int8_t dsSigVersion; */
252/* ------------------------------------------------------------------ */
253#define	SIG_VERSION 1
254
255/* Processor Family - u_int8_t dsProcessorFamily;  DISTINCT VALUES */
256/* ------------------------------------------------------------------ */
257/* What type of processor the file is meant to run on. */
258/* This will let us know whether to read u_int16_ts as high/low or low/high. */
259#define	PROC_INTEL      0x00    /* Intel 80x86 */
260#define	PROC_MOTOROLA   0x01    /* Motorola 68K */
261#define	PROC_MIPS4000   0x02    /* MIPS RISC 4000 */
262#define	PROC_MIPS       0x02	/* MIPS RISC */
263#define	PROC_ALPHA      0x03    /* DEC Alpha */
264#define	PROC_POWERPC    0x04    /* IBM Power PC */
265#define	PROC_i960       0x05    /* Intel i960 */
266#define	PROC_ULTRASPARC 0x06    /* SPARC processor */
267
268/* Specific Minimum Processor - u_int8_t dsProcessor;    FLAG BITS */
269/* ------------------------------------------------------------------ */
270/* Different bit definitions dependent on processor_family */
271
272/* PROC_INTEL: */
273#define	PROC_8086       0x01    /* Intel 8086 */
274#define	PROC_286        0x02    /* Intel 80286 */
275#define	PROC_386        0x04    /* Intel 80386 */
276#define	PROC_486        0x08    /* Intel 80486 */
277#define	PROC_PENTIUM    0x10    /* Intel 586 aka P5 aka Pentium */
278#define	PROC_SEXIUM     0x20    /* Intel 686 aka P6 aka Pentium Pro or MMX */
279
280/* PROC_i960: */
281#define	PROC_960RX      0x01    /* Intel 80960RP/RD */
282#define	PROC_960HX      0x02    /* Intel 80960HA/HD/HT */
283#define	PROC_960RN      0x03    /* Intel 80960RN/RM */
284#define	PROC_960RS      0x04    /* Intel 80960RS */
285
286/* PROC_MOTOROLA: */
287#define	PROC_68000      0x01    /* Motorola 68000 */
288#define	PROC_68010      0x02    /* Motorola 68010 */
289#define	PROC_68020      0x04    /* Motorola 68020 */
290#define	PROC_68030      0x08    /* Motorola 68030 */
291#define	PROC_68040      0x10    /* Motorola 68040 */
292
293/* PROC_POWERPC */
294#define	PROC_PPC601             0x01    /* PowerPC 601 */
295#define	PROC_PPC603             0x02    /* PowerPC 603 */
296#define	PROC_PPC604             0x04    /* PowerPC 604 */
297
298/* PROC_MIPS */
299#define	PROC_R4000      0x01    /* MIPS R4000 */
300#define	PROC_RM7000     0x02    /* MIPS RM7000 */
301
302/* Filetype - u_int8_t dsFiletype;       DISTINCT VALUES */
303/* ------------------------------------------------------------------ */
304#define	FT_EXECUTABLE   0       /* Executable Program */
305#define	FT_SCRIPT       1       /* Script/Batch File??? */
306#define	FT_HBADRVR      2       /* HBA Driver */
307#define	FT_OTHERDRVR    3       /* Other Driver */
308#define	FT_IFS          4       /* Installable Filesystem Driver */
309#define	FT_ENGINE       5       /* DPT Engine */
310#define	FT_COMPDRVR     6       /* Compressed Driver Disk */
311#define	FT_LANGUAGE     7       /* Foreign Language file */
312#define	FT_FIRMWARE     8       /* Downloadable or actual Firmware */
313#define	FT_COMMMODL     9       /* Communications Module */
314#define	FT_INT13        10      /* INT 13 style HBA Driver */
315#define	FT_HELPFILE     11      /* Help file */
316#define	FT_LOGGER       12      /* Event Logger */
317#define	FT_INSTALL      13      /* An Install Program */
318#define	FT_LIBRARY      14      /* Storage Manager Real-Mode Calls */
319#define	FT_RESOURCE     15      /* Storage Manager Resource File */
320#define	FT_MODEM_DB     16      /* Storage Manager Modem Database */
321
322/* Filetype flags - u_int8_t dsFiletypeFlags;    FLAG BITS */
323/* ------------------------------------------------------------------ */
324#define	FTF_DLL         0x01    /* Dynamic Link Library */
325#define	FTF_NLM         0x02    /* Netware Loadable Module */
326#define	FTF_OVERLAYS    0x04    /* Uses overlays */
327#define	FTF_DEBUG       0x08    /* Debug version */
328#define	FTF_TSR         0x10    /* TSR */
329#define	FTF_SYS         0x20    /* DOS Loadable driver */
330#define	FTF_PROTECTED   0x40    /* Runs in protected mode */
331#define	FTF_APP_SPEC    0x80    /* Application Specific */
332#define	FTF_ROM         (FTF_SYS|FTF_TSR)       /* Special Case */
333
334/* OEM - u_int8_t dsOEM;         DISTINCT VALUES */
335/* ------------------------------------------------------------------ */
336#define	OEM_DPT         0       /* DPT */
337#define	OEM_ATT         1       /* ATT */
338#define	OEM_NEC         2       /* NEC */
339#define	OEM_ALPHA       3       /* Alphatronix */
340#define	OEM_AST         4       /* AST */
341#define	OEM_OLIVETTI    5       /* Olivetti */
342#define	OEM_SNI         6       /* Siemens/Nixdorf */
343#define	OEM_SUN         7       /* SUN Microsystems */
344#define	OEM_ADAPTEC     8       /* Adaptec */
345
346/* Operating System  - u_int32_t dsOS;    FLAG BITS */
347/* ------------------------------------------------------------------ */
348#define	OS_DOS          0x00000001 /* PC/MS-DOS                         */
349#define	OS_WINDOWS      0x00000002 /* Microsoft Windows 3.x             */
350#define	OS_WINDOWS_NT   0x00000004 /* Microsoft Windows NT              */
351#define	OS_OS2M         0x00000008 /* OS/2 1.2.x,MS 1.3.0,IBM 1.3.x - Monolithic */
352#define	OS_OS2L         0x00000010 /* Microsoft OS/2 1.301 - LADDR      */
353#define	OS_OS22x        0x00000020 /* IBM OS/2 2.x                      */
354#define	OS_NW286        0x00000040 /* Novell NetWare 286                */
355#define	OS_NW386        0x00000080 /* Novell NetWare 386                */
356#define	OS_GEN_UNIX     0x00000100 /* Generic Unix                      */
357#define	OS_SCO_UNIX     0x00000200 /* SCO Unix                          */
358#define	OS_ATT_UNIX     0x00000400 /* ATT Unix                          */
359#define	OS_UNIXWARE     0x00000800 /* USL Unix                          */
360#define	OS_INT_UNIX     0x00001000 /* Interactive Unix                  */
361#define	OS_SOLARIS      0x00002000 /* SunSoft Solaris                   */
362#define	OS_QNX          0x00004000 /* QNX for Tom Moch                  */
363#define	OS_NEXTSTEP     0x00008000 /* NeXTSTEP/OPENSTEP/MACH            */
364#define	OS_BANYAN       0x00010000 /* Banyan Vines                      */
365#define	OS_OLIVETTI_UNIX 0x00020000/* Olivetti Unix                     */
366#define	OS_MAC_OS       0x00040000 /* Mac OS                    	*/
367#define	OS_WINDOWS_95   0x00080000 /* Microsoft Windows '95             */
368#define	OS_NW4x         0x00100000 /* Novell Netware 4.x        	*/
369#define	OS_BSDI_UNIX    0x00200000 /* BSDi Unix BSD/OS 2.0 and up       */
370#define	OS_AIX_UNIX     0x00400000 /* AIX Unix                          */
371#define	OS_FREE_BSD     0x00800000 /* FreeBSD Unix              	*/
372#define	OS_LINUX        0x01000000 /* Linux                    	 	*/
373#define	OS_DGUX_UNIX    0x02000000 /* Data General Unix                 */
374#define	OS_SINIX_N      0x04000000 /* SNI SINIX-N                       */
375#define	OS_PLAN9        0x08000000 /* ATT Plan 9             		*/
376#define	OS_TSX          0x10000000 /* SNH TSX-32              	  	*/
377#define	OS_WINDOWS_98   0x20000000 /* Microsoft Windows '98    		*/
378
379#define	OS_OTHER        0x80000000 /* Other                             */
380
381/* Capabilities - u_int16_t dsCapabilities;        FLAG BITS */
382/* ------------------------------------------------------------------ */
383#define	CAP_RAID0       0x0001  /* RAID-0 */
384#define	CAP_RAID1       0x0002  /* RAID-1 */
385#define	CAP_RAID3       0x0004  /* RAID-3 */
386#define	CAP_RAID5       0x0008  /* RAID-5 */
387#define	CAP_SPAN        0x0010  /* Spanning */
388#define	CAP_PASS        0x0020  /* Provides passthrough */
389#define	CAP_OVERLAP     0x0040  /* Passthrough supports overlapped commands */
390#define	CAP_ASPI        0x0080  /* Supports ASPI Command Requests */
391#define	CAP_ABOVE16MB   0x0100  /* ISA Driver supports greater than 16MB */
392#define	CAP_EXTEND      0x8000  /* Extended info appears after description */
393#ifdef SNI_MIPS
394#define	CAP_CACHEMODE   0x1000  /* dpt_force_cache is set in driver */
395#endif
396
397/* Devices Supported - u_int16_t dsDeviceSupp;    FLAG BITS */
398/* ------------------------------------------------------------------ */
399#define	DEV_DASD        0x0001  /* DASD (hard drives) */
400#define	DEV_TAPE        0x0002  /* Tape drives */
401#define	DEV_PRINTER     0x0004  /* Printers */
402#define	DEV_PROC        0x0008  /* Processors */
403#define	DEV_WORM        0x0010  /* WORM drives */
404#define	DEV_CDROM       0x0020  /* CD-ROM drives */
405#define	DEV_SCANNER     0x0040  /* Scanners */
406#define	DEV_OPTICAL     0x0080  /* Optical Drives */
407#define	DEV_JUKEBOX     0x0100  /* Jukebox */
408#define	DEV_COMM        0x0200  /* Communications Devices */
409#define	DEV_OTHER       0x0400  /* Other Devices */
410#define	DEV_ALL         0xFFFF  /* All SCSI Devices */
411
412/* Adapters Families Supported - u_int16_t dsAdapterSupp; FLAG BITS */
413/* ------------------------------------------------------------------ */
414#define	ADF_2001        0x0001  /* PM2001           */
415#define	ADF_2012A       0x0002  /* PM2012A          */
416#define	ADF_PLUS_ISA    0x0004  /* PM2011,PM2021    */
417#define	ADF_PLUS_EISA   0x0008  /* PM2012B,PM2022   */
418#define	ADF_SC3_ISA     0x0010  /* PM2021           */
419#define	ADF_SC3_EISA    0x0020  /* PM2022,PM2122, etc */
420#define	ADF_SC3_PCI     0x0040  /* SmartCache III PCI */
421#define	ADF_SC4_ISA     0x0080  /* SmartCache IV ISA */
422#define	ADF_SC4_EISA    0x0100  /* SmartCache IV EISA */
423#define	ADF_SC4_PCI     0x0200  /* SmartCache IV PCI */
424#define	ADF_SC5_PCI     0x0400  /* Fifth Generation I2O products */
425/*
426 *      Combinations of products
427 */
428#define	ADF_ALL_2000    (ADF_2001|ADF_2012A)
429#define	ADF_ALL_PLUS    (ADF_PLUS_ISA|ADF_PLUS_EISA)
430#define	ADF_ALL_SC3     (ADF_SC3_ISA|ADF_SC3_EISA|ADF_SC3_PCI)
431#define	ADF_ALL_SC4     (ADF_SC4_ISA|ADF_SC4_EISA|ADF_SC4_PCI)
432#define	ADF_ALL_SC5     (ADF_SC5_PCI)
433/* All EATA Cacheing Products */
434#define	ADF_ALL_CACHE   (ADF_ALL_PLUS|ADF_ALL_SC3|ADF_ALL_SC4)
435/* All EATA Bus Mastering Products */
436#define	ADF_ALL_MASTER  (ADF_2012A|ADF_ALL_CACHE)
437/* All EATA Adapter Products */
438#define	ADF_ALL_EATA    (ADF_2001|ADF_ALL_MASTER)
439#define	ADF_ALL         ADF_ALL_EATA
440
441/* Application - u_int16_t dsApplication;         FLAG BITS */
442/* ------------------------------------------------------------------ */
443#define	APP_DPTMGR      0x0001  /* DPT Storage Manager */
444#define	APP_ENGINE      0x0002  /* DPT Engine */
445#define	APP_SYTOS       0x0004  /* Sytron Sytos Plus */
446#define	APP_CHEYENNE    0x0008  /* Cheyenne ARCServe + ARCSolo */
447#define	APP_MSCDEX      0x0010  /* Microsoft CD-ROM extensions */
448#define	APP_NOVABACK    0x0020  /* NovaStor Novaback */
449#define	APP_AIM         0x0040  /* Archive Information Manager */
450
451/* Requirements - u_int8_t dsRequirements;         FLAG BITS            */
452/* ------------------------------------------------------------------   */
453#define	REQ_SMARTROM    0x01    /* Requires SmartROM to be present      */
454#define	REQ_DPTDDL      0x02    /* Requires DPTDDL.SYS to be loaded     */
455#define	REQ_HBA_DRIVER  0x04    /* Requires an HBA driver to be loaded  */
456#define	REQ_ASPI_TRAN   0x08    /* Requires an ASPI Transport Modules   */
457#define	REQ_ENGINE      0x10    /* Requires a DPT Engine to be loaded   */
458#define	REQ_COMM_ENG    0x20    /* Requires a DPT Communications Engine */
459
460/* ------------------------------------------------------------------   */
461/* Requirements - u_int16_t dsFirmware;         FLAG BITS               */
462/* ------------------------------------------------------------------   */
463#define	dsFirmware dsApplication
464#define	FW_DNLDSIZE0      0x0000    /* 0..2 DownLoader Size - NONE      */
465#define	FW_DNLDSIZE16     0x0001    /* 0..2 DownLoader Size 16K         */
466#define	FW_DNLDSIZE32     0x0002    /* 0..2 DownLoader Size 32K         */
467#define	FW_DNLDSIZE64     0x0004    /* 0..2 DownLoader Size 64K         */
468
469#define	FW_LOAD_BTM       0x2000        /* 13 Load Offset (1=Btm, 0=Top)    */
470#define	FW_LOAD_TOP       0x0000        /* 13 Load Offset (1=Btm, 0=Top)    */
471#define	FW_SIG_VERSION1   0x0000        /* 15..14 Version Bits 0=Ver1       */
472
473#endif	/* !_I2O_DPTIVAR_H_ */
474