提交 c05e8866 编写于 作者: S Stephen Cameron 提交者: James Bottomley

hpsa: do not use function pointers in fast path command submission

Performance tweak, avoid unnecessary function calls.
Reviewed-by: NScott Teel <scott.teel@pmcs.com>
Signed-off-by: NDon Brace <don.brace@pmcs.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 f42e81e1
...@@ -821,19 +821,21 @@ static void dial_up_lockup_detection_on_fw_flash_complete(struct ctlr_info *h, ...@@ -821,19 +821,21 @@ static void dial_up_lockup_detection_on_fw_flash_complete(struct ctlr_info *h,
static void enqueue_cmd_and_start_io(struct ctlr_info *h, static void enqueue_cmd_and_start_io(struct ctlr_info *h,
struct CommandList *c) struct CommandList *c)
{ {
dial_down_lockup_detection_during_fw_flash(h, c);
atomic_inc(&h->commands_outstanding);
switch (c->cmd_type) { switch (c->cmd_type) {
case CMD_IOACCEL1: case CMD_IOACCEL1:
set_ioaccel1_performant_mode(h, c); set_ioaccel1_performant_mode(h, c);
writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET);
break; break;
case CMD_IOACCEL2: case CMD_IOACCEL2:
set_ioaccel2_performant_mode(h, c); set_ioaccel2_performant_mode(h, c);
writel(c->busaddr, h->vaddr + IOACCEL2_INBOUND_POSTQ_32);
break; break;
default: default:
set_performant_mode(h, c); set_performant_mode(h, c);
}
dial_down_lockup_detection_during_fw_flash(h, c);
atomic_inc(&h->commands_outstanding);
h->access.submit_command(h, c); h->access.submit_command(h, c);
}
} }
static inline int is_hba_lunid(unsigned char scsi3addr[]) static inline int is_hba_lunid(unsigned char scsi3addr[])
......
...@@ -367,9 +367,6 @@ static void SA5_submit_command_no_read(struct ctlr_info *h, ...@@ -367,9 +367,6 @@ static void SA5_submit_command_no_read(struct ctlr_info *h,
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)
{ {
if (c->cmd_type == CMD_IOACCEL2)
writel(c->busaddr, h->vaddr + IOACCEL2_INBOUND_POSTQ_32);
else
writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET); writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册