aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa_cmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/hpsa_cmd.h')
-rw-r--r--drivers/scsi/hpsa_cmd.h49
1 files changed, 19 insertions, 30 deletions
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h
index b5cc7052339f..b5125dc31439 100644
--- a/drivers/scsi/hpsa_cmd.h
+++ b/drivers/scsi/hpsa_cmd.h
@@ -151,7 +151,7 @@
151#define HPSA_VPD_HEADER_SZ 4 151#define HPSA_VPD_HEADER_SZ 4
152 152
153/* Logical volume states */ 153/* Logical volume states */
154#define HPSA_VPD_LV_STATUS_UNSUPPORTED -1 154#define HPSA_VPD_LV_STATUS_UNSUPPORTED 0xff
155#define HPSA_LV_OK 0x0 155#define HPSA_LV_OK 0x0
156#define HPSA_LV_UNDERGOING_ERASE 0x0F 156#define HPSA_LV_UNDERGOING_ERASE 0x0F
157#define HPSA_LV_UNDERGOING_RPI 0x12 157#define HPSA_LV_UNDERGOING_RPI 0x12
@@ -238,11 +238,21 @@ struct ReportLUNdata {
238 u8 LUN[HPSA_MAX_LUN][8]; 238 u8 LUN[HPSA_MAX_LUN][8];
239}; 239};
240 240
241struct ext_report_lun_entry {
242 u8 lunid[8];
243 u8 wwid[8];
244 u8 device_type;
245 u8 device_flags;
246 u8 lun_count; /* multi-lun device, how many luns */
247 u8 redundant_paths;
248 u32 ioaccel_handle; /* ioaccel1 only uses lower 16 bits */
249};
250
241struct ReportExtendedLUNdata { 251struct ReportExtendedLUNdata {
242 u8 LUNListLength[4]; 252 u8 LUNListLength[4];
243 u8 extended_response_flag; 253 u8 extended_response_flag;
244 u8 reserved[3]; 254 u8 reserved[3];
245 u8 LUN[HPSA_MAX_LUN][24]; 255 struct ext_report_lun_entry LUN[HPSA_MAX_LUN];
246}; 256};
247 257
248struct SenseSubsystem_info { 258struct SenseSubsystem_info {
@@ -375,6 +385,7 @@ struct ctlr_info; /* defined in hpsa.h */
375 * or a bus address. 385 * or a bus address.
376 */ 386 */
377 387
388#define COMMANDLIST_ALIGNMENT 128
378struct CommandList { 389struct CommandList {
379 struct CommandListHeader Header; 390 struct CommandListHeader Header;
380 struct RequestBlock Request; 391 struct RequestBlock Request;
@@ -389,21 +400,7 @@ struct CommandList {
389 struct list_head list; 400 struct list_head list;
390 struct completion *waiting; 401 struct completion *waiting;
391 void *scsi_cmd; 402 void *scsi_cmd;
392 403} __aligned(COMMANDLIST_ALIGNMENT);
393/* on 64 bit architectures, to get this to be 32-byte-aligned
394 * it so happens we need PAD_64 bytes of padding, on 32 bit systems,
395 * we need PAD_32 bytes of padding (see below). This does that.
396 * If it happens that 64 bit and 32 bit systems need different
397 * padding, PAD_32 and PAD_64 can be set independently, and.
398 * the code below will do the right thing.
399 */
400#define IS_32_BIT ((8 - sizeof(long))/4)
401#define IS_64_BIT (!IS_32_BIT)
402#define PAD_32 (40)
403#define PAD_64 (12)
404#define COMMANDLIST_PAD (IS_32_BIT * PAD_32 + IS_64_BIT * PAD_64)
405 u8 pad[COMMANDLIST_PAD];
406};
407 404
408/* Max S/G elements in I/O accelerator command */ 405/* Max S/G elements in I/O accelerator command */
409#define IOACCEL1_MAXSGENTRIES 24 406#define IOACCEL1_MAXSGENTRIES 24
@@ -413,6 +410,7 @@ struct CommandList {
413 * Structure for I/O accelerator (mode 1) commands. 410 * Structure for I/O accelerator (mode 1) commands.
414 * Note that this structure must be 128-byte aligned in size. 411 * Note that this structure must be 128-byte aligned in size.
415 */ 412 */
413#define IOACCEL1_COMMANDLIST_ALIGNMENT 128
416struct io_accel1_cmd { 414struct io_accel1_cmd {
417 u16 dev_handle; /* 0x00 - 0x01 */ 415 u16 dev_handle; /* 0x00 - 0x01 */
418 u8 reserved1; /* 0x02 */ 416 u8 reserved1; /* 0x02 */
@@ -440,12 +438,7 @@ struct io_accel1_cmd {
440 struct vals32 host_addr; /* 0x70 - 0x77 */ 438 struct vals32 host_addr; /* 0x70 - 0x77 */
441 u8 CISS_LUN[8]; /* 0x78 - 0x7F */ 439 u8 CISS_LUN[8]; /* 0x78 - 0x7F */
442 struct SGDescriptor SG[IOACCEL1_MAXSGENTRIES]; 440 struct SGDescriptor SG[IOACCEL1_MAXSGENTRIES];
443#define IOACCEL1_PAD_64 0 441} __aligned(IOACCEL1_COMMANDLIST_ALIGNMENT);
444#define IOACCEL1_PAD_32 0
445#define IOACCEL1_PAD (IS_32_BIT * IOACCEL1_PAD_32 + \
446 IS_64_BIT * IOACCEL1_PAD_64)
447 u8 pad[IOACCEL1_PAD];
448};
449 442
450#define IOACCEL1_FUNCTION_SCSIIO 0x00 443#define IOACCEL1_FUNCTION_SCSIIO 0x00
451#define IOACCEL1_SGLOFFSET 32 444#define IOACCEL1_SGLOFFSET 32
@@ -510,14 +503,11 @@ struct io_accel2_scsi_response {
510 u8 sense_data_buff[32]; /* sense/response data buffer */ 503 u8 sense_data_buff[32]; /* sense/response data buffer */
511}; 504};
512 505
513#define IOACCEL2_64_PAD 76
514#define IOACCEL2_32_PAD 76
515#define IOACCEL2_PAD (IS_32_BIT * IOACCEL2_32_PAD + \
516 IS_64_BIT * IOACCEL2_64_PAD)
517/* 506/*
518 * Structure for I/O accelerator (mode 2 or m2) commands. 507 * Structure for I/O accelerator (mode 2 or m2) commands.
519 * Note that this structure must be 128-byte aligned in size. 508 * Note that this structure must be 128-byte aligned in size.
520 */ 509 */
510#define IOACCEL2_COMMANDLIST_ALIGNMENT 128
521struct io_accel2_cmd { 511struct io_accel2_cmd {
522 u8 IU_type; /* IU Type */ 512 u8 IU_type; /* IU Type */
523 u8 direction; /* direction, memtype, and encryption */ 513 u8 direction; /* direction, memtype, and encryption */
@@ -544,8 +534,7 @@ struct io_accel2_cmd {
544 u32 tweak_upper; /* Encryption tweak, upper 4 bytes */ 534 u32 tweak_upper; /* Encryption tweak, upper 4 bytes */
545 struct ioaccel2_sg_element sg[IOACCEL2_MAXSGENTRIES]; 535 struct ioaccel2_sg_element sg[IOACCEL2_MAXSGENTRIES];
546 struct io_accel2_scsi_response error_data; 536 struct io_accel2_scsi_response error_data;
547 u8 pad[IOACCEL2_PAD]; 537} __aligned(IOACCEL2_COMMANDLIST_ALIGNMENT);
548};
549 538
550/* 539/*
551 * defines for Mode 2 command struct 540 * defines for Mode 2 command struct
@@ -636,7 +625,7 @@ struct TransTable_struct {
636 u32 RepQCount; 625 u32 RepQCount;
637 u32 RepQCtrAddrLow32; 626 u32 RepQCtrAddrLow32;
638 u32 RepQCtrAddrHigh32; 627 u32 RepQCtrAddrHigh32;
639#define MAX_REPLY_QUEUES 8 628#define MAX_REPLY_QUEUES 64
640 struct vals32 RepQAddr[MAX_REPLY_QUEUES]; 629 struct vals32 RepQAddr[MAX_REPLY_QUEUES];
641}; 630};
642 631