aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/mtip32xx/mtip32xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/mtip32xx/mtip32xx.h')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.h58
1 files changed, 45 insertions, 13 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.h b/drivers/block/mtip32xx/mtip32xx.h
index e0554a8f2233..4ef58336310a 100644
--- a/drivers/block/mtip32xx/mtip32xx.h
+++ b/drivers/block/mtip32xx/mtip32xx.h
@@ -34,8 +34,8 @@
34/* offset of Device Control register in PCIe extended capabilites space */ 34/* offset of Device Control register in PCIe extended capabilites space */
35#define PCIE_CONFIG_EXT_DEVICE_CONTROL_OFFSET 0x48 35#define PCIE_CONFIG_EXT_DEVICE_CONTROL_OFFSET 0x48
36 36
37/* # of times to retry timed out IOs */ 37/* # of times to retry timed out/failed IOs */
38#define MTIP_MAX_RETRIES 5 38#define MTIP_MAX_RETRIES 2
39 39
40/* Various timeout values in ms */ 40/* Various timeout values in ms */
41#define MTIP_NCQ_COMMAND_TIMEOUT_MS 5000 41#define MTIP_NCQ_COMMAND_TIMEOUT_MS 5000
@@ -114,12 +114,41 @@
114#define __force_bit2int (unsigned int __force) 114#define __force_bit2int (unsigned int __force)
115 115
116/* below are bit numbers in 'flags' defined in mtip_port */ 116/* below are bit numbers in 'flags' defined in mtip_port */
117#define MTIP_FLAG_IC_ACTIVE_BIT 0 117#define MTIP_PF_IC_ACTIVE_BIT 0 /* pio/ioctl */
118#define MTIP_FLAG_EH_ACTIVE_BIT 1 118#define MTIP_PF_EH_ACTIVE_BIT 1 /* error handling */
119#define MTIP_FLAG_SVC_THD_ACTIVE_BIT 2 119#define MTIP_PF_SE_ACTIVE_BIT 2 /* secure erase */
120#define MTIP_FLAG_ISSUE_CMDS_BIT 4 120#define MTIP_PF_DM_ACTIVE_BIT 3 /* download microcde */
121#define MTIP_FLAG_REBUILD_BIT 5 121#define MTIP_PF_PAUSE_IO ((1 << MTIP_PF_IC_ACTIVE_BIT) | \
122#define MTIP_FLAG_SVC_THD_SHOULD_STOP_BIT 8 122 (1 << MTIP_PF_EH_ACTIVE_BIT) | \
123 (1 << MTIP_PF_SE_ACTIVE_BIT) | \
124 (1 << MTIP_PF_DM_ACTIVE_BIT))
125
126#define MTIP_PF_SVC_THD_ACTIVE_BIT 4
127#define MTIP_PF_ISSUE_CMDS_BIT 5
128#define MTIP_PF_REBUILD_BIT 6
129#define MTIP_PF_SVC_THD_STOP_BIT 8
130
131/* below are bit numbers in 'dd_flag' defined in driver_data */
132#define MTIP_DDF_REMOVE_PENDING_BIT 1
133#define MTIP_DDF_OVER_TEMP_BIT 2
134#define MTIP_DDF_WRITE_PROTECT_BIT 3
135#define MTIP_DDF_STOP_IO ((1 << MTIP_DDF_REMOVE_PENDING_BIT) | \
136 (1 << MTIP_DDF_OVER_TEMP_BIT) | \
137 (1 << MTIP_DDF_WRITE_PROTECT_BIT))
138
139#define MTIP_DDF_CLEANUP_BIT 5
140#define MTIP_DDF_RESUME_BIT 6
141#define MTIP_DDF_INIT_DONE_BIT 7
142#define MTIP_DDF_REBUILD_FAILED_BIT 8
143
144__packed struct smart_attr{
145 u8 attr_id;
146 u16 flags;
147 u8 cur;
148 u8 worst;
149 u32 data;
150 u8 res[3];
151};
123 152
124/* Register Frame Information Structure (FIS), host to device. */ 153/* Register Frame Information Structure (FIS), host to device. */
125struct host_to_dev_fis { 154struct host_to_dev_fis {
@@ -345,6 +374,12 @@ struct mtip_port {
345 * when the command slot and all associated data structures 374 * when the command slot and all associated data structures
346 * are no longer needed. 375 * are no longer needed.
347 */ 376 */
377 u16 *log_buf;
378 dma_addr_t log_buf_dma;
379
380 u8 *smart_buf;
381 dma_addr_t smart_buf_dma;
382
348 unsigned long allocated[SLOTBITS_IN_LONGS]; 383 unsigned long allocated[SLOTBITS_IN_LONGS];
349 /* 384 /*
350 * used to queue commands when an internal command is in progress 385 * used to queue commands when an internal command is in progress
@@ -368,6 +403,7 @@ struct mtip_port {
368 * Timer used to complete commands that have been active for too long. 403 * Timer used to complete commands that have been active for too long.
369 */ 404 */
370 struct timer_list cmd_timer; 405 struct timer_list cmd_timer;
406 unsigned long ic_pause_timer;
371 /* 407 /*
372 * Semaphore used to block threads if there are no 408 * Semaphore used to block threads if there are no
373 * command slots available. 409 * command slots available.
@@ -404,13 +440,9 @@ struct driver_data {
404 440
405 unsigned slot_groups; /* number of slot groups the product supports */ 441 unsigned slot_groups; /* number of slot groups the product supports */
406 442
407 atomic_t drv_cleanup_done; /* Atomic variable for SRSI */
408
409 unsigned long index; /* Index to determine the disk name */ 443 unsigned long index; /* Index to determine the disk name */
410 444
411 unsigned int ftlrebuildflag; /* FTL rebuild flag */ 445 unsigned long dd_flag; /* NOTE: use atomic bit operations on this */
412
413 atomic_t resumeflag; /* Atomic variable to track suspend/resume */
414 446
415 struct task_struct *mtip_svc_handler; /* task_struct of svc thd */ 447 struct task_struct *mtip_svc_handler; /* task_struct of svc thd */
416}; 448};