aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pmcraid.h
diff options
context:
space:
mode:
authorAnil Ravindranath <anil_ravindranath@pmc-sierra.com>2010-10-13 17:11:02 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-29 13:03:01 -0400
commit592488a32b87daf27b92d2c1c5cdc440d1a1beae (patch)
treea556d44e55c800936b5750f4ee97164221e05feb /drivers/scsi/pmcraid.h
parentdf30e5059681ed0671c9cc6ff702fe9ca7f20042 (diff)
[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 @@
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 "2.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 */
@@ -561,6 +562,17 @@ struct pmcraid_inquiry_data {
561 __u8 reserved3[16]; 562 __u8 reserved3[16];
562}; 563};
563 564
565#define PMCRAID_TIMESTAMP_LEN 12
566#define PMCRAID_REQ_TM_STR_LEN 6
567#define PMCRAID_SCSI_SET_TIMESTAMP 0xA4
568#define PMCRAID_SCSI_SERVICE_ACTION 0x0F
569
570struct pmcraid_timestamp_data {
571 __u8 reserved1[4];
572 __u8 timestamp[PMCRAID_REQ_TM_STR_LEN]; /* current time value */
573 __u8 reserved2[2];
574};
575
564/* pmcraid_cmd - LLD representation of SCSI command */ 576/* pmcraid_cmd - LLD representation of SCSI command */
565struct pmcraid_cmd { 577struct pmcraid_cmd {
566 578
@@ -704,6 +716,9 @@ struct pmcraid_instance {
704 struct pmcraid_inquiry_data *inq_data; 716 struct pmcraid_inquiry_data *inq_data;
705 dma_addr_t inq_data_baddr; 717 dma_addr_t inq_data_baddr;
706 718
719 struct pmcraid_timestamp_data *timestamp_data;
720 dma_addr_t timestamp_data_baddr;
721
707 /* size of configuration table entry, varies based on the firmware */ 722 /* size of configuration table entry, varies based on the firmware */
708 u32 config_table_entry_size; 723 u32 config_table_entry_size;
709 724
@@ -790,6 +805,7 @@ struct pmcraid_instance {
790#define SHUTDOWN_NONE 0x0 805#define SHUTDOWN_NONE 0x0
791#define SHUTDOWN_NORMAL 0x1 806#define SHUTDOWN_NORMAL 0x1
792#define SHUTDOWN_ABBREV 0x2 807#define SHUTDOWN_ABBREV 0x2
808 u32 timestamp_error:1; /* indicate set timestamp for out of sync */
793 809
794}; 810};
795 811
@@ -1055,10 +1071,10 @@ struct pmcraid_passthrough_ioctl_buffer {
1055#define PMCRAID_PASSTHROUGH_IOCTL 'F' 1071#define PMCRAID_PASSTHROUGH_IOCTL 'F'
1056 1072
1057#define DRV_IOCTL(n, size) \ 1073#define DRV_IOCTL(n, size) \
1058 _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_DRIVER_IOCTL, (n), (size)) 1074 _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_DRIVER_IOCTL, (n), (size))
1059 1075
1060#define FMW_IOCTL(n, size) \ 1076#define FMW_IOCTL(n, size) \
1061 _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_PASSTHROUGH_IOCTL, (n), (size)) 1077 _IOC(_IOC_READ|_IOC_WRITE, PMCRAID_PASSTHROUGH_IOCTL, (n), (size))
1062 1078
1063/* 1079/*
1064 * _ARGSIZE: macro that gives size of the argument type passed to an IOCTL cmd. 1080 * _ARGSIZE: macro that gives size of the argument type passed to an IOCTL cmd.