1 /***************************************************************************
2 dpti_ioctl.h - description
5 copyright : (C) 2001 by Adaptec
7 See Documentation/scsi/dpti.txt for history, notes, license info
9 ***************************************************************************/
11 /***************************************************************************
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. *
18 ***************************************************************************/
20 /***************************************************************************
21 * This file is generated from osd_unix.h *
22 * *************************************************************************/
27 // IOCTL interface commands
30 # define _IOWR(x,y,z) (((x)<<8)|y)
33 # define _IOW(x,y,z) (((x)<<8)|y)
36 # define _IOR(x,y,z) (((x)<<8)|y)
39 # define _IO(x,y) (((x)<<8)|y)
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)
48 #define DPT_SIGNATURE_PACKED _IOR('D',67,dpt_sig_S_Packed)
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)
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)
82 /* Structure Returned From Get Controller Info */
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 uINT 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 uINT cpLength
; /* EATA Command Packet Length */
101 uINT 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) */
108 uSHORT length
; // Remaining length of this
109 uSHORT drvrHBAnum
; // Relative HBA # used by the driver
110 uINT 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))
118 ADAPTER_OBJECT
*AdapterObject
;
119 LARGE_INTEGER DmaLogicalAddress
;
120 PVOID DmaVirtualAddress
;
121 LARGE_INTEGER ReplyLogicalAddress
;
122 PVOID ReplyVirtualAddress
;
124 uINT reserved1
; // Reserved for future expansion
125 uINT reserved2
; // Reserved for future expansion
126 uINT reserved3
; // Reserved for future expansion
130 typedef struct TARGET_BUSY