aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa_cmd.h
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2010-02-04 09:41:33 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-02-17 14:17:00 -0500
commit01a02ffcd55b74e3459bb7358140970e126d4731 (patch)
treecc533e13052c960f31250c35a5660eeae75b6bce /drivers/scsi/hpsa_cmd.h
parent466dc22409b97343c6b2168094d5f867093a70c2 (diff)
[SCSI] hpsa: Use kernel integer types, not userland ones
That is, use u64, u32, u16 and u8 rather than __u64, __u32, __u16 and __u8. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/hpsa_cmd.h')
-rw-r--r--drivers/scsi/hpsa_cmd.h146
1 files changed, 73 insertions, 73 deletions
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h
index 2df1c661ce10..88bb3b0a21d3 100644
--- a/drivers/scsi/hpsa_cmd.h
+++ b/drivers/scsi/hpsa_cmd.h
@@ -107,13 +107,13 @@
107#define CFGTBL_BusType_Fibre1G 0x00000100l 107#define CFGTBL_BusType_Fibre1G 0x00000100l
108#define CFGTBL_BusType_Fibre2G 0x00000200l 108#define CFGTBL_BusType_Fibre2G 0x00000200l
109struct vals32 { 109struct vals32 {
110 __u32 lower; 110 u32 lower;
111 __u32 upper; 111 u32 upper;
112}; 112};
113 113
114union u64bit { 114union u64bit {
115 struct vals32 val32; 115 struct vals32 val32;
116 __u64 val; 116 u64 val;
117}; 117};
118 118
119/* FIXME this is a per controller value (barf!) */ 119/* FIXME this is a per controller value (barf!) */
@@ -126,34 +126,34 @@ union u64bit {
126 126
127#define HPSA_INQUIRY 0x12 127#define HPSA_INQUIRY 0x12
128struct InquiryData { 128struct InquiryData {
129 __u8 data_byte[36]; 129 u8 data_byte[36];
130}; 130};
131 131
132#define HPSA_REPORT_LOG 0xc2 /* Report Logical LUNs */ 132#define HPSA_REPORT_LOG 0xc2 /* Report Logical LUNs */
133#define HPSA_REPORT_PHYS 0xc3 /* Report Physical LUNs */ 133#define HPSA_REPORT_PHYS 0xc3 /* Report Physical LUNs */
134struct ReportLUNdata { 134struct ReportLUNdata {
135 __u8 LUNListLength[4]; 135 u8 LUNListLength[4];
136 __u32 reserved; 136 u32 reserved;
137 __u8 LUN[HPSA_MAX_LUN][8]; 137 u8 LUN[HPSA_MAX_LUN][8];
138}; 138};
139 139
140struct ReportExtendedLUNdata { 140struct ReportExtendedLUNdata {
141 __u8 LUNListLength[4]; 141 u8 LUNListLength[4];
142 __u8 extended_response_flag; 142 u8 extended_response_flag;
143 __u8 reserved[3]; 143 u8 reserved[3];
144 __u8 LUN[HPSA_MAX_LUN][24]; 144 u8 LUN[HPSA_MAX_LUN][24];
145}; 145};
146 146
147struct SenseSubsystem_info { 147struct SenseSubsystem_info {
148 __u8 reserved[36]; 148 u8 reserved[36];
149 __u8 portname[8]; 149 u8 portname[8];
150 __u8 reserved1[1108]; 150 u8 reserved1[1108];
151}; 151};
152 152
153#define HPSA_READ_CAPACITY 0x25 /* Read Capacity */ 153#define HPSA_READ_CAPACITY 0x25 /* Read Capacity */
154struct ReadCapdata { 154struct ReadCapdata {
155 __u8 total_size[4]; /* Total size in blocks */ 155 u8 total_size[4]; /* Total size in blocks */
156 __u8 block_size[4]; /* Size of blocks in bytes */ 156 u8 block_size[4]; /* Size of blocks in bytes */
157}; 157};
158 158
159#if 0 159#if 0
@@ -174,94 +174,94 @@ struct ReadCapdata {
174/* Command List Structure */ 174/* Command List Structure */
175union SCSI3Addr { 175union SCSI3Addr {
176 struct { 176 struct {
177 __u8 Dev; 177 u8 Dev;
178 __u8 Bus:6; 178 u8 Bus:6;
179 __u8 Mode:2; /* b00 */ 179 u8 Mode:2; /* b00 */
180 } PeripDev; 180 } PeripDev;
181 struct { 181 struct {
182 __u8 DevLSB; 182 u8 DevLSB;
183 __u8 DevMSB:6; 183 u8 DevMSB:6;
184 __u8 Mode:2; /* b01 */ 184 u8 Mode:2; /* b01 */
185 } LogDev; 185 } LogDev;
186 struct { 186 struct {
187 __u8 Dev:5; 187 u8 Dev:5;
188 __u8 Bus:3; 188 u8 Bus:3;
189 __u8 Targ:6; 189 u8 Targ:6;
190 __u8 Mode:2; /* b10 */ 190 u8 Mode:2; /* b10 */
191 } LogUnit; 191 } LogUnit;
192}; 192};
193 193
194struct PhysDevAddr { 194struct PhysDevAddr {
195 __u32 TargetId:24; 195 u32 TargetId:24;
196 __u32 Bus:6; 196 u32 Bus:6;
197 __u32 Mode:2; 197 u32 Mode:2;
198 /* 2 level target device addr */ 198 /* 2 level target device addr */
199 union SCSI3Addr Target[2]; 199 union SCSI3Addr Target[2];
200}; 200};
201 201
202struct LogDevAddr { 202struct LogDevAddr {
203 __u32 VolId:30; 203 u32 VolId:30;
204 __u32 Mode:2; 204 u32 Mode:2;
205 __u8 reserved[4]; 205 u8 reserved[4];
206}; 206};
207 207
208union LUNAddr { 208union LUNAddr {
209 __u8 LunAddrBytes[8]; 209 u8 LunAddrBytes[8];
210 union SCSI3Addr SCSI3Lun[4]; 210 union SCSI3Addr SCSI3Lun[4];
211 struct PhysDevAddr PhysDev; 211 struct PhysDevAddr PhysDev;
212 struct LogDevAddr LogDev; 212 struct LogDevAddr LogDev;
213}; 213};
214 214
215struct CommandListHeader { 215struct CommandListHeader {
216 __u8 ReplyQueue; 216 u8 ReplyQueue;
217 __u8 SGList; 217 u8 SGList;
218 __u16 SGTotal; 218 u16 SGTotal;
219 struct vals32 Tag; 219 struct vals32 Tag;
220 union LUNAddr LUN; 220 union LUNAddr LUN;
221}; 221};
222 222
223struct RequestBlock { 223struct RequestBlock {
224 __u8 CDBLen; 224 u8 CDBLen;
225 struct { 225 struct {
226 __u8 Type:3; 226 u8 Type:3;
227 __u8 Attribute:3; 227 u8 Attribute:3;
228 __u8 Direction:2; 228 u8 Direction:2;
229 } Type; 229 } Type;
230 __u16 Timeout; 230 u16 Timeout;
231 __u8 CDB[16]; 231 u8 CDB[16];
232}; 232};
233 233
234struct ErrDescriptor { 234struct ErrDescriptor {
235 struct vals32 Addr; 235 struct vals32 Addr;
236 __u32 Len; 236 u32 Len;
237}; 237};
238 238
239struct SGDescriptor { 239struct SGDescriptor {
240 struct vals32 Addr; 240 struct vals32 Addr;
241 __u32 Len; 241 u32 Len;
242 __u32 Ext; 242 u32 Ext;
243}; 243};
244 244
245union MoreErrInfo { 245union MoreErrInfo {
246 struct { 246 struct {
247 __u8 Reserved[3]; 247 u8 Reserved[3];
248 __u8 Type; 248 u8 Type;
249 __u32 ErrorInfo; 249 u32 ErrorInfo;
250 } Common_Info; 250 } Common_Info;
251 struct { 251 struct {
252 __u8 Reserved[2]; 252 u8 Reserved[2];
253 __u8 offense_size; /* size of offending entry */ 253 u8 offense_size; /* size of offending entry */
254 __u8 offense_num; /* byte # of offense 0-base */ 254 u8 offense_num; /* byte # of offense 0-base */
255 __u32 offense_value; 255 u32 offense_value;
256 } Invalid_Cmd; 256 } Invalid_Cmd;
257}; 257};
258struct ErrorInfo { 258struct ErrorInfo {
259 __u8 ScsiStatus; 259 u8 ScsiStatus;
260 __u8 SenseLen; 260 u8 SenseLen;
261 __u16 CommandStatus; 261 u16 CommandStatus;
262 __u32 ResidualCnt; 262 u32 ResidualCnt;
263 union MoreErrInfo MoreErrInfo; 263 union MoreErrInfo MoreErrInfo;
264 __u8 SenseInfo[SENSEINFOBYTES]; 264 u8 SenseInfo[SENSEINFOBYTES];
265}; 265};
266/* Command types */ 266/* Command types */
267#define CMD_IOCTL_PEND 0x01 267#define CMD_IOCTL_PEND 0x01
@@ -279,7 +279,7 @@ struct CommandList {
279 struct ErrDescriptor ErrDesc; 279 struct ErrDescriptor ErrDesc;
280 struct SGDescriptor SG[MAXSGENTRIES]; 280 struct SGDescriptor SG[MAXSGENTRIES];
281 /* information associated with the command */ 281 /* information associated with the command */
282 __u32 busaddr; /* physical addr of this record */ 282 u32 busaddr; /* physical addr of this record */
283 struct ErrorInfo *err_info; /* pointer to the allocated mem */ 283 struct ErrorInfo *err_info; /* pointer to the allocated mem */
284 struct ctlr_info *h; 284 struct ctlr_info *h;
285 int cmd_type; 285 int cmd_type;
@@ -295,31 +295,31 @@ struct CommandList {
295 295
296/* Configuration Table Structure */ 296/* Configuration Table Structure */
297struct HostWrite { 297struct HostWrite {
298 __u32 TransportRequest; 298 u32 TransportRequest;
299 __u32 Reserved; 299 u32 Reserved;
300 __u32 CoalIntDelay; 300 u32 CoalIntDelay;
301 __u32 CoalIntCount; 301 u32 CoalIntCount;
302}; 302};
303 303
304struct CfgTable { 304struct CfgTable {
305 __u8 Signature[4]; 305 u8 Signature[4];
306 __u32 SpecValence; 306 u32 SpecValence;
307 __u32 TransportSupport; 307 u32 TransportSupport;
308 __u32 TransportActive; 308 u32 TransportActive;
309 struct HostWrite HostWrite; 309 struct HostWrite HostWrite;
310 __u32 CmdsOutMax; 310 u32 CmdsOutMax;
311 __u32 BusTypes; 311 u32 BusTypes;
312 __u32 Reserved; 312 u32 Reserved;
313 __u8 ServerName[16]; 313 u8 ServerName[16];
314 __u32 HeartBeat; 314 u32 HeartBeat;
315 __u32 SCSI_Prefetch; 315 u32 SCSI_Prefetch;
316}; 316};
317 317
318struct hpsa_pci_info { 318struct hpsa_pci_info {
319 unsigned char bus; 319 unsigned char bus;
320 unsigned char dev_fn; 320 unsigned char dev_fn;
321 unsigned short domain; 321 unsigned short domain;
322 __u32 board_id; 322 u32 board_id;
323}; 323};
324 324
325#pragma pack() 325#pragma pack()