aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.h
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2014-02-18 14:55:33 -0500
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 13:19:03 -0400
commit283b4a9b98b192ebc0e15351fd6fb60e1be78c5d (patch)
tree82ec3ca33ea7352e347dcb3b152b6ab95a1c107f /drivers/scsi/hpsa.h
parent17eb87d216a0d8a9fa9852f331a7c6afb9f45312 (diff)
[SCSI] hpsa: add ioaccell mode 1 RAID offload support.
This enables sending i/o's destined for RAID logical drives which can be serviced by a single physical disk down a different, faster i/o path directly to physical drives for certain logical volumes on SSDs bypassing the Smart Array RAID stack for a performance improvement. Signed-off-by: Matt Gates <matthew.gates@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Scott Teel <scott.teel@hp.com> Signed-off-by: Mike Miller <michael.miller@canonical.com> Signed-off-by: Don Brace <brace@beardog.cce.hp.com> Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/hpsa.h')
-rw-r--r--drivers/scsi/hpsa.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
index c7865f30ffd1..ae08f1c46272 100644
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -47,6 +47,13 @@ struct hpsa_scsi_dev_t {
47 unsigned char model[16]; /* bytes 16-31 of inquiry data */ 47 unsigned char model[16]; /* bytes 16-31 of inquiry data */
48 unsigned char raid_level; /* from inquiry page 0xC1 */ 48 unsigned char raid_level; /* from inquiry page 0xC1 */
49 u32 ioaccel_handle; 49 u32 ioaccel_handle;
50 int offload_config; /* I/O accel RAID offload configured */
51 int offload_enabled; /* I/O accel RAID offload enabled */
52 int offload_to_mirror; /* Send next I/O accelerator RAID
53 * offload request to mirror drive
54 */
55 struct raid_map_data raid_map; /* I/O accelerator RAID map */
56
50}; 57};
51 58
52struct reply_pool { 59struct reply_pool {
@@ -133,6 +140,10 @@ struct ctlr_info {
133 u32 *blockFetchTable; 140 u32 *blockFetchTable;
134 u32 *ioaccel1_blockFetchTable; 141 u32 *ioaccel1_blockFetchTable;
135 unsigned char *hba_inquiry_data; 142 unsigned char *hba_inquiry_data;
143 u32 driver_support;
144 u32 fw_support;
145 int ioaccel_support;
146 int ioaccel_maxsg;
136 u64 last_intr_timestamp; 147 u64 last_intr_timestamp;
137 u32 last_heartbeat; 148 u32 last_heartbeat;
138 u64 last_heartbeat_timestamp; 149 u64 last_heartbeat_timestamp;
@@ -406,8 +417,7 @@ static bool SA5_ioaccel_mode1_intr_pending(struct ctlr_info *h)
406#define IOACCEL_MODE1_CONSUMER_INDEX 0x1BC 417#define IOACCEL_MODE1_CONSUMER_INDEX 0x1BC
407#define IOACCEL_MODE1_REPLY_UNUSED 0xFFFFFFFFFFFFFFFFULL 418#define IOACCEL_MODE1_REPLY_UNUSED 0xFFFFFFFFFFFFFFFFULL
408 419
409static unsigned long SA5_ioaccel_mode1_completed(struct ctlr_info *h, 420static unsigned long SA5_ioaccel_mode1_completed(struct ctlr_info *h, u8 q)
410 u8 q)
411{ 421{
412 u64 register_value; 422 u64 register_value;
413 struct reply_pool *rq = &h->reply_queue[q]; 423 struct reply_pool *rq = &h->reply_queue[q];
@@ -420,12 +430,18 @@ static unsigned long SA5_ioaccel_mode1_completed(struct ctlr_info *h,
420 rq->head[rq->current_entry] = IOACCEL_MODE1_REPLY_UNUSED; 430 rq->head[rq->current_entry] = IOACCEL_MODE1_REPLY_UNUSED;
421 if (++rq->current_entry == rq->size) 431 if (++rq->current_entry == rq->size)
422 rq->current_entry = 0; 432 rq->current_entry = 0;
433 /*
434 * @todo
435 *
436 * Don't really need to write the new index after each command,
437 * but with current driver design this is easiest.
438 */
439 wmb();
440 writel((q << 24) | rq->current_entry, h->vaddr +
441 IOACCEL_MODE1_CONSUMER_INDEX);
423 spin_lock_irqsave(&h->lock, flags); 442 spin_lock_irqsave(&h->lock, flags);
424 h->commands_outstanding--; 443 h->commands_outstanding--;
425 spin_unlock_irqrestore(&h->lock, flags); 444 spin_unlock_irqrestore(&h->lock, flags);
426 } else {
427 writel((q << 24) | rq->current_entry,
428 h->vaddr + IOACCEL_MODE1_CONSUMER_INDEX);
429 } 445 }
430 return (unsigned long) register_value; 446 return (unsigned long) register_value;
431} 447}