Commit b3a52e79 authored by Stephen M. Cameron's avatar Stephen M. Cameron Committed by Christoph Hellwig

hpsa: avoid unnecessary readl on every command submission

for controllers which support either of the ioaccel transport methods.
Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
Reviewed-by: default avatarMike Miller <michael.miller@canonical.com>
Reviewed-by: default avatarJoe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 094963da
...@@ -7330,6 +7330,13 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support) ...@@ -7330,6 +7330,13 @@ static void hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
* 10 = 6 s/g entry or 24k * 10 = 6 s/g entry or 24k
*/ */
/* If the controller supports either ioaccel method then
* we can also use the RAID stack submit path that does not
* perform the superfluous readl() after each command submission.
*/
if (trans_support & (CFGTBL_Trans_io_accel1 | CFGTBL_Trans_io_accel2))
access = SA5_performant_access_no_read;
/* Controller spec: zero out this buffer. */ /* Controller spec: zero out this buffer. */
for (i = 0; i < h->nreply_queues; i++) for (i = 0; i < h->nreply_queues; i++)
memset(h->reply_queue[i].head, 0, h->reply_queue_size); memset(h->reply_queue[i].head, 0, h->reply_queue_size);
......
...@@ -346,6 +346,12 @@ static void SA5_submit_command(struct ctlr_info *h, ...@@ -346,6 +346,12 @@ static void SA5_submit_command(struct ctlr_info *h,
(void) readl(h->vaddr + SA5_SCRATCHPAD_OFFSET); (void) readl(h->vaddr + SA5_SCRATCHPAD_OFFSET);
} }
static void SA5_submit_command_no_read(struct ctlr_info *h,
struct CommandList *c)
{
writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET);
}
static void SA5_submit_command_ioaccel2(struct ctlr_info *h, static void SA5_submit_command_ioaccel2(struct ctlr_info *h,
struct CommandList *c) struct CommandList *c)
{ {
...@@ -353,7 +359,6 @@ static void SA5_submit_command_ioaccel2(struct ctlr_info *h, ...@@ -353,7 +359,6 @@ static void SA5_submit_command_ioaccel2(struct ctlr_info *h,
writel(c->busaddr, h->vaddr + IOACCEL2_INBOUND_POSTQ_32); writel(c->busaddr, h->vaddr + IOACCEL2_INBOUND_POSTQ_32);
else else
writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET); writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET);
(void) readl(h->vaddr + SA5_SCRATCHPAD_OFFSET);
} }
/* /*
...@@ -564,6 +569,14 @@ static struct access_method SA5_performant_access = { ...@@ -564,6 +569,14 @@ static struct access_method SA5_performant_access = {
SA5_performant_completed, SA5_performant_completed,
}; };
static struct access_method SA5_performant_access_no_read = {
SA5_submit_command_no_read,
SA5_performant_intr_mask,
SA5_fifo_full,
SA5_performant_intr_pending,
SA5_performant_completed,
};
struct board_type { struct board_type {
u32 board_id; u32 board_id;
char *product_name; char *product_name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment