]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aacraid/aacraid.h
[SCSI] aacraid: add parameter to control FUA and SYNCHRONIZE_CACHE policy
[linux-2.6-omap-h63xx.git] / drivers / scsi / aacraid / aacraid.h
index 8abe4f97b0afc075a8cad89750eb727cbb52e59c..7bb3d9fde713ae520368041ff032cab5effa5729 100644 (file)
@@ -12,7 +12,7 @@
  *----------------------------------------------------------------------------*/
 
 #ifndef AAC_DRIVER_BUILD
-# define AAC_DRIVER_BUILD 2447
+# define AAC_DRIVER_BUILD 2449
 # define AAC_DRIVER_BRANCH "-ms"
 #endif
 #define MAXIMUM_NUM_CONTAINERS 32
@@ -520,6 +520,12 @@ struct aac_driver_ident
  */
 #define AAC_QUIRK_17SG 0x0010
 
+/*
+ *     Some adapter firmware does not support 64 bit scsi passthrough
+ * commands.
+ */
+#define AAC_QUIRK_SCSI_32      0x0020
+
 /*
  *     The adapter interface specs all queues to be located in the same
  *     physically contigous block. The host structure that defines the
@@ -1010,6 +1016,7 @@ struct aac_dev
         * lets break them out so we don't have to do an AND to check them
         */
        u8                      nondasd_support; 
+       u8                      cache_protected;
        u8                      dac_support;
        u8                      raid_scsi_mode;
        u8                      comm_interface;
@@ -1526,7 +1533,7 @@ struct aac_mntent {
        __le32                  capacityhigh;
 };
 
-#define FSCS_NOTCLEAN  0x0001  /* fsck is neccessary before mounting */
+#define FSCS_NOTCLEAN  0x0001  /* fsck is necessary before mounting */
 #define FSCS_READONLY  0x0002  /* possible result of broken mirror */
 #define FSCS_HIDDEN    0x0004  /* should be ignored - set during a clear */
 
@@ -1567,6 +1574,20 @@ struct aac_get_name_resp {
        u8              data[16];
 };
 
+#define CT_CID_TO_32BITS_UID 165
+struct aac_get_serial {
+       __le32          command;        /* VM_ContainerConfig */
+       __le32          type;           /* CT_CID_TO_32BITS_UID */
+       __le32          cid;
+};
+
+struct aac_get_serial_resp {
+       __le32          dummy0;
+       __le32          dummy1;
+       __le32          status; /* CT_OK */
+       __le32          uid;
+};
+
 /*
  * The following command is sent to shut down each container.
  */
@@ -1750,6 +1771,7 @@ extern struct aac_common aac_config;
 #define                        AifEnConfigChange       3       /* Adapter configuration change */
 #define                        AifEnContainerChange    4       /* Container configuration change */
 #define                        AifEnDeviceFailure      5       /* SCSI device failed */
+#define                        AifEnBatteryEvent       14      /* Change in Battery State */
 #define                        AifEnAddContainer       15      /* A new array was created */
 #define                        AifEnDeleteContainer    16      /* A container was deleted */
 #define                        AifEnExpEvent           23      /* Firmware Event Log */
@@ -1793,10 +1815,10 @@ struct aac_aifcmd {
  *     accounting for the fact capacity could be a 64 bit value
  *
  */
-static inline u32 cap_to_cyls(sector_t capacity, u32 divisor)
+static inline unsigned int cap_to_cyls(sector_t capacity, unsigned divisor)
 {
        sector_div(capacity, divisor);
-       return (u32)capacity;
+       return capacity;
 }
 
 /* SCp.phase values */
@@ -1822,6 +1844,10 @@ int aac_get_config_status(struct aac_dev *dev, int commit_flag);
 int aac_get_containers(struct aac_dev *dev);
 int aac_scsi_cmd(struct scsi_cmnd *cmd);
 int aac_dev_ioctl(struct aac_dev *dev, int cmd, void __user *arg);
+#ifndef shost_to_class
+#define shost_to_class(shost) &shost->shost_classdev
+#endif
+ssize_t aac_show_serial_number(struct class_device *class_dev, char *buf);
 int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg);
 int aac_rx_init(struct aac_dev *dev);
 int aac_rkt_init(struct aac_dev *dev);
@@ -1853,4 +1879,4 @@ extern int aac_reset_devices;
 extern int aac_commit;
 extern int update_interval;
 extern int check_interval;
-extern int check_reset;
+extern int aac_check_reset;