aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/rsxx/rsxx_priv.h
diff options
context:
space:
mode:
authorPhilip J Kelleher <pjk1939@linux.vnet.ibm.com>2013-03-16 03:22:25 -0400
committerJens Axboe <axboe@kernel.dk>2013-03-16 03:22:25 -0400
commitc95246c3a2ac796cfa43e76200ede59cb4a1644f (patch)
tree18a4a1a6b3ee78c5f8d646831edaecba1f0012ad /drivers/block/rsxx/rsxx_priv.h
parent1ebfd109822ea35b71aee4efe9ddc2e1b9ac0ed7 (diff)
Adding in EEH support to the IBM FlashSystem 70/80 device driver
Changes in v2 include: o Fixed spelling of guarantee. o Fixed potential memory leak if slot reset fails out. o Changed list_for_each_entry_safe with list_for_each_entry. Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rsxx/rsxx_priv.h')
-rw-r--r--drivers/block/rsxx/rsxx_priv.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/block/rsxx/rsxx_priv.h b/drivers/block/rsxx/rsxx_priv.h
index f5a95f75bd57..8a7ac87f1dc5 100644
--- a/drivers/block/rsxx/rsxx_priv.h
+++ b/drivers/block/rsxx/rsxx_priv.h
@@ -64,6 +64,9 @@ struct proc_cmd;
64#define RSXX_MAX_OUTSTANDING_CMDS 255 64#define RSXX_MAX_OUTSTANDING_CMDS 255
65#define RSXX_CS_IDX_MASK 0xff 65#define RSXX_CS_IDX_MASK 0xff
66 66
67#define STATUS_BUFFER_SIZE8 4096
68#define COMMAND_BUFFER_SIZE8 4096
69
67#define RSXX_MAX_TARGETS 8 70#define RSXX_MAX_TARGETS 8
68 71
69struct dma_tracker_list; 72struct dma_tracker_list;
@@ -88,6 +91,9 @@ struct rsxx_dma_stats {
88 u32 discards_failed; 91 u32 discards_failed;
89 u32 done_rescheduled; 92 u32 done_rescheduled;
90 u32 issue_rescheduled; 93 u32 issue_rescheduled;
94 u32 dma_sw_err;
95 u32 dma_hw_fault;
96 u32 dma_cancelled;
91 u32 sw_q_depth; /* Number of DMAs on the SW queue. */ 97 u32 sw_q_depth; /* Number of DMAs on the SW queue. */
92 atomic_t hw_q_depth; /* Number of DMAs queued to HW. */ 98 atomic_t hw_q_depth; /* Number of DMAs queued to HW. */
93}; 99};
@@ -113,6 +119,7 @@ struct rsxx_dma_ctrl {
113struct rsxx_cardinfo { 119struct rsxx_cardinfo {
114 struct pci_dev *dev; 120 struct pci_dev *dev;
115 unsigned int halt; 121 unsigned int halt;
122 unsigned int eeh_state;
116 123
117 void __iomem *regmap; 124 void __iomem *regmap;
118 spinlock_t irq_lock; 125 spinlock_t irq_lock;
@@ -221,6 +228,7 @@ enum rsxx_pci_regmap {
221 PERF_RD512_HI = 0xac, 228 PERF_RD512_HI = 0xac,
222 PERF_WR512_LO = 0xb0, 229 PERF_WR512_LO = 0xb0,
223 PERF_WR512_HI = 0xb4, 230 PERF_WR512_HI = 0xb4,
231 PCI_RECONFIG = 0xb8,
224}; 232};
225 233
226enum rsxx_intr { 234enum rsxx_intr {
@@ -234,6 +242,8 @@ enum rsxx_intr {
234 CR_INTR_DMA5 = 0x00000080, 242 CR_INTR_DMA5 = 0x00000080,
235 CR_INTR_DMA6 = 0x00000100, 243 CR_INTR_DMA6 = 0x00000100,
236 CR_INTR_DMA7 = 0x00000200, 244 CR_INTR_DMA7 = 0x00000200,
245 CR_INTR_ALL_C = 0x0000003f,
246 CR_INTR_ALL_G = 0x000003ff,
237 CR_INTR_DMA_ALL = 0x000003f5, 247 CR_INTR_DMA_ALL = 0x000003f5,
238 CR_INTR_ALL = 0xffffffff, 248 CR_INTR_ALL = 0xffffffff,
239}; 249};
@@ -250,8 +260,14 @@ enum rsxx_pci_reset {
250 DMA_QUEUE_RESET = 0x00000001, 260 DMA_QUEUE_RESET = 0x00000001,
251}; 261};
252 262
263enum rsxx_hw_fifo_flush {
264 RSXX_FLUSH_BUSY = 0x00000002,
265 RSXX_FLUSH_TIMEOUT = 0x00000004,
266};
267
253enum rsxx_pci_revision { 268enum rsxx_pci_revision {
254 RSXX_DISCARD_SUPPORT = 2, 269 RSXX_DISCARD_SUPPORT = 2,
270 RSXX_EEH_SUPPORT = 3,
255}; 271};
256 272
257enum rsxx_creg_cmd { 273enum rsxx_creg_cmd {
@@ -357,11 +373,17 @@ int rsxx_dma_setup(struct rsxx_cardinfo *card);
357void rsxx_dma_destroy(struct rsxx_cardinfo *card); 373void rsxx_dma_destroy(struct rsxx_cardinfo *card);
358int rsxx_dma_init(void); 374int rsxx_dma_init(void);
359void rsxx_dma_cleanup(void); 375void rsxx_dma_cleanup(void);
376void rsxx_dma_queue_reset(struct rsxx_cardinfo *card);
377int rsxx_dma_configure(struct rsxx_cardinfo *card);
360int rsxx_dma_queue_bio(struct rsxx_cardinfo *card, 378int rsxx_dma_queue_bio(struct rsxx_cardinfo *card,
361 struct bio *bio, 379 struct bio *bio,
362 atomic_t *n_dmas, 380 atomic_t *n_dmas,
363 rsxx_dma_cb cb, 381 rsxx_dma_cb cb,
364 void *cb_data); 382 void *cb_data);
383int rsxx_hw_buffers_init(struct pci_dev *dev, struct rsxx_dma_ctrl *ctrl);
384void rsxx_eeh_save_issued_dmas(struct rsxx_cardinfo *card);
385void rsxx_eeh_cancel_dmas(struct rsxx_cardinfo *card);
386int rsxx_eeh_remap_dmas(struct rsxx_cardinfo *card);
365 387
366/***** cregs.c *****/ 388/***** cregs.c *****/
367int rsxx_creg_write(struct rsxx_cardinfo *card, u32 addr, 389int rsxx_creg_write(struct rsxx_cardinfo *card, u32 addr,
@@ -386,10 +408,11 @@ int rsxx_creg_setup(struct rsxx_cardinfo *card);
386void rsxx_creg_destroy(struct rsxx_cardinfo *card); 408void rsxx_creg_destroy(struct rsxx_cardinfo *card);
387int rsxx_creg_init(void); 409int rsxx_creg_init(void);
388void rsxx_creg_cleanup(void); 410void rsxx_creg_cleanup(void);
389
390int rsxx_reg_access(struct rsxx_cardinfo *card, 411int rsxx_reg_access(struct rsxx_cardinfo *card,
391 struct rsxx_reg_access __user *ucmd, 412 struct rsxx_reg_access __user *ucmd,
392 int read); 413 int read);
414void rsxx_eeh_save_issued_creg(struct rsxx_cardinfo *card);
415void rsxx_kick_creg_queue(struct rsxx_cardinfo *card);
393 416
394 417
395 418