diff options
author | dann frazier <dannf@hp.com> | 2010-02-17 18:53:31 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-22 07:44:45 -0500 |
commit | b028461d66a4dc2754d4e5dab1b3974c44798c5d (patch) | |
tree | d12b0275b3fd1af7d6c841ae053248d6efb57169 /drivers/block/cciss_cmd.h | |
parent | 488991e28e55b4fbca8067edf0259f69d1a6f92c (diff) |
cciss: remove C99-style comments
Some cleanup before the header file split-out so we don't propagate this style
into new files.
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: dann frazier <dannf@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/cciss_cmd.h')
-rw-r--r-- | drivers/block/cciss_cmd.h | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/drivers/block/cciss_cmd.h b/drivers/block/cciss_cmd.h index 6afa700890ff..277422b7e060 100644 --- a/drivers/block/cciss_cmd.h +++ b/drivers/block/cciss_cmd.h | |||
@@ -1,17 +1,16 @@ | |||
1 | #ifndef CCISS_CMD_H | 1 | #ifndef CCISS_CMD_H |
2 | #define CCISS_CMD_H | 2 | #define CCISS_CMD_H |
3 | //########################################################################### | 3 | /* DEFINES */ |
4 | //DEFINES | ||
5 | //########################################################################### | ||
6 | #define CISS_VERSION "1.00" | 4 | #define CISS_VERSION "1.00" |
7 | 5 | ||
8 | //general boundary definitions | 6 | /* general boundary definitions */ |
9 | #define SENSEINFOBYTES 32//note that this value may vary between host implementations | 7 | #define SENSEINFOBYTES 32 /* note that this value may vary |
8 | between host implementations */ | ||
10 | #define MAXSGENTRIES 32 | 9 | #define MAXSGENTRIES 32 |
11 | #define CCISS_SG_CHAIN 0x80000000 | 10 | #define CCISS_SG_CHAIN 0x80000000 |
12 | #define MAXREPLYQS 256 | 11 | #define MAXREPLYQS 256 |
13 | 12 | ||
14 | //Command Status value | 13 | /* Command Status value */ |
15 | #define CMD_SUCCESS 0x0000 | 14 | #define CMD_SUCCESS 0x0000 |
16 | #define CMD_TARGET_STATUS 0x0001 | 15 | #define CMD_TARGET_STATUS 0x0001 |
17 | #define CMD_DATA_UNDERRUN 0x0002 | 16 | #define CMD_DATA_UNDERRUN 0x0002 |
@@ -49,30 +48,30 @@ | |||
49 | #define ASYM_ACCESS_CHANGED 0x06 | 48 | #define ASYM_ACCESS_CHANGED 0x06 |
50 | #define LUN_CAPACITY_CHANGED 0x09 | 49 | #define LUN_CAPACITY_CHANGED 0x09 |
51 | 50 | ||
52 | //transfer direction | 51 | /* transfer direction */ |
53 | #define XFER_NONE 0x00 | 52 | #define XFER_NONE 0x00 |
54 | #define XFER_WRITE 0x01 | 53 | #define XFER_WRITE 0x01 |
55 | #define XFER_READ 0x02 | 54 | #define XFER_READ 0x02 |
56 | #define XFER_RSVD 0x03 | 55 | #define XFER_RSVD 0x03 |
57 | 56 | ||
58 | //task attribute | 57 | /* task attribute */ |
59 | #define ATTR_UNTAGGED 0x00 | 58 | #define ATTR_UNTAGGED 0x00 |
60 | #define ATTR_SIMPLE 0x04 | 59 | #define ATTR_SIMPLE 0x04 |
61 | #define ATTR_HEADOFQUEUE 0x05 | 60 | #define ATTR_HEADOFQUEUE 0x05 |
62 | #define ATTR_ORDERED 0x06 | 61 | #define ATTR_ORDERED 0x06 |
63 | #define ATTR_ACA 0x07 | 62 | #define ATTR_ACA 0x07 |
64 | 63 | ||
65 | //cdb type | 64 | /* cdb type */ |
66 | #define TYPE_CMD 0x00 | 65 | #define TYPE_CMD 0x00 |
67 | #define TYPE_MSG 0x01 | 66 | #define TYPE_MSG 0x01 |
68 | 67 | ||
69 | //config space register offsets | 68 | /* config space register offsets */ |
70 | #define CFG_VENDORID 0x00 | 69 | #define CFG_VENDORID 0x00 |
71 | #define CFG_DEVICEID 0x02 | 70 | #define CFG_DEVICEID 0x02 |
72 | #define CFG_I2OBAR 0x10 | 71 | #define CFG_I2OBAR 0x10 |
73 | #define CFG_MEM1BAR 0x14 | 72 | #define CFG_MEM1BAR 0x14 |
74 | 73 | ||
75 | //i2o space register offsets | 74 | /* i2o space register offsets */ |
76 | #define I2O_IBDB_SET 0x20 | 75 | #define I2O_IBDB_SET 0x20 |
77 | #define I2O_IBDB_CLEAR 0x70 | 76 | #define I2O_IBDB_CLEAR 0x70 |
78 | #define I2O_INT_STATUS 0x30 | 77 | #define I2O_INT_STATUS 0x30 |
@@ -81,7 +80,7 @@ | |||
81 | #define I2O_OBPOST_Q 0x44 | 80 | #define I2O_OBPOST_Q 0x44 |
82 | #define I2O_DMA1_CFG 0x214 | 81 | #define I2O_DMA1_CFG 0x214 |
83 | 82 | ||
84 | //Configuration Table | 83 | /* Configuration Table */ |
85 | #define CFGTBL_ChangeReq 0x00000001l | 84 | #define CFGTBL_ChangeReq 0x00000001l |
86 | #define CFGTBL_AccCmds 0x00000001l | 85 | #define CFGTBL_AccCmds 0x00000001l |
87 | 86 | ||
@@ -103,24 +102,22 @@ typedef union _u64bit | |||
103 | __u64 val; | 102 | __u64 val; |
104 | } u64bit; | 103 | } u64bit; |
105 | 104 | ||
106 | // Type defs used in the following structs | 105 | /* Type defs used in the following structs */ |
107 | #define BYTE __u8 | 106 | #define BYTE __u8 |
108 | #define WORD __u16 | 107 | #define WORD __u16 |
109 | #define HWORD __u16 | 108 | #define HWORD __u16 |
110 | #define DWORD __u32 | 109 | #define DWORD __u32 |
111 | #define QWORD vals32 | 110 | #define QWORD vals32 |
112 | 111 | ||
113 | //########################################################################### | 112 | /* STRUCTURES */ |
114 | //STRUCTURES | ||
115 | //########################################################################### | ||
116 | #define CISS_MAX_LUN 1024 | 113 | #define CISS_MAX_LUN 1024 |
117 | #define CISS_MAX_PHYS_LUN 1024 | 114 | #define CISS_MAX_PHYS_LUN 1024 |
118 | // SCSI-3 Cmmands | 115 | /* SCSI-3 Cmmands */ |
119 | 116 | ||
120 | #pragma pack(1) | 117 | #pragma pack(1) |
121 | 118 | ||
122 | #define CISS_INQUIRY 0x12 | 119 | #define CISS_INQUIRY 0x12 |
123 | //Date returned | 120 | /* Date returned */ |
124 | typedef struct _InquiryData_struct | 121 | typedef struct _InquiryData_struct |
125 | { | 122 | { |
126 | BYTE data_byte[36]; | 123 | BYTE data_byte[36]; |
@@ -128,7 +125,7 @@ typedef struct _InquiryData_struct | |||
128 | 125 | ||
129 | #define CISS_REPORT_LOG 0xc2 /* Report Logical LUNs */ | 126 | #define CISS_REPORT_LOG 0xc2 /* Report Logical LUNs */ |
130 | #define CISS_REPORT_PHYS 0xc3 /* Report Physical LUNs */ | 127 | #define CISS_REPORT_PHYS 0xc3 /* Report Physical LUNs */ |
131 | // Data returned | 128 | /* Data returned */ |
132 | typedef struct _ReportLUNdata_struct | 129 | typedef struct _ReportLUNdata_struct |
133 | { | 130 | { |
134 | BYTE LUNListLength[4]; | 131 | BYTE LUNListLength[4]; |
@@ -139,8 +136,8 @@ typedef struct _ReportLUNdata_struct | |||
139 | #define CCISS_READ_CAPACITY 0x25 /* Read Capacity */ | 136 | #define CCISS_READ_CAPACITY 0x25 /* Read Capacity */ |
140 | typedef struct _ReadCapdata_struct | 137 | typedef struct _ReadCapdata_struct |
141 | { | 138 | { |
142 | BYTE total_size[4]; // Total size in blocks | 139 | BYTE total_size[4]; /* Total size in blocks */ |
143 | BYTE block_size[4]; // Size of blocks in bytes | 140 | BYTE block_size[4]; /* Size of blocks in bytes */ |
144 | } ReadCapdata_struct; | 141 | } ReadCapdata_struct; |
145 | 142 | ||
146 | #define CCISS_READ_CAPACITY_16 0x9e /* Read Capacity 16 */ | 143 | #define CCISS_READ_CAPACITY_16 0x9e /* Read Capacity 16 */ |
@@ -172,29 +169,29 @@ typedef struct _ReadCapdata_struct_16 | |||
172 | #define CDB_LEN10 10 | 169 | #define CDB_LEN10 10 |
173 | #define CDB_LEN16 16 | 170 | #define CDB_LEN16 16 |
174 | 171 | ||
175 | // BMIC commands | 172 | /* BMIC commands */ |
176 | #define BMIC_READ 0x26 | 173 | #define BMIC_READ 0x26 |
177 | #define BMIC_WRITE 0x27 | 174 | #define BMIC_WRITE 0x27 |
178 | #define BMIC_CACHE_FLUSH 0xc2 | 175 | #define BMIC_CACHE_FLUSH 0xc2 |
179 | #define CCISS_CACHE_FLUSH 0x01 //C2 was already being used by CCISS | 176 | #define CCISS_CACHE_FLUSH 0x01 /* C2 was already being used by CCISS */ |
180 | 177 | ||
181 | //Command List Structure | 178 | /* Command List Structure */ |
182 | typedef union _SCSI3Addr_struct { | 179 | typedef union _SCSI3Addr_struct { |
183 | struct { | 180 | struct { |
184 | BYTE Dev; | 181 | BYTE Dev; |
185 | BYTE Bus:6; | 182 | BYTE Bus:6; |
186 | BYTE Mode:2; // b00 | 183 | BYTE Mode:2; /* b00 */ |
187 | } PeripDev; | 184 | } PeripDev; |
188 | struct { | 185 | struct { |
189 | BYTE DevLSB; | 186 | BYTE DevLSB; |
190 | BYTE DevMSB:6; | 187 | BYTE DevMSB:6; |
191 | BYTE Mode:2; // b01 | 188 | BYTE Mode:2; /* b01 */ |
192 | } LogDev; | 189 | } LogDev; |
193 | struct { | 190 | struct { |
194 | BYTE Dev:5; | 191 | BYTE Dev:5; |
195 | BYTE Bus:3; | 192 | BYTE Bus:3; |
196 | BYTE Targ:6; | 193 | BYTE Targ:6; |
197 | BYTE Mode:2; // b10 | 194 | BYTE Mode:2; /* b10 */ |
198 | } LogUnit; | 195 | } LogUnit; |
199 | } SCSI3Addr_struct; | 196 | } SCSI3Addr_struct; |
200 | 197 | ||
@@ -202,7 +199,7 @@ typedef struct _PhysDevAddr_struct { | |||
202 | DWORD TargetId:24; | 199 | DWORD TargetId:24; |
203 | DWORD Bus:6; | 200 | DWORD Bus:6; |
204 | DWORD Mode:2; | 201 | DWORD Mode:2; |
205 | SCSI3Addr_struct Target[2]; //2 level target device addr | 202 | SCSI3Addr_struct Target[2]; /* 2 level target device addr */ |
206 | } PhysDevAddr_struct; | 203 | } PhysDevAddr_struct; |
207 | 204 | ||
208 | typedef struct _LogDevAddr_struct { | 205 | typedef struct _LogDevAddr_struct { |
@@ -255,8 +252,8 @@ typedef union _MoreErrInfo_struct{ | |||
255 | }Common_Info; | 252 | }Common_Info; |
256 | struct{ | 253 | struct{ |
257 | BYTE Reserved[2]; | 254 | BYTE Reserved[2]; |
258 | BYTE offense_size;//size of offending entry | 255 | BYTE offense_size; /* size of offending entry */ |
259 | BYTE offense_num; //byte # of offense 0-base | 256 | BYTE offense_num; /* byte # of offense 0-base */ |
260 | DWORD offense_value; | 257 | DWORD offense_value; |
261 | }Invalid_Cmd; | 258 | }Invalid_Cmd; |
262 | }MoreErrInfo_struct; | 259 | }MoreErrInfo_struct; |
@@ -300,7 +297,7 @@ typedef struct _CommandList_struct { | |||
300 | char pad[PADSIZE]; | 297 | char pad[PADSIZE]; |
301 | } CommandList_struct; | 298 | } CommandList_struct; |
302 | 299 | ||
303 | //Configuration Table Structure | 300 | /* Configuration Table Structure */ |
304 | typedef struct _HostWrite_struct { | 301 | typedef struct _HostWrite_struct { |
305 | DWORD TransportRequest; | 302 | DWORD TransportRequest; |
306 | DWORD Reserved; | 303 | DWORD Reserved; |
@@ -326,4 +323,4 @@ typedef struct _CfgTable_struct { | |||
326 | DWORD MaxPhysicalDrivesPerLogicalUnit; | 323 | DWORD MaxPhysicalDrivesPerLogicalUnit; |
327 | } CfgTable_struct; | 324 | } CfgTable_struct; |
328 | #pragma pack() | 325 | #pragma pack() |
329 | #endif // CCISS_CMD_H | 326 | #endif /* CCISS_CMD_H */ |