]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
hpsa: do not use function pointers in fast path command submission
authorStephen Cameron <stephenmcameron@gmail.com>
Fri, 23 Jan 2015 22:44:40 +0000 (16:44 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 2 Feb 2015 17:57:43 +0000 (09:57 -0800)
Performance tweak, avoid unnecessary function calls.

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/hpsa.c
drivers/scsi/hpsa.h

index 18bcba99b28657d58e483605d78c40dd3f05c19a..a23277d24383ecaae453b194f6a065fbfb035cee 100644 (file)
@@ -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,
        struct CommandList *c)
 {
+       dial_down_lockup_detection_during_fw_flash(h, c);
+       atomic_inc(&h->commands_outstanding);
        switch (c->cmd_type) {
        case CMD_IOACCEL1:
                set_ioaccel1_performant_mode(h, c);
+               writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET);
                break;
        case CMD_IOACCEL2:
                set_ioaccel2_performant_mode(h, c);
+               writel(c->busaddr, h->vaddr + IOACCEL2_INBOUND_POSTQ_32);
                break;
        default:
                set_performant_mode(h, c);
+               h->access.submit_command(h, c);
        }
-       dial_down_lockup_detection_during_fw_flash(h, c);
-       atomic_inc(&h->commands_outstanding);
-       h->access.submit_command(h, c);
 }
 
 static inline int is_hba_lunid(unsigned char scsi3addr[])
index 239eceac8b60458e9ad2042a0b70ac940b88c684..62c50c32070ed543733ac78a1993264ec8a75b29 100644 (file)
@@ -367,10 +367,7 @@ static void SA5_submit_command_no_read(struct ctlr_info *h,
 static void SA5_submit_command_ioaccel2(struct ctlr_info *h,
        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);
 }
 
 /*