]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
scsi: aacraid: Reworked scsi command submission path
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Thu, 2 Feb 2017 23:53:20 +0000 (15:53 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 1 Mar 2017 13:14:59 +0000 (07:14 -0600)
commitc0177e5e2fe123f9f43fcb5dad9b7ed7150b9738
tree9db8958f68e58597aa80fad63e17af23b10298ed
parentb8f1dc5515b180eab7c75ce0e8285e29eea1a59e
scsi: aacraid: Reworked scsi command submission path

BugLink: http://bugs.launchpad.net/bugs/1668726
Moved the READ and WRITE switch cases to the top. Added a  default
case to the switch case and replaced duplicate scsi result value with a
macro.

The idea is that since most of scsi commands we care about performance
wise are read or write, we need to process them first.

Internally the compiler (GCC) converts a switch case into either a jump
table or a bunch of if else conditions, so placing the often used read,
write cases at the top is an effort in optimization.

Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Dave Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from linux-next commit c4e2fbca374b9797276061840dc95708adf512ed)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/aacraid/aachba.c