aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dpt
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/dpt
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/scsi/dpt')
-rw-r--r--drivers/scsi/dpt/dpti_i2o.h459
-rw-r--r--drivers/scsi/dpt/dpti_ioctl.h139
-rw-r--r--drivers/scsi/dpt/dptsig.h339
-rw-r--r--drivers/scsi/dpt/osd_defs.h79
-rw-r--r--drivers/scsi/dpt/osd_util.h358
-rw-r--r--drivers/scsi/dpt/sys_info.h417
6 files changed, 1791 insertions, 0 deletions
diff --git a/drivers/scsi/dpt/dpti_i2o.h b/drivers/scsi/dpt/dpti_i2o.h
new file mode 100644
index 000000000000..a9585f5235d9
--- /dev/null
+++ b/drivers/scsi/dpt/dpti_i2o.h
@@ -0,0 +1,459 @@
1#ifndef _SCSI_I2O_H
2#define _SCSI_I2O_H
3
4/* I2O kernel space accessible structures/APIs
5 *
6 * (c) Copyright 1999, 2000 Red Hat Software
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 *
13 *************************************************************************
14 *
15 * This header file defined the I2O APIs/structures for use by
16 * the I2O kernel modules.
17 *
18 */
19
20#ifdef __KERNEL__ /* This file to be included by kernel only */
21
22#include <linux/i2o-dev.h>
23
24#include <asm/semaphore.h> /* Needed for MUTEX init macros */
25#include <linux/version.h>
26#include <linux/config.h>
27#include <linux/notifier.h>
28#include <asm/atomic.h>
29
30
31/*
32 * Tunable parameters first
33 */
34
35/* How many different OSM's are we allowing */
36#define MAX_I2O_MODULES 64
37
38#define I2O_EVT_CAPABILITY_OTHER 0x01
39#define I2O_EVT_CAPABILITY_CHANGED 0x02
40
41#define I2O_EVT_SENSOR_STATE_CHANGED 0x01
42
43//#ifdef __KERNEL__ /* ioctl stuff only thing exported to users */
44
45#define I2O_MAX_MANAGERS 4
46
47/*
48 * I2O Interface Objects
49 */
50
51#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
52
53#define DECLARE_MUTEX(name) struct semaphore name=MUTEX
54
55typedef struct wait_queue *adpt_wait_queue_head_t;
56#define ADPT_DECLARE_WAIT_QUEUE_HEAD(wait) adpt_wait_queue_head_t wait = NULL
57typedef struct wait_queue adpt_wait_queue_t;
58#else
59
60#include <linux/wait.h>
61typedef wait_queue_head_t adpt_wait_queue_head_t;
62#define ADPT_DECLARE_WAIT_QUEUE_HEAD(wait) DECLARE_WAIT_QUEUE_HEAD(wait)
63typedef wait_queue_t adpt_wait_queue_t;
64
65#endif
66/*
67 * message structures
68 */
69
70struct i2o_message
71{
72 u8 version_offset;
73 u8 flags;
74 u16 size;
75 u32 target_tid:12;
76 u32 init_tid:12;
77 u32 function:8;
78 u32 initiator_context;
79 /* List follows */
80};
81
82struct adpt_device;
83struct _adpt_hba;
84struct i2o_device
85{
86 struct i2o_device *next; /* Chain */
87 struct i2o_device *prev;
88
89 char dev_name[8]; /* linux /dev name if available */
90 i2o_lct_entry lct_data;/* Device LCT information */
91 u32 flags;
92 struct proc_dir_entry* proc_entry; /* /proc dir */
93 struct adpt_device *owner;
94 struct _adpt_hba *controller; /* Controlling IOP */
95};
96
97/*
98 * Each I2O controller has one of these objects
99 */
100
101struct i2o_controller
102{
103 char name[16];
104 int unit;
105 int type;
106 int enabled;
107
108 struct notifier_block *event_notifer; /* Events */
109 atomic_t users;
110 struct i2o_device *devices; /* I2O device chain */
111 struct i2o_controller *next; /* Controller chain */
112
113};
114
115/*
116 * I2O System table entry
117 */
118struct i2o_sys_tbl_entry
119{
120 u16 org_id;
121 u16 reserved1;
122 u32 iop_id:12;
123 u32 reserved2:20;
124 u16 seg_num:12;
125 u16 i2o_version:4;
126 u8 iop_state;
127 u8 msg_type;
128 u16 frame_size;
129 u16 reserved3;
130 u32 last_changed;
131 u32 iop_capabilities;
132 u32 inbound_low;
133 u32 inbound_high;
134};
135
136struct i2o_sys_tbl
137{
138 u8 num_entries;
139 u8 version;
140 u16 reserved1;
141 u32 change_ind;
142 u32 reserved2;
143 u32 reserved3;
144 struct i2o_sys_tbl_entry iops[0];
145};
146
147/*
148 * I2O classes / subclasses
149 */
150
151/* Class ID and Code Assignments
152 * (LCT.ClassID.Version field)
153 */
154#define I2O_CLASS_VERSION_10 0x00
155#define I2O_CLASS_VERSION_11 0x01
156
157/* Class code names
158 * (from v1.5 Table 6-1 Class Code Assignments.)
159 */
160
161#define I2O_CLASS_EXECUTIVE 0x000
162#define I2O_CLASS_DDM 0x001
163#define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x010
164#define I2O_CLASS_SEQUENTIAL_STORAGE 0x011
165#define I2O_CLASS_LAN 0x020
166#define I2O_CLASS_WAN 0x030
167#define I2O_CLASS_FIBRE_CHANNEL_PORT 0x040
168#define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x041
169#define I2O_CLASS_SCSI_PERIPHERAL 0x051
170#define I2O_CLASS_ATE_PORT 0x060
171#define I2O_CLASS_ATE_PERIPHERAL 0x061
172#define I2O_CLASS_FLOPPY_CONTROLLER 0x070
173#define I2O_CLASS_FLOPPY_DEVICE 0x071
174#define I2O_CLASS_BUS_ADAPTER_PORT 0x080
175#define I2O_CLASS_PEER_TRANSPORT_AGENT 0x090
176#define I2O_CLASS_PEER_TRANSPORT 0x091
177
178/* Rest of 0x092 - 0x09f reserved for peer-to-peer classes
179 */
180
181#define I2O_CLASS_MATCH_ANYCLASS 0xffffffff
182
183/* Subclasses
184 */
185
186#define I2O_SUBCLASS_i960 0x001
187#define I2O_SUBCLASS_HDM 0x020
188#define I2O_SUBCLASS_ISM 0x021
189
190/* Operation functions */
191
192#define I2O_PARAMS_FIELD_GET 0x0001
193#define I2O_PARAMS_LIST_GET 0x0002
194#define I2O_PARAMS_MORE_GET 0x0003
195#define I2O_PARAMS_SIZE_GET 0x0004
196#define I2O_PARAMS_TABLE_GET 0x0005
197#define I2O_PARAMS_FIELD_SET 0x0006
198#define I2O_PARAMS_LIST_SET 0x0007
199#define I2O_PARAMS_ROW_ADD 0x0008
200#define I2O_PARAMS_ROW_DELETE 0x0009
201#define I2O_PARAMS_TABLE_CLEAR 0x000A
202
203/*
204 * I2O serial number conventions / formats
205 * (circa v1.5)
206 */
207
208#define I2O_SNFORMAT_UNKNOWN 0
209#define I2O_SNFORMAT_BINARY 1
210#define I2O_SNFORMAT_ASCII 2
211#define I2O_SNFORMAT_UNICODE 3
212#define I2O_SNFORMAT_LAN48_MAC 4
213#define I2O_SNFORMAT_WAN 5
214
215/* Plus new in v2.0 (Yellowstone pdf doc)
216 */
217
218#define I2O_SNFORMAT_LAN64_MAC 6
219#define I2O_SNFORMAT_DDM 7
220#define I2O_SNFORMAT_IEEE_REG64 8
221#define I2O_SNFORMAT_IEEE_REG128 9
222#define I2O_SNFORMAT_UNKNOWN2 0xff
223
224/* Transaction Reply Lists (TRL) Control Word structure */
225
226#define TRL_SINGLE_FIXED_LENGTH 0x00
227#define TRL_SINGLE_VARIABLE_LENGTH 0x40
228#define TRL_MULTIPLE_FIXED_LENGTH 0x80
229
230/*
231 * Messaging API values
232 */
233
234#define I2O_CMD_ADAPTER_ASSIGN 0xB3
235#define I2O_CMD_ADAPTER_READ 0xB2
236#define I2O_CMD_ADAPTER_RELEASE 0xB5
237#define I2O_CMD_BIOS_INFO_SET 0xA5
238#define I2O_CMD_BOOT_DEVICE_SET 0xA7
239#define I2O_CMD_CONFIG_VALIDATE 0xBB
240#define I2O_CMD_CONN_SETUP 0xCA
241#define I2O_CMD_DDM_DESTROY 0xB1
242#define I2O_CMD_DDM_ENABLE 0xD5
243#define I2O_CMD_DDM_QUIESCE 0xC7
244#define I2O_CMD_DDM_RESET 0xD9
245#define I2O_CMD_DDM_SUSPEND 0xAF
246#define I2O_CMD_DEVICE_ASSIGN 0xB7
247#define I2O_CMD_DEVICE_RELEASE 0xB9
248#define I2O_CMD_HRT_GET 0xA8
249#define I2O_CMD_ADAPTER_CLEAR 0xBE
250#define I2O_CMD_ADAPTER_CONNECT 0xC9
251#define I2O_CMD_ADAPTER_RESET 0xBD
252#define I2O_CMD_LCT_NOTIFY 0xA2
253#define I2O_CMD_OUTBOUND_INIT 0xA1
254#define I2O_CMD_PATH_ENABLE 0xD3
255#define I2O_CMD_PATH_QUIESCE 0xC5
256#define I2O_CMD_PATH_RESET 0xD7
257#define I2O_CMD_STATIC_MF_CREATE 0xDD
258#define I2O_CMD_STATIC_MF_RELEASE 0xDF
259#define I2O_CMD_STATUS_GET 0xA0
260#define I2O_CMD_SW_DOWNLOAD 0xA9
261#define I2O_CMD_SW_UPLOAD 0xAB
262#define I2O_CMD_SW_REMOVE 0xAD
263#define I2O_CMD_SYS_ENABLE 0xD1
264#define I2O_CMD_SYS_MODIFY 0xC1
265#define I2O_CMD_SYS_QUIESCE 0xC3
266#define I2O_CMD_SYS_TAB_SET 0xA3
267
268#define I2O_CMD_UTIL_NOP 0x00
269#define I2O_CMD_UTIL_ABORT 0x01
270#define I2O_CMD_UTIL_CLAIM 0x09
271#define I2O_CMD_UTIL_RELEASE 0x0B
272#define I2O_CMD_UTIL_PARAMS_GET 0x06
273#define I2O_CMD_UTIL_PARAMS_SET 0x05
274#define I2O_CMD_UTIL_EVT_REGISTER 0x13
275#define I2O_CMD_UTIL_EVT_ACK 0x14
276#define I2O_CMD_UTIL_CONFIG_DIALOG 0x10
277#define I2O_CMD_UTIL_DEVICE_RESERVE 0x0D
278#define I2O_CMD_UTIL_DEVICE_RELEASE 0x0F
279#define I2O_CMD_UTIL_LOCK 0x17
280#define I2O_CMD_UTIL_LOCK_RELEASE 0x19
281#define I2O_CMD_UTIL_REPLY_FAULT_NOTIFY 0x15
282
283#define I2O_CMD_SCSI_EXEC 0x81
284#define I2O_CMD_SCSI_ABORT 0x83
285#define I2O_CMD_SCSI_BUSRESET 0x27
286
287#define I2O_CMD_BLOCK_READ 0x30
288#define I2O_CMD_BLOCK_WRITE 0x31
289#define I2O_CMD_BLOCK_CFLUSH 0x37
290#define I2O_CMD_BLOCK_MLOCK 0x49
291#define I2O_CMD_BLOCK_MUNLOCK 0x4B
292#define I2O_CMD_BLOCK_MMOUNT 0x41
293#define I2O_CMD_BLOCK_MEJECT 0x43
294
295#define I2O_PRIVATE_MSG 0xFF
296
297/*
298 * Init Outbound Q status
299 */
300
301#define I2O_CMD_OUTBOUND_INIT_IN_PROGRESS 0x01
302#define I2O_CMD_OUTBOUND_INIT_REJECTED 0x02
303#define I2O_CMD_OUTBOUND_INIT_FAILED 0x03
304#define I2O_CMD_OUTBOUND_INIT_COMPLETE 0x04
305
306/*
307 * I2O Get Status State values
308 */
309
310#define ADAPTER_STATE_INITIALIZING 0x01
311#define ADAPTER_STATE_RESET 0x02
312#define ADAPTER_STATE_HOLD 0x04
313#define ADAPTER_STATE_READY 0x05
314#define ADAPTER_STATE_OPERATIONAL 0x08
315#define ADAPTER_STATE_FAILED 0x10
316#define ADAPTER_STATE_FAULTED 0x11
317
318/* I2O API function return values */
319
320#define I2O_RTN_NO_ERROR 0
321#define I2O_RTN_NOT_INIT 1
322#define I2O_RTN_FREE_Q_EMPTY 2
323#define I2O_RTN_TCB_ERROR 3
324#define I2O_RTN_TRANSACTION_ERROR 4
325#define I2O_RTN_ADAPTER_ALREADY_INIT 5
326#define I2O_RTN_MALLOC_ERROR 6
327#define I2O_RTN_ADPTR_NOT_REGISTERED 7
328#define I2O_RTN_MSG_REPLY_TIMEOUT 8
329#define I2O_RTN_NO_STATUS 9
330#define I2O_RTN_NO_FIRM_VER 10
331#define I2O_RTN_NO_LINK_SPEED 11
332
333/* Reply message status defines for all messages */
334
335#define I2O_REPLY_STATUS_SUCCESS 0x00
336#define I2O_REPLY_STATUS_ABORT_DIRTY 0x01
337#define I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER 0x02
338#define I2O_REPLY_STATUS_ABORT_PARTIAL_TRANSFER 0x03
339#define I2O_REPLY_STATUS_ERROR_DIRTY 0x04
340#define I2O_REPLY_STATUS_ERROR_NO_DATA_TRANSFER 0x05
341#define I2O_REPLY_STATUS_ERROR_PARTIAL_TRANSFER 0x06
342#define I2O_REPLY_STATUS_PROCESS_ABORT_DIRTY 0x08
343#define I2O_REPLY_STATUS_PROCESS_ABORT_NO_DATA_TRANSFER 0x09
344#define I2O_REPLY_STATUS_PROCESS_ABORT_PARTIAL_TRANSFER 0x0A
345#define I2O_REPLY_STATUS_TRANSACTION_ERROR 0x0B
346#define I2O_REPLY_STATUS_PROGRESS_REPORT 0x80
347
348/* Status codes and Error Information for Parameter functions */
349
350#define I2O_PARAMS_STATUS_SUCCESS 0x00
351#define I2O_PARAMS_STATUS_BAD_KEY_ABORT 0x01
352#define I2O_PARAMS_STATUS_BAD_KEY_CONTINUE 0x02
353#define I2O_PARAMS_STATUS_BUFFER_FULL 0x03
354#define I2O_PARAMS_STATUS_BUFFER_TOO_SMALL 0x04
355#define I2O_PARAMS_STATUS_FIELD_UNREADABLE 0x05
356#define I2O_PARAMS_STATUS_FIELD_UNWRITEABLE 0x06
357#define I2O_PARAMS_STATUS_INSUFFICIENT_FIELDS 0x07
358#define I2O_PARAMS_STATUS_INVALID_GROUP_ID 0x08
359#define I2O_PARAMS_STATUS_INVALID_OPERATION 0x09
360#define I2O_PARAMS_STATUS_NO_KEY_FIELD 0x0A
361#define I2O_PARAMS_STATUS_NO_SUCH_FIELD 0x0B
362#define I2O_PARAMS_STATUS_NON_DYNAMIC_GROUP 0x0C
363#define I2O_PARAMS_STATUS_OPERATION_ERROR 0x0D
364#define I2O_PARAMS_STATUS_SCALAR_ERROR 0x0E
365#define I2O_PARAMS_STATUS_TABLE_ERROR 0x0F
366#define I2O_PARAMS_STATUS_WRONG_GROUP_TYPE 0x10
367
368/* DetailedStatusCode defines for Executive, DDM, Util and Transaction error
369 * messages: Table 3-2 Detailed Status Codes.*/
370
371#define I2O_DSC_SUCCESS 0x0000
372#define I2O_DSC_BAD_KEY 0x0002
373#define I2O_DSC_TCL_ERROR 0x0003
374#define I2O_DSC_REPLY_BUFFER_FULL 0x0004
375#define I2O_DSC_NO_SUCH_PAGE 0x0005
376#define I2O_DSC_INSUFFICIENT_RESOURCE_SOFT 0x0006
377#define I2O_DSC_INSUFFICIENT_RESOURCE_HARD 0x0007
378#define I2O_DSC_CHAIN_BUFFER_TOO_LARGE 0x0009
379#define I2O_DSC_UNSUPPORTED_FUNCTION 0x000A
380#define I2O_DSC_DEVICE_LOCKED 0x000B
381#define I2O_DSC_DEVICE_RESET 0x000C
382#define I2O_DSC_INAPPROPRIATE_FUNCTION 0x000D
383#define I2O_DSC_INVALID_INITIATOR_ADDRESS 0x000E
384#define I2O_DSC_INVALID_MESSAGE_FLAGS 0x000F
385#define I2O_DSC_INVALID_OFFSET 0x0010
386#define I2O_DSC_INVALID_PARAMETER 0x0011
387#define I2O_DSC_INVALID_REQUEST 0x0012
388#define I2O_DSC_INVALID_TARGET_ADDRESS 0x0013
389#define I2O_DSC_MESSAGE_TOO_LARGE 0x0014
390#define I2O_DSC_MESSAGE_TOO_SMALL 0x0015
391#define I2O_DSC_MISSING_PARAMETER 0x0016
392#define I2O_DSC_TIMEOUT 0x0017
393#define I2O_DSC_UNKNOWN_ERROR 0x0018
394#define I2O_DSC_UNKNOWN_FUNCTION 0x0019
395#define I2O_DSC_UNSUPPORTED_VERSION 0x001A
396#define I2O_DSC_DEVICE_BUSY 0x001B
397#define I2O_DSC_DEVICE_NOT_AVAILABLE 0x001C
398
399/* Device Claim Types */
400#define I2O_CLAIM_PRIMARY 0x01000000
401#define I2O_CLAIM_MANAGEMENT 0x02000000
402#define I2O_CLAIM_AUTHORIZED 0x03000000
403#define I2O_CLAIM_SECONDARY 0x04000000
404
405/* Message header defines for VersionOffset */
406#define I2OVER15 0x0001
407#define I2OVER20 0x0002
408/* Default is 1.5, FIXME: Need support for both 1.5 and 2.0 */
409#define I2OVERSION I2OVER15
410#define SGL_OFFSET_0 I2OVERSION
411#define SGL_OFFSET_4 (0x0040 | I2OVERSION)
412#define SGL_OFFSET_5 (0x0050 | I2OVERSION)
413#define SGL_OFFSET_6 (0x0060 | I2OVERSION)
414#define SGL_OFFSET_7 (0x0070 | I2OVERSION)
415#define SGL_OFFSET_8 (0x0080 | I2OVERSION)
416#define SGL_OFFSET_9 (0x0090 | I2OVERSION)
417#define SGL_OFFSET_10 (0x00A0 | I2OVERSION)
418#define SGL_OFFSET_12 (0x00C0 | I2OVERSION)
419
420#define TRL_OFFSET_5 (0x0050 | I2OVERSION)
421#define TRL_OFFSET_6 (0x0060 | I2OVERSION)
422
423 /* msg header defines for MsgFlags */
424#define MSG_STATIC 0x0100
425#define MSG_64BIT_CNTXT 0x0200
426#define MSG_MULTI_TRANS 0x1000
427#define MSG_FAIL 0x2000
428#define MSG_LAST 0x4000
429#define MSG_REPLY 0x8000
430
431 /* minimum size msg */
432#define THREE_WORD_MSG_SIZE 0x00030000
433#define FOUR_WORD_MSG_SIZE 0x00040000
434#define FIVE_WORD_MSG_SIZE 0x00050000
435#define SIX_WORD_MSG_SIZE 0x00060000
436#define SEVEN_WORD_MSG_SIZE 0x00070000
437#define EIGHT_WORD_MSG_SIZE 0x00080000
438#define NINE_WORD_MSG_SIZE 0x00090000
439#define TEN_WORD_MSG_SIZE 0x000A0000
440#define I2O_MESSAGE_SIZE(x) ((x)<<16)
441
442
443/* Special TID Assignments */
444
445#define ADAPTER_TID 0
446#define HOST_TID 1
447
448#define MSG_FRAME_SIZE 128
449#define NMBR_MSG_FRAMES 128
450
451#define MSG_POOL_SIZE 16384
452
453#define I2O_POST_WAIT_OK 0
454#define I2O_POST_WAIT_TIMEOUT -ETIMEDOUT
455
456
457#endif /* __KERNEL__ */
458
459#endif /* _SCSI_I2O_H */
diff --git a/drivers/scsi/dpt/dpti_ioctl.h b/drivers/scsi/dpt/dpti_ioctl.h
new file mode 100644
index 000000000000..82d24864be0c
--- /dev/null
+++ b/drivers/scsi/dpt/dpti_ioctl.h
@@ -0,0 +1,139 @@
1/***************************************************************************
2 dpti_ioctl.h - description
3 -------------------
4 begin : Thu Sep 7 2000
5 copyright : (C) 2001 by Adaptec
6
7 See Documentation/scsi/dpti.txt for history, notes, license info
8 and credits
9 ***************************************************************************/
10
11/***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
17 * *
18 ***************************************************************************/
19
20/***************************************************************************
21 * This file is generated from osd_unix.h *
22 * *************************************************************************/
23
24#ifndef _dpti_ioctl_h
25#define _dpti_ioctl_h
26
27// IOCTL interface commands
28
29#ifndef _IOWR
30# define _IOWR(x,y,z) (((x)<<8)|y)
31#endif
32#ifndef _IOW
33# define _IOW(x,y,z) (((x)<<8)|y)
34#endif
35#ifndef _IOR
36# define _IOR(x,y,z) (((x)<<8)|y)
37#endif
38#ifndef _IO
39# define _IO(x,y) (((x)<<8)|y)
40#endif
41/* EATA PassThrough Command */
42#define EATAUSRCMD _IOWR('D',65,EATA_CP)
43/* Set Debug Level If Enabled */
44#define DPT_DEBUG _IOW('D',66,int)
45/* Get Signature Structure */
46#define DPT_SIGNATURE _IOR('D',67,dpt_sig_S)
47#if defined __bsdi__
48#define DPT_SIGNATURE_PACKED _IOR('D',67,dpt_sig_S_Packed)
49#endif
50/* Get Number Of DPT Adapters */
51#define DPT_NUMCTRLS _IOR('D',68,int)
52/* Get Adapter Info Structure */
53#define DPT_CTRLINFO _IOR('D',69,CtrlInfo)
54/* Get Statistics If Enabled */
55#define DPT_STATINFO _IO('D',70)
56/* Clear Stats If Enabled */
57#define DPT_CLRSTAT _IO('D',71)
58/* Get System Info Structure */
59#define DPT_SYSINFO _IOR('D',72,sysInfo_S)
60/* Set Timeout Value */
61#define DPT_TIMEOUT _IO('D',73)
62/* Get config Data */
63#define DPT_CONFIG _IO('D',74)
64/* Get Blink LED Code */
65#define DPT_BLINKLED _IOR('D',75,int)
66/* Get Statistical information (if available) */
67#define DPT_STATS_INFO _IOR('D',80,STATS_DATA)
68/* Clear the statistical information */
69#define DPT_STATS_CLEAR _IO('D',81)
70/* Get Performance metrics */
71#define DPT_PERF_INFO _IOR('D',82,dpt_perf_t)
72/* Send an I2O command */
73#define I2OUSRCMD _IO('D',76)
74/* Inform driver to re-acquire LCT information */
75#define I2ORESCANCMD _IO('D',77)
76/* Inform driver to reset adapter */
77#define I2ORESETCMD _IO('D',78)
78/* See if the target is mounted */
79#define DPT_TARGET_BUSY _IOR('D',79, TARGET_BUSY_T)
80
81
82 /* Structure Returned From Get Controller Info */
83
84typedef struct {
85 uCHAR state; /* Operational state */
86 uCHAR id; /* Host adapter SCSI id */
87 int vect; /* Interrupt vector number */
88 int base; /* Base I/O address */
89 int njobs; /* # of jobs sent to HA */
90 int qdepth; /* Controller queue depth. */
91 int wakebase; /* mpx wakeup base index. */
92 uLONG SGsize; /* Scatter/Gather list size. */
93 unsigned heads; /* heads for drives on cntlr. */
94 unsigned sectors; /* sectors for drives on cntlr. */
95 uCHAR do_drive32; /* Flag for Above 16 MB Ability */
96 uCHAR BusQuiet; /* SCSI Bus Quiet Flag */
97 char idPAL[4]; /* 4 Bytes Of The ID Pal */
98 uCHAR primary; /* 1 For Primary, 0 For Secondary */
99 uCHAR eataVersion; /* EATA Version */
100 uLONG cpLength; /* EATA Command Packet Length */
101 uLONG spLength; /* EATA Status Packet Length */
102 uCHAR drqNum; /* DRQ Index (0,5,6,7) */
103 uCHAR flag1; /* EATA Flags 1 (Byte 9) */
104 uCHAR flag2; /* EATA Flags 2 (Byte 30) */
105} CtrlInfo;
106
107typedef struct {
108 uSHORT length; // Remaining length of this
109 uSHORT drvrHBAnum; // Relative HBA # used by the driver
110 uLONG baseAddr; // Base I/O address
111 uSHORT blinkState; // Blink LED state (0=Not in blink LED)
112 uCHAR pciBusNum; // PCI Bus # (Optional)
113 uCHAR pciDeviceNum; // PCI Device # (Optional)
114 uSHORT hbaFlags; // Miscellaneous HBA flags
115 uSHORT Interrupt; // Interrupt set for this device.
116# if (defined(_DPT_ARC))
117 uLONG baseLength;
118 ADAPTER_OBJECT *AdapterObject;
119 LARGE_INTEGER DmaLogicalAddress;
120 PVOID DmaVirtualAddress;
121 LARGE_INTEGER ReplyLogicalAddress;
122 PVOID ReplyVirtualAddress;
123# else
124 uLONG reserved1; // Reserved for future expansion
125 uLONG reserved2; // Reserved for future expansion
126 uLONG reserved3; // Reserved for future expansion
127# endif
128} drvrHBAinfo_S;
129
130typedef struct TARGET_BUSY
131{
132 uLONG channel;
133 uLONG id;
134 uLONG lun;
135 uLONG isBusy;
136} TARGET_BUSY_T;
137
138#endif
139
diff --git a/drivers/scsi/dpt/dptsig.h b/drivers/scsi/dpt/dptsig.h
new file mode 100644
index 000000000000..95a4cce6c892
--- /dev/null
+++ b/drivers/scsi/dpt/dptsig.h
@@ -0,0 +1,339 @@
1/* BSDI dptsig.h,v 1.7 1998/06/03 19:15:00 karels Exp */
2
3/*
4 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
5 * All rights reserved.
6 *
7 * Redistribution and use in source form, with or without modification, are
8 * permitted provided that redistributions of source code must retain the
9 * above copyright notice, this list of conditions and the following disclaimer.
10 *
11 * This software is provided `as is' by Distributed Processing Technology and
12 * any express or implied warranties, including, but not limited to, the
13 * implied warranties of merchantability and fitness for a particular purpose,
14 * are disclaimed. In no event shall Distributed Processing Technology be
15 * liable for any direct, indirect, incidental, special, exemplary or
16 * consequential damages (including, but not limited to, procurement of
17 * substitute goods or services; loss of use, data, or profits; or business
18 * interruptions) however caused and on any theory of liability, whether in
19 * contract, strict liability, or tort (including negligence or otherwise)
20 * arising in any way out of the use of this driver software, even if advised
21 * of the possibility of such damage.
22 *
23 */
24
25#ifndef __DPTSIG_H_
26#define __DPTSIG_H_
27#ifdef _SINIX_ADDON
28#include "dpt.h"
29#endif
30/* DPT SIGNATURE SPEC AND HEADER FILE */
31/* Signature Version 1 (sorry no 'A') */
32
33/* to make sure we are talking the same size under all OS's */
34typedef unsigned char sigBYTE;
35typedef unsigned short sigWORD;
36#if (defined(_MULTI_DATAMODEL) && defined(sun) && !defined(_ILP32))
37typedef uint32_t sigLONG;
38#else
39typedef unsigned long sigLONG;
40#endif
41
42/*
43 * use sigWORDLittleEndian for:
44 * dsCapabilities
45 * dsDeviceSupp
46 * dsAdapterSupp
47 * dsApplication
48 * use sigLONGLittleEndian for:
49 * dsOS
50 * so that the sig can be standardised to Little Endian
51 */
52#if (defined(_DPT_BIG_ENDIAN))
53# define sigWORDLittleEndian(x) ((((x)&0xFF)<<8)|(((x)>>8)&0xFF))
54# define sigLONGLittleEndian(x) \
55 ((((x)&0xFF)<<24) | \
56 (((x)&0xFF00)<<8) | \
57 (((x)&0xFF0000L)>>8) | \
58 (((x)&0xFF000000L)>>24))
59#else
60# define sigWORDLittleEndian(x) (x)
61# define sigLONGLittleEndian(x) (x)
62#endif
63
64/* must make sure the structure is not word or double-word aligned */
65/* --------------------------------------------------------------- */
66/* Borland will ignore the following pragma: */
67/* Word alignment is OFF by default. If in the, IDE make */
68/* sure that Options | Compiler | Code Generation | Word Alignment */
69/* is not checked. If using BCC, do not use the -a option. */
70
71#ifndef NO_PACK
72#if defined (_DPT_AIX)
73#pragma options align=packed
74#else
75#pragma pack(1)
76#endif /* aix */
77#endif
78/* For the Macintosh */
79#if STRUCTALIGNMENTSUPPORTED
80#pragma options align=mac68k
81#endif
82
83
84/* Current Signature Version - sigBYTE dsSigVersion; */
85/* ------------------------------------------------------------------ */
86#define SIG_VERSION 1
87
88/* Processor Family - sigBYTE dsProcessorFamily; DISTINCT VALUES */
89/* ------------------------------------------------------------------ */
90/* What type of processor the file is meant to run on. */
91/* This will let us know whether to read sigWORDs as high/low or low/high. */
92#define PROC_INTEL 0x00 /* Intel 80x86 */
93#define PROC_MOTOROLA 0x01 /* Motorola 68K */
94#define PROC_MIPS4000 0x02 /* MIPS RISC 4000 */
95#define PROC_ALPHA 0x03 /* DEC Alpha */
96#define PROC_POWERPC 0x04 /* IBM Power PC */
97#define PROC_i960 0x05 /* Intel i960 */
98#define PROC_ULTRASPARC 0x06 /* SPARC processor */
99
100/* Specific Minimim Processor - sigBYTE dsProcessor; FLAG BITS */
101/* ------------------------------------------------------------------ */
102/* Different bit definitions dependent on processor_family */
103
104/* PROC_INTEL: */
105#define PROC_8086 0x01 /* Intel 8086 */
106#define PROC_286 0x02 /* Intel 80286 */
107#define PROC_386 0x04 /* Intel 80386 */
108#define PROC_486 0x08 /* Intel 80486 */
109#define PROC_PENTIUM 0x10 /* Intel 586 aka P5 aka Pentium */
110#define PROC_SEXIUM 0x20 /* Intel 686 aka P6 aka Pentium Pro or MMX */
111
112/* PROC_i960: */
113#define PROC_960RX 0x01 /* Intel 80960RC/RD */
114#define PROC_960HX 0x02 /* Intel 80960HA/HD/HT */
115
116/* PROC_MOTOROLA: */
117#define PROC_68000 0x01 /* Motorola 68000 */
118#define PROC_68010 0x02 /* Motorola 68010 */
119#define PROC_68020 0x04 /* Motorola 68020 */
120#define PROC_68030 0x08 /* Motorola 68030 */
121#define PROC_68040 0x10 /* Motorola 68040 */
122
123/* PROC_POWERPC */
124#define PROC_PPC601 0x01 /* PowerPC 601 */
125#define PROC_PPC603 0x02 /* PowerPC 603 */
126#define PROC_PPC604 0x04 /* PowerPC 604 */
127
128/* PROC_MIPS4000: */
129#define PROC_R4000 0x01 /* MIPS R4000 */
130
131/* Filetype - sigBYTE dsFiletype; DISTINCT VALUES */
132/* ------------------------------------------------------------------ */
133#define FT_EXECUTABLE 0 /* Executable Program */
134#define FT_SCRIPT 1 /* Script/Batch File??? */
135#define FT_HBADRVR 2 /* HBA Driver */
136#define FT_OTHERDRVR 3 /* Other Driver */
137#define FT_IFS 4 /* Installable Filesystem Driver */
138#define FT_ENGINE 5 /* DPT Engine */
139#define FT_COMPDRVR 6 /* Compressed Driver Disk */
140#define FT_LANGUAGE 7 /* Foreign Language file */
141#define FT_FIRMWARE 8 /* Downloadable or actual Firmware */
142#define FT_COMMMODL 9 /* Communications Module */
143#define FT_INT13 10 /* INT 13 style HBA Driver */
144#define FT_HELPFILE 11 /* Help file */
145#define FT_LOGGER 12 /* Event Logger */
146#define FT_INSTALL 13 /* An Install Program */
147#define FT_LIBRARY 14 /* Storage Manager Real-Mode Calls */
148#define FT_RESOURCE 15 /* Storage Manager Resource File */
149#define FT_MODEM_DB 16 /* Storage Manager Modem Database */
150
151/* Filetype flags - sigBYTE dsFiletypeFlags; FLAG BITS */
152/* ------------------------------------------------------------------ */
153#define FTF_DLL 0x01 /* Dynamic Link Library */
154#define FTF_NLM 0x02 /* Netware Loadable Module */
155#define FTF_OVERLAYS 0x04 /* Uses overlays */
156#define FTF_DEBUG 0x08 /* Debug version */
157#define FTF_TSR 0x10 /* TSR */
158#define FTF_SYS 0x20 /* DOS Loadable driver */
159#define FTF_PROTECTED 0x40 /* Runs in protected mode */
160#define FTF_APP_SPEC 0x80 /* Application Specific */
161#define FTF_ROM (FTF_SYS|FTF_TSR) /* Special Case */
162
163/* OEM - sigBYTE dsOEM; DISTINCT VALUES */
164/* ------------------------------------------------------------------ */
165#define OEM_DPT 0 /* DPT */
166#define OEM_ATT 1 /* ATT */
167#define OEM_NEC 2 /* NEC */
168#define OEM_ALPHA 3 /* Alphatronix */
169#define OEM_AST 4 /* AST */
170#define OEM_OLIVETTI 5 /* Olivetti */
171#define OEM_SNI 6 /* Siemens/Nixdorf */
172#define OEM_SUN 7 /* SUN Microsystems */
173
174/* Operating System - sigLONG dsOS; FLAG BITS */
175/* ------------------------------------------------------------------ */
176#define OS_DOS 0x00000001 /* PC/MS-DOS */
177#define OS_WINDOWS 0x00000002 /* Microsoft Windows 3.x */
178#define OS_WINDOWS_NT 0x00000004 /* Microsoft Windows NT */
179#define OS_OS2M 0x00000008 /* OS/2 1.2.x,MS 1.3.0,IBM 1.3.x - Monolithic */
180#define OS_OS2L 0x00000010 /* Microsoft OS/2 1.301 - LADDR */
181#define OS_OS22x 0x00000020 /* IBM OS/2 2.x */
182#define OS_NW286 0x00000040 /* Novell NetWare 286 */
183#define OS_NW386 0x00000080 /* Novell NetWare 386 */
184#define OS_GEN_UNIX 0x00000100 /* Generic Unix */
185#define OS_SCO_UNIX 0x00000200 /* SCO Unix */
186#define OS_ATT_UNIX 0x00000400 /* ATT Unix */
187#define OS_UNIXWARE 0x00000800 /* USL Unix */
188#define OS_INT_UNIX 0x00001000 /* Interactive Unix */
189#define OS_SOLARIS 0x00002000 /* SunSoft Solaris */
190#define OS_QNX 0x00004000 /* QNX for Tom Moch */
191#define OS_NEXTSTEP 0x00008000 /* NeXTSTEP/OPENSTEP/MACH */
192#define OS_BANYAN 0x00010000 /* Banyan Vines */
193#define OS_OLIVETTI_UNIX 0x00020000/* Olivetti Unix */
194#define OS_MAC_OS 0x00040000 /* Mac OS */
195#define OS_WINDOWS_95 0x00080000 /* Microsoft Windows '95 */
196#define OS_NW4x 0x00100000 /* Novell Netware 4.x */
197#define OS_BSDI_UNIX 0x00200000 /* BSDi Unix BSD/OS 2.0 and up */
198#define OS_AIX_UNIX 0x00400000 /* AIX Unix */
199#define OS_FREE_BSD 0x00800000 /* FreeBSD Unix */
200#define OS_LINUX 0x01000000 /* Linux */
201#define OS_DGUX_UNIX 0x02000000 /* Data General Unix */
202#define OS_SINIX_N 0x04000000 /* SNI SINIX-N */
203#define OS_PLAN9 0x08000000 /* ATT Plan 9 */
204#define OS_TSX 0x10000000 /* SNH TSX-32 */
205
206#define OS_OTHER 0x80000000 /* Other */
207
208/* Capabilities - sigWORD dsCapabilities; FLAG BITS */
209/* ------------------------------------------------------------------ */
210#define CAP_RAID0 0x0001 /* RAID-0 */
211#define CAP_RAID1 0x0002 /* RAID-1 */
212#define CAP_RAID3 0x0004 /* RAID-3 */
213#define CAP_RAID5 0x0008 /* RAID-5 */
214#define CAP_SPAN 0x0010 /* Spanning */
215#define CAP_PASS 0x0020 /* Provides passthrough */
216#define CAP_OVERLAP 0x0040 /* Passthrough supports overlapped commands */
217#define CAP_ASPI 0x0080 /* Supports ASPI Command Requests */
218#define CAP_ABOVE16MB 0x0100 /* ISA Driver supports greater than 16MB */
219#define CAP_EXTEND 0x8000 /* Extended info appears after description */
220#ifdef SNI_MIPS
221#define CAP_CACHEMODE 0x1000 /* dpt_force_cache is set in driver */
222#endif
223
224/* Devices Supported - sigWORD dsDeviceSupp; FLAG BITS */
225/* ------------------------------------------------------------------ */
226#define DEV_DASD 0x0001 /* DASD (hard drives) */
227#define DEV_TAPE 0x0002 /* Tape drives */
228#define DEV_PRINTER 0x0004 /* Printers */
229#define DEV_PROC 0x0008 /* Processors */
230#define DEV_WORM 0x0010 /* WORM drives */
231#define DEV_CDROM 0x0020 /* CD-ROM drives */
232#define DEV_SCANNER 0x0040 /* Scanners */
233#define DEV_OPTICAL 0x0080 /* Optical Drives */
234#define DEV_JUKEBOX 0x0100 /* Jukebox */
235#define DEV_COMM 0x0200 /* Communications Devices */
236#define DEV_OTHER 0x0400 /* Other Devices */
237#define DEV_ALL 0xFFFF /* All SCSI Devices */
238
239/* Adapters Families Supported - sigWORD dsAdapterSupp; FLAG BITS */
240/* ------------------------------------------------------------------ */
241#define ADF_2001 0x0001 /* PM2001 */
242#define ADF_2012A 0x0002 /* PM2012A */
243#define ADF_PLUS_ISA 0x0004 /* PM2011,PM2021 */
244#define ADF_PLUS_EISA 0x0008 /* PM2012B,PM2022 */
245#define ADF_SC3_ISA 0x0010 /* PM2021 */
246#define ADF_SC3_EISA 0x0020 /* PM2022,PM2122, etc */
247#define ADF_SC3_PCI 0x0040 /* SmartCache III PCI */
248#define ADF_SC4_ISA 0x0080 /* SmartCache IV ISA */
249#define ADF_SC4_EISA 0x0100 /* SmartCache IV EISA */
250#define ADF_SC4_PCI 0x0200 /* SmartCache IV PCI */
251#define ADF_SC5_PCI 0x0400 /* Fifth Generation I2O products */
252/*
253 * Combinations of products
254 */
255#define ADF_ALL_2000 (ADF_2001|ADF_2012A)
256#define ADF_ALL_PLUS (ADF_PLUS_ISA|ADF_PLUS_EISA)
257#define ADF_ALL_SC3 (ADF_SC3_ISA|ADF_SC3_EISA|ADF_SC3_PCI)
258#define ADF_ALL_SC4 (ADF_SC4_ISA|ADF_SC4_EISA|ADF_SC4_PCI)
259#define ADF_ALL_SC5 (ADF_SC5_PCI)
260/* All EATA Cacheing Products */
261#define ADF_ALL_CACHE (ADF_ALL_PLUS|ADF_ALL_SC3|ADF_ALL_SC4)
262/* All EATA Bus Mastering Products */
263#define ADF_ALL_MASTER (ADF_2012A|ADF_ALL_CACHE)
264/* All EATA Adapter Products */
265#define ADF_ALL_EATA (ADF_2001|ADF_ALL_MASTER)
266#define ADF_ALL ADF_ALL_EATA
267
268/* Application - sigWORD dsApplication; FLAG BITS */
269/* ------------------------------------------------------------------ */
270#define APP_DPTMGR 0x0001 /* DPT Storage Manager */
271#define APP_ENGINE 0x0002 /* DPT Engine */
272#define APP_SYTOS 0x0004 /* Sytron Sytos Plus */
273#define APP_CHEYENNE 0x0008 /* Cheyenne ARCServe + ARCSolo */
274#define APP_MSCDEX 0x0010 /* Microsoft CD-ROM extensions */
275#define APP_NOVABACK 0x0020 /* NovaStor Novaback */
276#define APP_AIM 0x0040 /* Archive Information Manager */
277
278/* Requirements - sigBYTE dsRequirements; FLAG BITS */
279/* ------------------------------------------------------------------ */
280#define REQ_SMARTROM 0x01 /* Requires SmartROM to be present */
281#define REQ_DPTDDL 0x02 /* Requires DPTDDL.SYS to be loaded */
282#define REQ_HBA_DRIVER 0x04 /* Requires an HBA driver to be loaded */
283#define REQ_ASPI_TRAN 0x08 /* Requires an ASPI Transport Modules */
284#define REQ_ENGINE 0x10 /* Requires a DPT Engine to be loaded */
285#define REQ_COMM_ENG 0x20 /* Requires a DPT Communications Engine */
286
287/*
288 * You may adjust dsDescription_size with an override to a value less than
289 * 50 so that the structure allocates less real space.
290 */
291#if (!defined(dsDescription_size))
292# define dsDescription_size 50
293#endif
294
295typedef struct dpt_sig {
296 char dsSignature[6]; /* ALWAYS "dPtSiG" */
297 sigBYTE dsSigVersion; /* signature version (currently 1) */
298 sigBYTE dsProcessorFamily; /* what type of processor */
299 sigBYTE dsProcessor; /* precise processor */
300 sigBYTE dsFiletype; /* type of file */
301 sigBYTE dsFiletypeFlags; /* flags to specify load type, etc. */
302 sigBYTE dsOEM; /* OEM file was created for */
303 sigLONG dsOS; /* which Operating systems */
304 sigWORD dsCapabilities; /* RAID levels, etc. */
305 sigWORD dsDeviceSupp; /* Types of SCSI devices supported */
306 sigWORD dsAdapterSupp; /* DPT adapter families supported */
307 sigWORD dsApplication; /* applications file is for */
308 sigBYTE dsRequirements; /* Other driver dependencies */
309 sigBYTE dsVersion; /* 1 */
310 sigBYTE dsRevision; /* 'J' */
311 sigBYTE dsSubRevision; /* '9' ' ' if N/A */
312 sigBYTE dsMonth; /* creation month */
313 sigBYTE dsDay; /* creation day */
314 sigBYTE dsYear; /* creation year since 1980 (1993=13) */
315 /* description (NULL terminated) */
316 char dsDescription[dsDescription_size];
317} dpt_sig_S;
318/* 32 bytes minimum - with no description. Put NULL at description[0] */
319/* 81 bytes maximum - with 49 character description plus NULL. */
320
321/* This line added at Roycroft's request */
322/* Microsoft's NT compiler gets confused if you do a pack and don't */
323/* restore it. */
324
325#ifndef NO_UNPACK
326#if defined (_DPT_AIX)
327#pragma options align=reset
328#elif defined (UNPACK_FOUR)
329#pragma pack(4)
330#else
331#pragma pack()
332#endif /* aix */
333#endif
334/* For the Macintosh */
335#if STRUCTALIGNMENTSUPPORTED
336#pragma options align=reset
337#endif
338
339#endif
diff --git a/drivers/scsi/dpt/osd_defs.h b/drivers/scsi/dpt/osd_defs.h
new file mode 100644
index 000000000000..de3ae5722982
--- /dev/null
+++ b/drivers/scsi/dpt/osd_defs.h
@@ -0,0 +1,79 @@
1/* BSDI osd_defs.h,v 1.4 1998/06/03 19:14:58 karels Exp */
2/*
3 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
4 * All rights reserved.
5 *
6 * Redistribution and use in source form, with or without modification, are
7 * permitted provided that redistributions of source code must retain the
8 * above copyright notice, this list of conditions and the following disclaimer.
9 *
10 * This software is provided `as is' by Distributed Processing Technology and
11 * any express or implied warranties, including, but not limited to, the
12 * implied warranties of merchantability and fitness for a particular purpose,
13 * are disclaimed. In no event shall Distributed Processing Technology be
14 * liable for any direct, indirect, incidental, special, exemplary or
15 * consequential damages (including, but not limited to, procurement of
16 * substitute goods or services; loss of use, data, or profits; or business
17 * interruptions) however caused and on any theory of liability, whether in
18 * contract, strict liability, or tort (including negligence or otherwise)
19 * arising in any way out of the use of this driver software, even if advised
20 * of the possibility of such damage.
21 *
22 */
23
24#ifndef _OSD_DEFS_H
25#define _OSD_DEFS_H
26
27/*File - OSD_DEFS.H
28 ****************************************************************************
29 *
30 *Description:
31 *
32 * This file contains the OS dependent defines. This file is included
33 *in osd_util.h and provides the OS specific defines for that file.
34 *
35 *Copyright Distributed Processing Technology, Corp.
36 * 140 Candace Dr.
37 * Maitland, Fl. 32751 USA
38 * Phone: (407) 830-5522 Fax: (407) 260-5366
39 * All Rights Reserved
40 *
41 *Author: Doug Anderson
42 *Date: 1/31/94
43 *
44 *Editors:
45 *
46 *Remarks:
47 *
48 *
49 *****************************************************************************/
50
51
52/*Definitions - Defines & Constants ----------------------------------------- */
53
54 /* Define the operating system */
55#if (defined(__linux__))
56# define _DPT_LINUX
57#elif (defined(__bsdi__))
58# define _DPT_BSDI
59#elif (defined(__FreeBSD__))
60# define _DPT_FREE_BSD
61#else
62# define _DPT_SCO
63#endif
64
65#if defined (ZIL_CURSES)
66#define _DPT_CURSES
67#else
68#define _DPT_MOTIF
69#endif
70
71 /* Redefine 'far' to nothing - no far pointer type required in UNIX */
72#define far
73
74 /* Define the mutually exclusive semaphore type */
75#define SEMAPHORE_T unsigned int *
76 /* Define a handle to a DLL */
77#define DLL_HANDLE_T unsigned int *
78
79#endif
diff --git a/drivers/scsi/dpt/osd_util.h b/drivers/scsi/dpt/osd_util.h
new file mode 100644
index 000000000000..4b56c0436ba2
--- /dev/null
+++ b/drivers/scsi/dpt/osd_util.h
@@ -0,0 +1,358 @@
1/* BSDI osd_util.h,v 1.8 1998/06/03 19:14:58 karels Exp */
2
3/*
4 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
5 * All rights reserved.
6 *
7 * Redistribution and use in source form, with or without modification, are
8 * permitted provided that redistributions of source code must retain the
9 * above copyright notice, this list of conditions and the following disclaimer.
10 *
11 * This software is provided `as is' by Distributed Processing Technology and
12 * any express or implied warranties, including, but not limited to, the
13 * implied warranties of merchantability and fitness for a particular purpose,
14 * are disclaimed. In no event shall Distributed Processing Technology be
15 * liable for any direct, indirect, incidental, special, exemplary or
16 * consequential damages (including, but not limited to, procurement of
17 * substitute goods or services; loss of use, data, or profits; or business
18 * interruptions) however caused and on any theory of liability, whether in
19 * contract, strict liability, or tort (including negligence or otherwise)
20 * arising in any way out of the use of this driver software, even if advised
21 * of the possibility of such damage.
22 *
23 */
24
25#ifndef __OSD_UTIL_H
26#define __OSD_UTIL_H
27
28/*File - OSD_UTIL.H
29 ****************************************************************************
30 *
31 *Description:
32 *
33 * This file contains defines and function prototypes that are
34 *operating system dependent. The resources defined in this file
35 *are not specific to any particular application.
36 *
37 *Copyright Distributed Processing Technology, Corp.
38 * 140 Candace Dr.
39 * Maitland, Fl. 32751 USA
40 * Phone: (407) 830-5522 Fax: (407) 260-5366
41 * All Rights Reserved
42 *
43 *Author: Doug Anderson
44 *Date: 1/7/94
45 *
46 *Editors:
47 *
48 *Remarks:
49 *
50 *
51 *****************************************************************************/
52
53
54/*Definitions - Defines & Constants ----------------------------------------- */
55
56/*----------------------------- */
57/* Operating system selections: */
58/*----------------------------- */
59
60/*#define _DPT_MSDOS */
61/*#define _DPT_WIN_3X */
62/*#define _DPT_WIN_4X */
63/*#define _DPT_WIN_NT */
64/*#define _DPT_NETWARE */
65/*#define _DPT_OS2 */
66/*#define _DPT_SCO */
67/*#define _DPT_UNIXWARE */
68/*#define _DPT_SOLARIS */
69/*#define _DPT_NEXTSTEP */
70/*#define _DPT_BANYAN */
71
72/*-------------------------------- */
73/* Include the OS specific defines */
74/*-------------------------------- */
75
76/*#define OS_SELECTION From Above List */
77/*#define SEMAPHORE_T ??? */
78/*#define DLL_HANDLE_T ??? */
79
80#if (defined(KERNEL) && (defined(__FreeBSD__) || defined(__bsdi__)))
81# include "i386/isa/dpt_osd_defs.h"
82#else
83# include "osd_defs.h"
84#endif
85
86#ifndef DPT_UNALIGNED
87 #define DPT_UNALIGNED
88#endif
89
90#ifndef DPT_EXPORT
91 #define DPT_EXPORT
92#endif
93
94#ifndef DPT_IMPORT
95 #define DPT_IMPORT
96#endif
97
98#ifndef DPT_RUNTIME_IMPORT
99 #define DPT_RUNTIME_IMPORT DPT_IMPORT
100#endif
101
102/*--------------------- */
103/* OS dependent defines */
104/*--------------------- */
105
106#if defined (_DPT_MSDOS) || defined (_DPT_WIN_3X)
107 #define _DPT_16_BIT
108#else
109 #define _DPT_32_BIT
110#endif
111
112#if defined (_DPT_SCO) || defined (_DPT_UNIXWARE) || defined (_DPT_SOLARIS) || defined (_DPT_AIX) || defined (SNI_MIPS) || defined (_DPT_BSDI) || defined (_DPT_FREE_BSD) || defined(_DPT_LINUX)
113 #define _DPT_UNIX
114#endif
115
116#if defined (_DPT_WIN_3x) || defined (_DPT_WIN_4X) || defined (_DPT_WIN_NT) \
117 || defined (_DPT_OS2)
118 #define _DPT_DLL_SUPPORT
119#endif
120
121#if !defined (_DPT_MSDOS) && !defined (_DPT_WIN_3X) && !defined (_DPT_NETWARE)
122 #define _DPT_PREEMPTIVE
123#endif
124
125#if !defined (_DPT_MSDOS) && !defined (_DPT_WIN_3X)
126 #define _DPT_MULTI_THREADED
127#endif
128
129#if !defined (_DPT_MSDOS)
130 #define _DPT_MULTI_TASKING
131#endif
132
133 /* These exist for platforms that */
134 /* chunk when accessing mis-aligned */
135 /* data */
136#if defined (SNI_MIPS) || defined (_DPT_SOLARIS)
137 #if defined (_DPT_BIG_ENDIAN)
138 #if !defined (_DPT_STRICT_ALIGN)
139 #define _DPT_STRICT_ALIGN
140 #endif
141 #endif
142#endif
143
144 /* Determine if in C or C++ mode */
145#ifdef __cplusplus
146 #define _DPT_CPP
147#else
148 #define _DPT_C
149#endif
150
151/*-------------------------------------------------------------------*/
152/* Under Solaris the compiler refuses to accept code like: */
153/* { {"DPT"}, 0, NULL .... }, */
154/* and complains about the {"DPT"} part by saying "cannot use { } */
155/* to initialize char*". */
156/* */
157/* By defining these ugly macros we can get around this and also */
158/* not have to copy and #ifdef large sections of code. I know that */
159/* these macros are *really* ugly, but they should help reduce */
160/* maintenance in the long run. */
161/* */
162/*-------------------------------------------------------------------*/
163#if !defined (DPTSQO)
164 #if defined (_DPT_SOLARIS)
165 #define DPTSQO
166 #define DPTSQC
167 #else
168 #define DPTSQO {
169 #define DPTSQC }
170 #endif /* solaris */
171#endif /* DPTSQO */
172
173
174/*---------------------- */
175/* OS dependent typedefs */
176/*---------------------- */
177
178#if defined (_DPT_MSDOS) || defined (_DPT_SCO)
179 #define BYTE unsigned char
180 #define WORD unsigned short
181#endif
182
183#ifndef _DPT_TYPEDEFS
184 #define _DPT_TYPEDEFS
185 typedef unsigned char uCHAR;
186 typedef unsigned short uSHORT;
187 typedef unsigned int uINT;
188 typedef unsigned long uLONG;
189
190 typedef union {
191 uCHAR u8[4];
192 uSHORT u16[2];
193 uLONG u32;
194 } access_U;
195#endif
196
197#if !defined (NULL)
198 #define NULL 0
199#endif
200
201
202/*Prototypes - function ----------------------------------------------------- */
203
204#ifdef __cplusplus
205 extern "C" { /* Declare all these functions as "C" functions */
206#endif
207
208/*------------------------ */
209/* Byte reversal functions */
210/*------------------------ */
211
212 /* Reverses the byte ordering of a 2 byte variable */
213#if (!defined(osdSwap2))
214 uSHORT osdSwap2(DPT_UNALIGNED uSHORT *);
215#endif // !osdSwap2
216
217 /* Reverses the byte ordering of a 4 byte variable and shifts left 8 bits */
218#if (!defined(osdSwap3))
219 uLONG osdSwap3(DPT_UNALIGNED uLONG *);
220#endif // !osdSwap3
221
222
223#ifdef _DPT_NETWARE
224 #include "novpass.h" /* For DPT_Bswapl() prototype */
225 /* Inline the byte swap */
226 #ifdef __cplusplus
227 inline uLONG osdSwap4(uLONG *inLong) {
228 return *inLong = DPT_Bswapl(*inLong);
229 }
230 #else
231 #define osdSwap4(inLong) DPT_Bswapl(inLong)
232 #endif // cplusplus
233#else
234 /* Reverses the byte ordering of a 4 byte variable */
235# if (!defined(osdSwap4))
236 uLONG osdSwap4(DPT_UNALIGNED uLONG *);
237# endif // !osdSwap4
238
239 /* The following functions ALWAYS swap regardless of the *
240 * presence of DPT_BIG_ENDIAN */
241
242 uSHORT trueSwap2(DPT_UNALIGNED uSHORT *);
243 uLONG trueSwap4(DPT_UNALIGNED uLONG *);
244
245#endif // netware
246
247
248/*-------------------------------------*
249 * Network order swap functions *
250 * *
251 * These functions/macros will be used *
252 * by the structure insert()/extract() *
253 * functions. *
254 *
255 * We will enclose all structure *
256 * portability modifications inside *
257 * #ifdefs. When we are ready, we *
258 * will #define DPT_PORTABLE to begin *
259 * using the modifications. *
260 *-------------------------------------*/
261uLONG netSwap4(uLONG val);
262
263#if defined (_DPT_BIG_ENDIAN)
264
265// for big-endian we need to swap
266
267#ifndef NET_SWAP_2
268#define NET_SWAP_2(x) (((x) >> 8) | ((x) << 8))
269#endif // NET_SWAP_2
270
271#ifndef NET_SWAP_4
272#define NET_SWAP_4(x) netSwap4((x))
273#endif // NET_SWAP_4
274
275#else
276
277// for little-endian we don't need to do anything
278
279#ifndef NET_SWAP_2
280#define NET_SWAP_2(x) (x)
281#endif // NET_SWAP_2
282
283#ifndef NET_SWAP_4
284#define NET_SWAP_4(x) (x)
285#endif // NET_SWAP_4
286
287#endif // big endian
288
289
290
291/*----------------------------------- */
292/* Run-time loadable module functions */
293/*----------------------------------- */
294
295 /* Loads the specified run-time loadable DLL */
296DLL_HANDLE_T osdLoadModule(uCHAR *);
297 /* Unloads the specified run-time loadable DLL */
298uSHORT osdUnloadModule(DLL_HANDLE_T);
299 /* Returns a pointer to a function inside a run-time loadable DLL */
300void * osdGetFnAddr(DLL_HANDLE_T,uCHAR *);
301
302/*--------------------------------------- */
303/* Mutually exclusive semaphore functions */
304/*--------------------------------------- */
305
306 /* Create a named semaphore */
307SEMAPHORE_T osdCreateNamedSemaphore(char *);
308 /* Create a mutually exlusive semaphore */
309SEMAPHORE_T osdCreateSemaphore(void);
310 /* create an event semaphore */
311SEMAPHORE_T osdCreateEventSemaphore(void);
312 /* create a named event semaphore */
313SEMAPHORE_T osdCreateNamedEventSemaphore(char *);
314
315 /* Destroy the specified mutually exclusive semaphore object */
316uSHORT osdDestroySemaphore(SEMAPHORE_T);
317 /* Request access to the specified mutually exclusive semaphore */
318uLONG osdRequestSemaphore(SEMAPHORE_T,uLONG);
319 /* Release access to the specified mutually exclusive semaphore */
320uSHORT osdReleaseSemaphore(SEMAPHORE_T);
321 /* wait for a event to happen */
322uLONG osdWaitForEventSemaphore(SEMAPHORE_T, uLONG);
323 /* signal an event */
324uLONG osdSignalEventSemaphore(SEMAPHORE_T);
325 /* reset the event */
326uLONG osdResetEventSemaphore(SEMAPHORE_T);
327
328/*----------------- */
329/* Thread functions */
330/*----------------- */
331
332 /* Releases control to the task switcher in non-preemptive */
333 /* multitasking operating systems. */
334void osdSwitchThreads(void);
335
336 /* Starts a thread function */
337uLONG osdStartThread(void *,void *);
338
339/* what is my thread id */
340uLONG osdGetThreadID(void);
341
342/* wakes up the specifed thread */
343void osdWakeThread(uLONG);
344
345/* osd sleep for x miliseconds */
346void osdSleep(uLONG);
347
348#define DPT_THREAD_PRIORITY_LOWEST 0x00
349#define DPT_THREAD_PRIORITY_NORMAL 0x01
350#define DPT_THREAD_PRIORITY_HIGHEST 0x02
351
352uCHAR osdSetThreadPriority(uLONG tid, uCHAR priority);
353
354#ifdef __cplusplus
355 } /* end the xtern "C" declaration */
356#endif
357
358#endif /* osd_util_h */
diff --git a/drivers/scsi/dpt/sys_info.h b/drivers/scsi/dpt/sys_info.h
new file mode 100644
index 000000000000..d23b70c8c768
--- /dev/null
+++ b/drivers/scsi/dpt/sys_info.h
@@ -0,0 +1,417 @@
1/* BSDI sys_info.h,v 1.6 1998/06/03 19:14:59 karels Exp */
2
3/*
4 * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
5 * All rights reserved.
6 *
7 * Redistribution and use in source form, with or without modification, are
8 * permitted provided that redistributions of source code must retain the
9 * above copyright notice, this list of conditions and the following disclaimer.
10 *
11 * This software is provided `as is' by Distributed Processing Technology and
12 * any express or implied warranties, including, but not limited to, the
13 * implied warranties of merchantability and fitness for a particular purpose,
14 * are disclaimed. In no event shall Distributed Processing Technology be
15 * liable for any direct, indirect, incidental, special, exemplary or
16 * consequential damages (including, but not limited to, procurement of
17 * substitute goods or services; loss of use, data, or profits; or business
18 * interruptions) however caused and on any theory of liability, whether in
19 * contract, strict liability, or tort (including negligence or otherwise)
20 * arising in any way out of the use of this driver software, even if advised
21 * of the possibility of such damage.
22 *
23 */
24
25#ifndef __SYS_INFO_H
26#define __SYS_INFO_H
27
28/*File - SYS_INFO.H
29 ****************************************************************************
30 *
31 *Description:
32 *
33 * This file contains structure definitions for the OS dependent
34 *layer system information buffers.
35 *
36 *Copyright Distributed Processing Technology, Corp.
37 * 140 Candace Dr.
38 * Maitland, Fl. 32751 USA
39 * Phone: (407) 830-5522 Fax: (407) 260-5366
40 * All Rights Reserved
41 *
42 *Author: Don Kemper
43 *Date: 5/10/94
44 *
45 *Editors:
46 *
47 *Remarks:
48 *
49 *
50 *****************************************************************************/
51
52
53/*Include Files ------------------------------------------------------------- */
54
55#include "osd_util.h"
56
57#ifndef NO_PACK
58#if defined (_DPT_AIX)
59#pragma options align=packed
60#else
61#pragma pack(1)
62#endif /* aix */
63#endif // no unpack
64
65
66/*struct - driveParam_S - start
67 *===========================================================================
68 *
69 *Description:
70 *
71 * This structure defines the drive parameters seen during
72 *booting.
73 *
74 *---------------------------------------------------------------------------*/
75
76#ifdef __cplusplus
77 struct driveParam_S {
78#else
79 typedef struct {
80#endif
81
82 uSHORT cylinders; /* Upto 1024 */
83 uCHAR heads; /* Upto 255 */
84 uCHAR sectors; /* Upto 63 */
85
86#ifdef __cplusplus
87
88//---------- Portability Additions ----------- in sp_sinfo.cpp
89#ifdef DPT_PORTABLE
90 uSHORT netInsert(dptBuffer_S *buffer);
91 uSHORT netExtract(dptBuffer_S *buffer);
92#endif // DPT PORTABLE
93//--------------------------------------------
94
95 };
96#else
97 } driveParam_S;
98#endif
99/*driveParam_S - end */
100
101
102/*struct - sysInfo_S - start
103 *===========================================================================
104 *
105 *Description:
106 *
107 * This structure defines the command system information that
108 *should be returned by every OS dependent layer.
109 *
110 *---------------------------------------------------------------------------*/
111
112/*flags - bit definitions */
113#define SI_CMOS_Valid 0x0001
114#define SI_NumDrivesValid 0x0002
115#define SI_ProcessorValid 0x0004
116#define SI_MemorySizeValid 0x0008
117#define SI_DriveParamsValid 0x0010
118#define SI_SmartROMverValid 0x0020
119#define SI_OSversionValid 0x0040
120#define SI_OSspecificValid 0x0080 /* 1 if OS structure returned */
121#define SI_BusTypeValid 0x0100
122
123#define SI_ALL_VALID 0x0FFF /* All Std SysInfo is valid */
124#define SI_NO_SmartROM 0x8000
125
126/*busType - definitions */
127#define SI_ISA_BUS 0x00
128#define SI_MCA_BUS 0x01
129#define SI_EISA_BUS 0x02
130#define SI_PCI_BUS 0x04
131
132#ifdef __cplusplus
133 struct sysInfo_S {
134#else
135 typedef struct {
136#endif
137
138 uCHAR drive0CMOS; /* CMOS Drive 0 Type */
139 uCHAR drive1CMOS; /* CMOS Drive 1 Type */
140 uCHAR numDrives; /* 0040:0075 contents */
141 uCHAR processorFamily; /* Same as DPTSIG's definition */
142 uCHAR processorType; /* Same as DPTSIG's definition */
143 uCHAR smartROMMajorVersion;
144 uCHAR smartROMMinorVersion; /* SmartROM version */
145 uCHAR smartROMRevision;
146 uSHORT flags; /* See bit definitions above */
147 uSHORT conventionalMemSize; /* in KB */
148 uLONG extendedMemSize; /* in KB */
149 uLONG osType; /* Same as DPTSIG's definition */
150 uCHAR osMajorVersion;
151 uCHAR osMinorVersion; /* The OS version */
152 uCHAR osRevision;
153#ifdef _SINIX_ADDON
154 uCHAR busType; /* See defininitions above */
155 uSHORT osSubRevision;
156 uCHAR pad[2]; /* For alignment */
157#else
158 uCHAR osSubRevision;
159 uCHAR busType; /* See defininitions above */
160 uCHAR pad[3]; /* For alignment */
161#endif
162 driveParam_S drives[16]; /* SmartROM Logical Drives */
163
164#ifdef __cplusplus
165
166//---------- Portability Additions ----------- in sp_sinfo.cpp
167#ifdef DPT_PORTABLE
168 uSHORT netInsert(dptBuffer_S *buffer);
169 uSHORT netExtract(dptBuffer_S *buffer);
170#endif // DPT PORTABLE
171//--------------------------------------------
172
173 };
174#else
175 } sysInfo_S;
176#endif
177/*sysInfo_S - end */
178
179
180/*struct - DOS_Info_S - start
181 *===========================================================================
182 *
183 *Description:
184 *
185 * This structure defines the system information specific to a
186 *DOS workstation.
187 *
188 *---------------------------------------------------------------------------*/
189
190/*flags - bit definitions */
191#define DI_DOS_HIGH 0x01 /* DOS is loaded high */
192#define DI_DPMI_VALID 0x02 /* DPMI version is valid */
193
194#ifdef __cplusplus
195 struct DOS_Info_S {
196#else
197 typedef struct {
198#endif
199
200 uCHAR flags; /* See bit definitions above */
201 uSHORT driverLocation; /* SmartROM BIOS address */
202 uSHORT DOS_version;
203 uSHORT DPMI_version;
204
205#ifdef __cplusplus
206
207//---------- Portability Additions ----------- in sp_sinfo.cpp
208#ifdef DPT_PORTABLE
209 uSHORT netInsert(dptBuffer_S *buffer);
210 uSHORT netExtract(dptBuffer_S *buffer);
211#endif // DPT PORTABLE
212//--------------------------------------------
213
214 };
215#else
216 } DOS_Info_S;
217#endif
218/*DOS_Info_S - end */
219
220
221/*struct - Netware_Info_S - start
222 *===========================================================================
223 *
224 *Description:
225 *
226 * This structure defines the system information specific to a
227 *Netware machine.
228 *
229 *---------------------------------------------------------------------------*/
230
231#ifdef __cplusplus
232 struct Netware_Info_S {
233#else
234 typedef struct {
235#endif
236
237 uCHAR driverName[13]; /* ie PM12NW31.DSK */
238 uCHAR serverName[48];
239 uCHAR netwareVersion; /* The Netware OS version */
240 uCHAR netwareSubVersion;
241 uCHAR netwareRevision;
242 uSHORT maxConnections; /* Probably 250 or 1000 */
243 uSHORT connectionsInUse;
244 uSHORT maxVolumes;
245 uCHAR unused;
246 uCHAR SFTlevel;
247 uCHAR TTSlevel;
248
249 uCHAR clibMajorVersion; /* The CLIB.NLM version */
250 uCHAR clibMinorVersion;
251 uCHAR clibRevision;
252
253#ifdef __cplusplus
254
255//---------- Portability Additions ----------- in sp_sinfo.cpp
256#ifdef DPT_PORTABLE
257 uSHORT netInsert(dptBuffer_S *buffer);
258 uSHORT netExtract(dptBuffer_S *buffer);
259#endif // DPT PORTABLE
260//--------------------------------------------
261
262 };
263#else
264 } Netware_Info_S;
265#endif
266/*Netware_Info_S - end */
267
268
269/*struct - OS2_Info_S - start
270 *===========================================================================
271 *
272 *Description:
273 *
274 * This structure defines the system information specific to an
275 *OS/2 machine.
276 *
277 *---------------------------------------------------------------------------*/
278
279#ifdef __cplusplus
280 struct OS2_Info_S {
281#else
282 typedef struct {
283#endif
284
285 uCHAR something;
286
287#ifdef __cplusplus
288
289//---------- Portability Additions ----------- in sp_sinfo.cpp
290#ifdef DPT_PORTABLE
291 uSHORT netInsert(dptBuffer_S *buffer);
292 uSHORT netExtract(dptBuffer_S *buffer);
293#endif // DPT PORTABLE
294//--------------------------------------------
295
296 };
297#else
298 } OS2_Info_S;
299#endif
300/*OS2_Info_S - end */
301
302
303/*struct - WinNT_Info_S - start
304 *===========================================================================
305 *
306 *Description:
307 *
308 * This structure defines the system information specific to a
309 *Windows NT machine.
310 *
311 *---------------------------------------------------------------------------*/
312
313#ifdef __cplusplus
314 struct WinNT_Info_S {
315#else
316 typedef struct {
317#endif
318
319 uCHAR something;
320
321#ifdef __cplusplus
322
323//---------- Portability Additions ----------- in sp_sinfo.cpp
324#ifdef DPT_PORTABLE
325 uSHORT netInsert(dptBuffer_S *buffer);
326 uSHORT netExtract(dptBuffer_S *buffer);
327#endif // DPT PORTABLE
328//--------------------------------------------
329
330 };
331#else
332 } WinNT_Info_S;
333#endif
334/*WinNT_Info_S - end */
335
336
337/*struct - SCO_Info_S - start
338 *===========================================================================
339 *
340 *Description:
341 *
342 * This structure defines the system information specific to an
343 *SCO UNIX machine.
344 *
345 *---------------------------------------------------------------------------*/
346
347#ifdef __cplusplus
348 struct SCO_Info_S {
349#else
350 typedef struct {
351#endif
352
353 uCHAR something;
354
355#ifdef __cplusplus
356
357//---------- Portability Additions ----------- in sp_sinfo.cpp
358#ifdef DPT_PORTABLE
359 uSHORT netInsert(dptBuffer_S *buffer);
360 uSHORT netExtract(dptBuffer_S *buffer);
361#endif // DPT PORTABLE
362//--------------------------------------------
363
364 };
365#else
366 } SCO_Info_S;
367#endif
368/*SCO_Info_S - end */
369
370
371/*struct - USL_Info_S - start
372 *===========================================================================
373 *
374 *Description:
375 *
376 * This structure defines the system information specific to a
377 *USL UNIX machine.
378 *
379 *---------------------------------------------------------------------------*/
380
381#ifdef __cplusplus
382 struct USL_Info_S {
383#else
384 typedef struct {
385#endif
386
387 uCHAR something;
388
389#ifdef __cplusplus
390
391//---------- Portability Additions ----------- in sp_sinfo.cpp
392#ifdef DPT_PORTABLE
393 uSHORT netInsert(dptBuffer_S *buffer);
394 uSHORT netExtract(dptBuffer_S *buffer);
395#endif // DPT PORTABLE
396//--------------------------------------------
397
398 };
399#else
400 } USL_Info_S;
401#endif
402/*USL_Info_S - end */
403
404
405 /* Restore default structure packing */
406#ifndef NO_UNPACK
407#if defined (_DPT_AIX)
408#pragma options align=reset
409#elif defined (UNPACK_FOUR)
410#pragma pack(4)
411#else
412#pragma pack()
413#endif /* aix */
414#endif // no unpack
415
416#endif // __SYS_INFO_H
417