diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2014-05-29 11:53:23 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-06-02 03:54:56 -0400 |
commit | b3a52e791efd341a9a4e9065c667041c822661f0 (patch) | |
tree | 313ac93ea68a60bf61bfb83c921599ac52a1ea3c | |
parent | 094963dad88c86f8f480c78992df03d916774c18 (diff) |
hpsa: avoid unnecessary readl on every command submission
for controllers which support either of the ioaccel transport methods.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reviewed-by: Mike Miller <michael.miller@canonical.com>
Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/scsi/hpsa.c | 7 | ||||
-rw-r--r-- | drivers/scsi/hpsa.h | 15 |
2 files changed, 21 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 3b70e66838ad..3e501df02e35 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -7330,6 +7330,13 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support) | |||
7330 | * 10 = 6 s/g entry or 24k | 7330 | * 10 = 6 s/g entry or 24k |
7331 | */ | 7331 | */ |
7332 | 7332 | ||
7333 | /* If the controller supports either ioaccel method then | ||
7334 | * we can also use the RAID stack submit path that does not | ||
7335 | * perform the superfluous readl() after each command submission. | ||
7336 | */ | ||
7337 | if (trans_support & (CFGTBL_Trans_io_accel1 | CFGTBL_Trans_io_accel2)) | ||
7338 | access = SA5_performant_access_no_read; | ||
7339 | |||
7333 | /* Controller spec: zero out this buffer. */ | 7340 | /* Controller spec: zero out this buffer. */ |
7334 | for (i = 0; i < h->nreply_queues; i++) | 7341 | for (i = 0; i < h->nreply_queues; i++) |
7335 | memset(h->reply_queue[i].head, 0, h->reply_queue_size); | 7342 | memset(h->reply_queue[i].head, 0, h->reply_queue_size); |
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h index 6da9a9f4b749..0a5d91c4ded8 100644 --- a/drivers/scsi/hpsa.h +++ b/drivers/scsi/hpsa.h | |||
@@ -346,6 +346,12 @@ static void SA5_submit_command(struct ctlr_info *h, | |||
346 | (void) readl(h->vaddr + SA5_SCRATCHPAD_OFFSET); | 346 | (void) readl(h->vaddr + SA5_SCRATCHPAD_OFFSET); |
347 | } | 347 | } |
348 | 348 | ||
349 | static void SA5_submit_command_no_read(struct ctlr_info *h, | ||
350 | struct CommandList *c) | ||
351 | { | ||
352 | writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET); | ||
353 | } | ||
354 | |||
349 | static void SA5_submit_command_ioaccel2(struct ctlr_info *h, | 355 | static void SA5_submit_command_ioaccel2(struct ctlr_info *h, |
350 | struct CommandList *c) | 356 | struct CommandList *c) |
351 | { | 357 | { |
@@ -353,7 +359,6 @@ static void SA5_submit_command_ioaccel2(struct ctlr_info *h, | |||
353 | writel(c->busaddr, h->vaddr + IOACCEL2_INBOUND_POSTQ_32); | 359 | writel(c->busaddr, h->vaddr + IOACCEL2_INBOUND_POSTQ_32); |
354 | else | 360 | else |
355 | writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET); | 361 | writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET); |
356 | (void) readl(h->vaddr + SA5_SCRATCHPAD_OFFSET); | ||
357 | } | 362 | } |
358 | 363 | ||
359 | /* | 364 | /* |
@@ -564,6 +569,14 @@ static struct access_method SA5_performant_access = { | |||
564 | SA5_performant_completed, | 569 | SA5_performant_completed, |
565 | }; | 570 | }; |
566 | 571 | ||
572 | static struct access_method SA5_performant_access_no_read = { | ||
573 | SA5_submit_command_no_read, | ||
574 | SA5_performant_intr_mask, | ||
575 | SA5_fifo_full, | ||
576 | SA5_performant_intr_pending, | ||
577 | SA5_performant_completed, | ||
578 | }; | ||
579 | |||
567 | struct board_type { | 580 | struct board_type { |
568 | u32 board_id; | 581 | u32 board_id; |
569 | char *product_name; | 582 | char *product_name; |