summaryrefslogtreecommitdiff
path: root/drivers/scsi/pmcraid.h
diff options
context:
space:
mode:
authorAnil Ravindranath <anil_ravindranath@pmc-sierra.com>2010-10-13 14:11:02 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-10-29 12:03:01 -0500
commit592488a32b87daf27b92d2c1c5cdc440d1a1beae (patch)
treea556d44e55c800936b5750f4ee97164221e05feb /drivers/scsi/pmcraid.h
parentdf30e5059681ed0671c9cc6ff702fe9ca7f20042 (diff)
downloadlwn-592488a32b87daf27b92d2c1c5cdc440d1a1beae.tar.gz
lwn-592488a32b87daf27b92d2c1c5cdc440d1a1beae.zip
[SCSI] pmcraid: add support for set timestamp command and other fixes
The following are the fixes in this patch: 1. Added support of set timestamp command in the driver 2. Pass all status code to mgmt application. Earlier we were passing only failed ones. 3. Call class_destroy after unregister_chrdev and pci_unregister_driver Signed-off-by: Anil Ravindranath <anil_ravindranath@pmc-sierra.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/pmcraid.h')
-rw-r--r--drivers/scsi/pmcraid.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/scsi/pmcraid.h b/drivers/scsi/pmcraid.h
index dd78f9e8eb9b..1134279604e8 100644
--- a/drivers/scsi/pmcraid.h
+++ b/drivers/scsi/pmcraid.h
@@ -42,7 +42,7 @@
*/
#define PMCRAID_DRIVER_NAME "PMC MaxRAID"
#define PMCRAID_DEVFILE "pmcsas"
-#define PMCRAID_DRIVER_VERSION "2.0.2"
+#define PMCRAID_DRIVER_VERSION "2.0.3"
#define PMCRAID_DRIVER_DATE __DATE__
#define PMCRAID_FW_VERSION_1 0x002
@@ -184,6 +184,7 @@
#define PMCRAID_IOASC_IR_INVALID_RESOURCE_HANDLE 0x05250000
#define PMCRAID_IOASC_AC_TERMINATED_BY_HOST 0x0B5A0000
#define PMCRAID_IOASC_UA_BUS_WAS_RESET 0x06290000
+#define PMCRAID_IOASC_TIME_STAMP_OUT_OF_SYNC 0x06908B00
#define PMCRAID_IOASC_UA_BUS_WAS_RESET_BY_OTHER 0x06298000
/* Driver defined IOASCs */
@@ -561,6 +562,17 @@ struct pmcraid_inquiry_data {
__u8 reserved3[16];
};
+#define PMCRAID_TIMESTAMP_LEN 12
+#define PMCRAID_REQ_TM_STR_LEN 6
+#define PMCRAID_SCSI_SET_TIMESTAMP 0xA4
+#define PMCRAID_SCSI_SERVICE_ACTION 0x0F
+
+struct pmcraid_timestamp_data {
+ __u8 reserved1[4];
+ __u8 timestamp[PMCRAID_REQ_TM_STR_LEN]; /* current time value */
+ __u8 reserved2[2];
+};
+
/* pmcraid_cmd - LLD representation of SCSI command */
struct pmcraid_cmd {
@@ -704,6 +716,9 @@ struct pmcraid_instance {
struct pmcraid_inquiry_data *inq_data;
dma_addr_t inq_data_baddr;
+ struct pmcraid_timestamp_data *timestamp_data;
+ dma_addr_t timestamp_data_baddr;
+
/* size of configuration table entry, varies based on the firmware */
u32 config_table_entry_size;
@@ -790,6 +805,7 @@ struct pmcraid_instance {
#define SHUTDOWN_NONE 0x0
#define SHUTDOWN_NORMAL 0x1
#define SHUTDOWN_ABBREV 0x2
+ u32 timestamp_error:1; /* indicate set timestamp for out of sync */
};
@@ -1055,10 +1071,10 @@ struct pmcraid_passthrough_ioctl_buffer {
#define PMCRAID_PASSTHROUGH_IOCTL 'F'
#define DRV_IOCTL(n, size) \
- _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_DRIVER_IOCTL, (n), (size))
+ _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_DRIVER_IOCTL, (n), (size))
#define FMW_IOCTL(n, size) \
- _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_PASSTHROUGH_IOCTL, (n), (size))
+ _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_PASSTHROUGH_IOCTL, (n), (size))
/*
* _ARGSIZE: macro that gives size of the argument type passed to an IOCTL cmd.