aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss_cmd.h
diff options
context:
space:
mode:
authorMike Miller <mike.miller@hp.com>2010-06-02 15:58:06 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:12:51 -0400
commit5e216153c34ac21781110795284a784037f808e3 (patch)
treeb42ceb1e884bdb397283ddb01562fe03d1f95cad /drivers/block/cciss_cmd.h
parent1d1414419f034702bf587accdf2a9ac53245e000 (diff)
cciss: add performant mode support for Stars/Sirius
Add a mode of controller operation called Performant Mode. Even though cciss has been deprecated in favor of hpsa there are new controllers due out next year that HP must support in older vendor distros. Vendors require all fixes/features be upstream. These new controllers support only 16 commands in simple mode but support up to 1024 in performant mode. This requires us to add this support at this late date. The performant mode transport minimizes host PCI accesses by performinf many completions per read. PCI writes are posted so the host can write then immediately get off the bus not waiting for the writwe to complete to the target. In the context of performant mode the host read out to a controller pulls all posted writes into host memory ensuring the reply queue is coherent. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/cciss_cmd.h')
-rw-r--r--drivers/block/cciss_cmd.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/drivers/block/cciss_cmd.h b/drivers/block/cciss_cmd.h
index e624ff959cb6..eda6a8e6b600 100644
--- a/drivers/block/cciss_cmd.h
+++ b/drivers/block/cciss_cmd.h
@@ -54,6 +54,7 @@
54#define CFGTBL_AccCmds 0x00000001l 54#define CFGTBL_AccCmds 0x00000001l
55 55
56#define CFGTBL_Trans_Simple 0x00000002l 56#define CFGTBL_Trans_Simple 0x00000002l
57#define CFGTBL_Trans_Performant 0x00000004l
57 58
58#define CFGTBL_BusType_Ultra2 0x00000001l 59#define CFGTBL_BusType_Ultra2 0x00000001l
59#define CFGTBL_BusType_Ultra3 0x00000002l 60#define CFGTBL_BusType_Ultra3 0x00000002l
@@ -173,12 +174,15 @@ typedef struct _SGDescriptor_struct {
173 * PAD_64 can be adjusted independently as needed for 32-bit 174 * PAD_64 can be adjusted independently as needed for 32-bit
174 * and 64-bits systems. 175 * and 64-bits systems.
175 */ 176 */
176#define COMMANDLIST_ALIGNMENT (8) 177#define COMMANDLIST_ALIGNMENT (32)
177#define IS_64_BIT ((sizeof(long) - 4)/4) 178#define IS_64_BIT ((sizeof(long) - 4)/4)
178#define IS_32_BIT (!IS_64_BIT) 179#define IS_32_BIT (!IS_64_BIT)
179#define PAD_32 (0) 180#define PAD_32 (32)
180#define PAD_64 (4) 181#define PAD_64 (4)
181#define PADSIZE (IS_32_BIT * PAD_32 + IS_64_BIT * PAD_64) 182#define PADSIZE (IS_32_BIT * PAD_32 + IS_64_BIT * PAD_64)
183#define DIRECT_LOOKUP_BIT 0x10
184#define DIRECT_LOOKUP_SHIFT 5
185
182typedef struct _CommandList_struct { 186typedef struct _CommandList_struct {
183 CommandListHeader_struct Header; 187 CommandListHeader_struct Header;
184 RequestBlock_struct Request; 188 RequestBlock_struct Request;
@@ -195,7 +199,7 @@ typedef struct _CommandList_struct {
195 struct completion *waiting; 199 struct completion *waiting;
196 int retry_count; 200 int retry_count;
197 void * scsi_cmd; 201 void * scsi_cmd;
198 char pad[PADSIZE]; 202 char pad[PADSIZE];
199} CommandList_struct; 203} CommandList_struct;
200 204
201/* Configuration Table Structure */ 205/* Configuration Table Structure */
@@ -209,12 +213,15 @@ typedef struct _HostWrite_struct {
209typedef struct _CfgTable_struct { 213typedef struct _CfgTable_struct {
210 BYTE Signature[4]; 214 BYTE Signature[4];
211 DWORD SpecValence; 215 DWORD SpecValence;
216#define SIMPLE_MODE 0x02
217#define PERFORMANT_MODE 0x04
218#define MEMQ_MODE 0x08
212 DWORD TransportSupport; 219 DWORD TransportSupport;
213 DWORD TransportActive; 220 DWORD TransportActive;
214 HostWrite_struct HostWrite; 221 HostWrite_struct HostWrite;
215 DWORD CmdsOutMax; 222 DWORD CmdsOutMax;
216 DWORD BusTypes; 223 DWORD BusTypes;
217 DWORD Reserved; 224 DWORD TransMethodOffset;
218 BYTE ServerName[16]; 225 BYTE ServerName[16];
219 DWORD HeartBeat; 226 DWORD HeartBeat;
220 DWORD SCSI_Prefetch; 227 DWORD SCSI_Prefetch;
@@ -222,6 +229,25 @@ typedef struct _CfgTable_struct {
222 DWORD MaxLogicalUnits; 229 DWORD MaxLogicalUnits;
223 DWORD MaxPhysicalDrives; 230 DWORD MaxPhysicalDrives;
224 DWORD MaxPhysicalDrivesPerLogicalUnit; 231 DWORD MaxPhysicalDrivesPerLogicalUnit;
232 DWORD MaxPerformantModeCommands;
225} CfgTable_struct; 233} CfgTable_struct;
234
235struct TransTable_struct {
236 u32 BlockFetch0;
237 u32 BlockFetch1;
238 u32 BlockFetch2;
239 u32 BlockFetch3;
240 u32 BlockFetch4;
241 u32 BlockFetch5;
242 u32 BlockFetch6;
243 u32 BlockFetch7;
244 u32 RepQSize;
245 u32 RepQCount;
246 u32 RepQCtrAddrLow32;
247 u32 RepQCtrAddrHigh32;
248 u32 RepQAddr0Low32;
249 u32 RepQAddr0High32;
250};
251
226#pragma pack() 252#pragma pack()
227#endif /* CCISS_CMD_H */ 253#endif /* CCISS_CMD_H */