aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pmcraid.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pmcraid.h')
-rw-r--r--drivers/scsi/pmcraid.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/scsi/pmcraid.h b/drivers/scsi/pmcraid.h
index 6cfa0145a1d7..4db210d93947 100644
--- a/drivers/scsi/pmcraid.h
+++ b/drivers/scsi/pmcraid.h
@@ -42,7 +42,7 @@
42 */ 42 */
43#define PMCRAID_DRIVER_NAME "PMC MaxRAID" 43#define PMCRAID_DRIVER_NAME "PMC MaxRAID"
44#define PMCRAID_DEVFILE "pmcsas" 44#define PMCRAID_DEVFILE "pmcsas"
45#define PMCRAID_DRIVER_VERSION "2.0.2" 45#define PMCRAID_DRIVER_VERSION "1.0.3"
46#define PMCRAID_DRIVER_DATE __DATE__ 46#define PMCRAID_DRIVER_DATE __DATE__
47 47
48#define PMCRAID_FW_VERSION_1 0x002 48#define PMCRAID_FW_VERSION_1 0x002
@@ -184,6 +184,7 @@
184#define PMCRAID_IOASC_IR_INVALID_RESOURCE_HANDLE 0x05250000 184#define PMCRAID_IOASC_IR_INVALID_RESOURCE_HANDLE 0x05250000
185#define PMCRAID_IOASC_AC_TERMINATED_BY_HOST 0x0B5A0000 185#define PMCRAID_IOASC_AC_TERMINATED_BY_HOST 0x0B5A0000
186#define PMCRAID_IOASC_UA_BUS_WAS_RESET 0x06290000 186#define PMCRAID_IOASC_UA_BUS_WAS_RESET 0x06290000
187#define PMCRAID_IOASC_TIME_STAMP_OUT_OF_SYNC 0x06908B00
187#define PMCRAID_IOASC_UA_BUS_WAS_RESET_BY_OTHER 0x06298000 188#define PMCRAID_IOASC_UA_BUS_WAS_RESET_BY_OTHER 0x06298000
188 189
189/* Driver defined IOASCs */ 190/* Driver defined IOASCs */
@@ -332,11 +333,9 @@ struct pmcraid_config_table_entry {
332 __u8 lun[PMCRAID_LUN_LEN]; 333 __u8 lun[PMCRAID_LUN_LEN];
333} __attribute__((packed, aligned(4))); 334} __attribute__((packed, aligned(4)));
334 335
335/* extended configuration table sizes are of 64 bytes in size */ 336/* extended configuration table sizes are also of 32 bytes in size */
336#define PMCRAID_CFGTE_EXT_SIZE 32
337struct pmcraid_config_table_entry_ext { 337struct pmcraid_config_table_entry_ext {
338 struct pmcraid_config_table_entry cfgte; 338 struct pmcraid_config_table_entry cfgte;
339 __u8 cfgte_ext[PMCRAID_CFGTE_EXT_SIZE];
340}; 339};
341 340
342/* resource types (config_table_entry.resource_type values) */ 341/* resource types (config_table_entry.resource_type values) */
@@ -561,6 +560,17 @@ struct pmcraid_inquiry_data {
561 __u8 reserved3[16]; 560 __u8 reserved3[16];
562}; 561};
563 562
563#define PMCRAID_TIMESTAMP_LEN 12
564#define PMCRAID_REQ_TM_STR_LEN 6
565#define PMCRAID_SCSI_SET_TIMESTAMP 0xA4
566#define PMCRAID_SCSI_SERVICE_ACTION 0x0F
567
568struct pmcraid_timestamp_data {
569 __u8 reserved1[4];
570 __u8 timestamp[PMCRAID_REQ_TM_STR_LEN]; /* current time value */
571 __u8 reserved2[2];
572};
573
564/* pmcraid_cmd - LLD representation of SCSI command */ 574/* pmcraid_cmd - LLD representation of SCSI command */
565struct pmcraid_cmd { 575struct pmcraid_cmd {
566 576
@@ -568,7 +578,6 @@ struct pmcraid_cmd {
568 struct pmcraid_control_block *ioa_cb; 578 struct pmcraid_control_block *ioa_cb;
569 dma_addr_t ioa_cb_bus_addr; 579 dma_addr_t ioa_cb_bus_addr;
570 dma_addr_t dma_handle; 580 dma_addr_t dma_handle;
571 u8 *sense_buffer;
572 581
573 /* pointer to mid layer structure of SCSI commands */ 582 /* pointer to mid layer structure of SCSI commands */
574 struct scsi_cmnd *scsi_cmd; 583 struct scsi_cmnd *scsi_cmd;
@@ -705,6 +714,9 @@ struct pmcraid_instance {
705 struct pmcraid_inquiry_data *inq_data; 714 struct pmcraid_inquiry_data *inq_data;
706 dma_addr_t inq_data_baddr; 715 dma_addr_t inq_data_baddr;
707 716
717 struct pmcraid_timestamp_data *timestamp_data;
718 dma_addr_t timestamp_data_baddr;
719
708 /* size of configuration table entry, varies based on the firmware */ 720 /* size of configuration table entry, varies based on the firmware */
709 u32 config_table_entry_size; 721 u32 config_table_entry_size;
710 722
@@ -791,6 +803,7 @@ struct pmcraid_instance {
791#define SHUTDOWN_NONE 0x0 803#define SHUTDOWN_NONE 0x0
792#define SHUTDOWN_NORMAL 0x1 804#define SHUTDOWN_NORMAL 0x1
793#define SHUTDOWN_ABBREV 0x2 805#define SHUTDOWN_ABBREV 0x2
806 u32 timestamp_error:1; /* indicate set timestamp for out of sync */
794 807
795}; 808};
796 809
@@ -1056,10 +1069,10 @@ struct pmcraid_passthrough_ioctl_buffer {
1056#define PMCRAID_PASSTHROUGH_IOCTL 'F' 1069#define PMCRAID_PASSTHROUGH_IOCTL 'F'
1057 1070
1058#define DRV_IOCTL(n, size) \ 1071#define DRV_IOCTL(n, size) \
1059 _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_DRIVER_IOCTL, (n), (size)) 1072 _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_DRIVER_IOCTL, (n), (size))
1060 1073
1061#define FMW_IOCTL(n, size) \ 1074#define FMW_IOCTL(n, size) \
1062 _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_PASSTHROUGH_IOCTL, (n), (size)) 1075 _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_PASSTHROUGH_IOCTL, (n), (size))
1063 1076
1064/* 1077/*
1065 * _ARGSIZE: macro that gives size of the argument type passed to an IOCTL cmd. 1078 * _ARGSIZE: macro that gives size of the argument type passed to an IOCTL cmd.