aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cciss_ioctl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cciss_ioctl.h')
-rw-r--r--include/linux/cciss_ioctl.h128
1 files changed, 1 insertions, 127 deletions
diff --git a/include/linux/cciss_ioctl.h b/include/linux/cciss_ioctl.h
index eb130b4d8e72..986493f5b92b 100644
--- a/include/linux/cciss_ioctl.h
+++ b/include/linux/cciss_ioctl.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/ioctl.h> 5#include <linux/ioctl.h>
6#include <linux/cciss_defs.h>
6 7
7#define CCISS_IOC_MAGIC 'B' 8#define CCISS_IOC_MAGIC 'B'
8 9
@@ -36,133 +37,6 @@ typedef __u32 DriverVer_type;
36 37
37#define MAX_KMALLOC_SIZE 128000 38#define MAX_KMALLOC_SIZE 128000
38 39
39#ifndef CCISS_CMD_H
40// This defines are duplicated in cciss_cmd.h in the driver directory
41
42//general boundary definitions
43#define SENSEINFOBYTES 32//note that this value may vary between host implementations
44
45//Command Status value
46#define CMD_SUCCESS 0x0000
47#define CMD_TARGET_STATUS 0x0001
48#define CMD_DATA_UNDERRUN 0x0002
49#define CMD_DATA_OVERRUN 0x0003
50#define CMD_INVALID 0x0004
51#define CMD_PROTOCOL_ERR 0x0005
52#define CMD_HARDWARE_ERR 0x0006
53#define CMD_CONNECTION_LOST 0x0007
54#define CMD_ABORTED 0x0008
55#define CMD_ABORT_FAILED 0x0009
56#define CMD_UNSOLICITED_ABORT 0x000A
57#define CMD_TIMEOUT 0x000B
58#define CMD_UNABORTABLE 0x000C
59
60//transfer direction
61#define XFER_NONE 0x00
62#define XFER_WRITE 0x01
63#define XFER_READ 0x02
64#define XFER_RSVD 0x03
65
66//task attribute
67#define ATTR_UNTAGGED 0x00
68#define ATTR_SIMPLE 0x04
69#define ATTR_HEADOFQUEUE 0x05
70#define ATTR_ORDERED 0x06
71#define ATTR_ACA 0x07
72
73//cdb type
74#define TYPE_CMD 0x00
75#define TYPE_MSG 0x01
76
77// Type defs used in the following structs
78#define BYTE __u8
79#define WORD __u16
80#define HWORD __u16
81#define DWORD __u32
82
83#define CISS_MAX_LUN 1024
84
85#define LEVEL2LUN 1 // index into Target(x) structure, due to byte swapping
86#define LEVEL3LUN 0
87
88#pragma pack(1)
89
90//Command List Structure
91typedef union _SCSI3Addr_struct {
92 struct {
93 BYTE Dev;
94 BYTE Bus:6;
95 BYTE Mode:2; // b00
96 } PeripDev;
97 struct {
98 BYTE DevLSB;
99 BYTE DevMSB:6;
100 BYTE Mode:2; // b01
101 } LogDev;
102 struct {
103 BYTE Dev:5;
104 BYTE Bus:3;
105 BYTE Targ:6;
106 BYTE Mode:2; // b10
107 } LogUnit;
108} SCSI3Addr_struct;
109
110typedef struct _PhysDevAddr_struct {
111 DWORD TargetId:24;
112 DWORD Bus:6;
113 DWORD Mode:2;
114 SCSI3Addr_struct Target[2]; //2 level target device addr
115} PhysDevAddr_struct;
116
117typedef struct _LogDevAddr_struct {
118 DWORD VolId:30;
119 DWORD Mode:2;
120 BYTE reserved[4];
121} LogDevAddr_struct;
122
123typedef union _LUNAddr_struct {
124 BYTE LunAddrBytes[8];
125 SCSI3Addr_struct SCSI3Lun[4];
126 PhysDevAddr_struct PhysDev;
127 LogDevAddr_struct LogDev;
128} LUNAddr_struct;
129
130typedef struct _RequestBlock_struct {
131 BYTE CDBLen;
132 struct {
133 BYTE Type:3;
134 BYTE Attribute:3;
135 BYTE Direction:2;
136 } Type;
137 HWORD Timeout;
138 BYTE CDB[16];
139} RequestBlock_struct;
140
141typedef union _MoreErrInfo_struct{
142 struct {
143 BYTE Reserved[3];
144 BYTE Type;
145 DWORD ErrorInfo;
146 }Common_Info;
147 struct{
148 BYTE Reserved[2];
149 BYTE offense_size;//size of offending entry
150 BYTE offense_num; //byte # of offense 0-base
151 DWORD offense_value;
152 }Invalid_Cmd;
153}MoreErrInfo_struct;
154typedef struct _ErrorInfo_struct {
155 BYTE ScsiStatus;
156 BYTE SenseLen;
157 HWORD CommandStatus;
158 DWORD ResidualCnt;
159 MoreErrInfo_struct MoreErrInfo;
160 BYTE SenseInfo[SENSEINFOBYTES];
161} ErrorInfo_struct;
162
163#pragma pack()
164#endif /* CCISS_CMD_H */
165
166typedef struct _IOCTL_Command_struct { 40typedef struct _IOCTL_Command_struct {
167 LUNAddr_struct LUN_info; 41 LUNAddr_struct LUN_info;
168 RequestBlock_struct Request; 42 RequestBlock_struct Request;