aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.h
diff options
context:
space:
mode:
authorWayne Boyer <wayneb@linux.vnet.ibm.com>2010-02-19 16:23:36 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-03 05:31:33 -0500
commita32c055feed74246747bf4f45adb765136d3a4d3 (patch)
tree41b268fa7ce654c8ea46b2ba6e704332449022a4 /drivers/scsi/ipr.h
parent6c71dcb28ff9b63b814a0b76a256f5dae08d3e0d (diff)
[SCSI] ipr: add support for new adapter command structures for the next generation chip
Change the adapter command structures such that both 32 bit and 64 bit based adapters can work with the driver. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/ipr.h')
-rw-r--r--drivers/scsi/ipr.h61
1 files changed, 48 insertions, 13 deletions
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index 19bbcf39f0c9..64e41df2a196 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -381,7 +381,7 @@ struct ipr_cmd_pkt {
381#define IPR_RQTYPE_HCAM 0x02 381#define IPR_RQTYPE_HCAM 0x02
382#define IPR_RQTYPE_ATA_PASSTHRU 0x04 382#define IPR_RQTYPE_ATA_PASSTHRU 0x04
383 383
384 u8 luntar_luntrn; 384 u8 reserved2;
385 385
386 u8 flags_hi; 386 u8 flags_hi;
387#define IPR_FLAGS_HI_WRITE_NOT_READ 0x80 387#define IPR_FLAGS_HI_WRITE_NOT_READ 0x80
@@ -403,7 +403,7 @@ struct ipr_cmd_pkt {
403 __be16 timeout; 403 __be16 timeout;
404}__attribute__ ((packed, aligned(4))); 404}__attribute__ ((packed, aligned(4)));
405 405
406struct ipr_ioarcb_ata_regs { 406struct ipr_ioarcb_ata_regs { /* 22 bytes */
407 u8 flags; 407 u8 flags;
408#define IPR_ATA_FLAG_PACKET_CMD 0x80 408#define IPR_ATA_FLAG_PACKET_CMD 0x80
409#define IPR_ATA_FLAG_XFER_TYPE_DMA 0x40 409#define IPR_ATA_FLAG_XFER_TYPE_DMA 0x40
@@ -442,28 +442,49 @@ struct ipr_ioadl_desc {
442 __be32 address; 442 __be32 address;
443}__attribute__((packed, aligned (8))); 443}__attribute__((packed, aligned (8)));
444 444
445struct ipr_ioadl64_desc {
446 __be32 flags;
447 __be32 data_len;
448 __be64 address;
449}__attribute__((packed, aligned (16)));
450
451struct ipr_ata64_ioadl {
452 struct ipr_ioarcb_ata_regs regs;
453 u16 reserved[5];
454 struct ipr_ioadl64_desc ioadl64[IPR_NUM_IOADL_ENTRIES];
455}__attribute__((packed, aligned (16)));
456
445struct ipr_ioarcb_add_data { 457struct ipr_ioarcb_add_data {
446 union { 458 union {
447 struct ipr_ioarcb_ata_regs regs; 459 struct ipr_ioarcb_ata_regs regs;
448 struct ipr_ioadl_desc ioadl[5]; 460 struct ipr_ioadl_desc ioadl[5];
449 __be32 add_cmd_parms[10]; 461 __be32 add_cmd_parms[10];
450 }u; 462 } u;
451}__attribute__ ((packed, aligned(4))); 463}__attribute__ ((packed, aligned (4)));
464
465struct ipr_ioarcb_sis64_add_addr_ecb {
466 __be64 ioasa_host_pci_addr;
467 __be64 data_ioadl_addr;
468 __be64 reserved;
469 __be32 ext_control_buf[4];
470}__attribute__((packed, aligned (8)));
452 471
453/* IOA Request Control Block 128 bytes */ 472/* IOA Request Control Block 128 bytes */
454struct ipr_ioarcb { 473struct ipr_ioarcb {
455 __be32 ioarcb_host_pci_addr; 474 union {
456 __be32 reserved; 475 __be32 ioarcb_host_pci_addr;
476 __be64 ioarcb_host_pci_addr64;
477 } a;
457 __be32 res_handle; 478 __be32 res_handle;
458 __be32 host_response_handle; 479 __be32 host_response_handle;
459 __be32 reserved1; 480 __be32 reserved1;
460 __be32 reserved2; 481 __be32 reserved2;
461 __be32 reserved3; 482 __be32 reserved3;
462 483
463 __be32 write_data_transfer_length; 484 __be32 data_transfer_length;
464 __be32 read_data_transfer_length; 485 __be32 read_data_transfer_length;
465 __be32 write_ioadl_addr; 486 __be32 write_ioadl_addr;
466 __be32 write_ioadl_len; 487 __be32 ioadl_len;
467 __be32 read_ioadl_addr; 488 __be32 read_ioadl_addr;
468 __be32 read_ioadl_len; 489 __be32 read_ioadl_len;
469 490
@@ -473,8 +494,14 @@ struct ipr_ioarcb {
473 494
474 struct ipr_cmd_pkt cmd_pkt; 495 struct ipr_cmd_pkt cmd_pkt;
475 496
476 __be32 add_cmd_parms_len; 497 __be16 add_cmd_parms_offset;
477 struct ipr_ioarcb_add_data add_data; 498 __be16 add_cmd_parms_len;
499
500 union {
501 struct ipr_ioarcb_add_data add_data;
502 struct ipr_ioarcb_sis64_add_addr_ecb sis64_addr_data;
503 } u;
504
478}__attribute__((packed, aligned (4))); 505}__attribute__((packed, aligned (4)));
479 506
480struct ipr_ioasa_vset { 507struct ipr_ioasa_vset {
@@ -1029,6 +1056,9 @@ struct ipr_chip_t {
1029 u16 intr_type; 1056 u16 intr_type;
1030#define IPR_USE_LSI 0x00 1057#define IPR_USE_LSI 0x00
1031#define IPR_USE_MSI 0x01 1058#define IPR_USE_MSI 0x01
1059 u16 sis_type;
1060#define IPR_SIS32 0x00
1061#define IPR_SIS64 0x01
1032 const struct ipr_chip_cfg_t *cfg; 1062 const struct ipr_chip_cfg_t *cfg;
1033}; 1063};
1034 1064
@@ -1099,6 +1129,7 @@ struct ipr_ioa_cfg {
1099 u8 dual_raid:1; 1129 u8 dual_raid:1;
1100 u8 needs_warm_reset:1; 1130 u8 needs_warm_reset:1;
1101 u8 msi_received:1; 1131 u8 msi_received:1;
1132 u8 sis64:1;
1102 1133
1103 u8 revid; 1134 u8 revid;
1104 1135
@@ -1202,13 +1233,17 @@ struct ipr_ioa_cfg {
1202 char ipr_cmd_label[8]; 1233 char ipr_cmd_label[8];
1203#define IPR_CMD_LABEL "ipr_cmd" 1234#define IPR_CMD_LABEL "ipr_cmd"
1204 struct ipr_cmnd *ipr_cmnd_list[IPR_NUM_CMD_BLKS]; 1235 struct ipr_cmnd *ipr_cmnd_list[IPR_NUM_CMD_BLKS];
1205 u32 ipr_cmnd_list_dma[IPR_NUM_CMD_BLKS]; 1236 dma_addr_t ipr_cmnd_list_dma[IPR_NUM_CMD_BLKS];
1206}; 1237};
1207 1238
1208struct ipr_cmnd { 1239struct ipr_cmnd {
1209 struct ipr_ioarcb ioarcb; 1240 struct ipr_ioarcb ioarcb;
1241 union {
1242 struct ipr_ioadl_desc ioadl[IPR_NUM_IOADL_ENTRIES];
1243 struct ipr_ioadl64_desc ioadl64[IPR_NUM_IOADL_ENTRIES];
1244 struct ipr_ata64_ioadl ata_ioadl;
1245 } i;
1210 struct ipr_ioasa ioasa; 1246 struct ipr_ioasa ioasa;
1211 struct ipr_ioadl_desc ioadl[IPR_NUM_IOADL_ENTRIES];
1212 struct list_head queue; 1247 struct list_head queue;
1213 struct scsi_cmnd *scsi_cmd; 1248 struct scsi_cmnd *scsi_cmd;
1214 struct ata_queued_cmd *qc; 1249 struct ata_queued_cmd *qc;
@@ -1221,7 +1256,7 @@ struct ipr_cmnd {
1221 u8 sense_buffer[SCSI_SENSE_BUFFERSIZE]; 1256 u8 sense_buffer[SCSI_SENSE_BUFFERSIZE];
1222 dma_addr_t sense_buffer_dma; 1257 dma_addr_t sense_buffer_dma;
1223 unsigned short dma_use_sg; 1258 unsigned short dma_use_sg;
1224 dma_addr_t dma_handle; 1259 dma_addr_t dma_addr;
1225 struct ipr_cmnd *sibling; 1260 struct ipr_cmnd *sibling;
1226 union { 1261 union {
1227 enum ipr_shutdown_type shutdown_type; 1262 enum ipr_shutdown_type shutdown_type;