]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: enhance LE data structure copies to hardware
authorJames Smart <jsmart2021@gmail.com>
Sat, 5 May 2018 03:37:51 +0000 (20:37 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 May 2018 05:03:15 +0000 (01:03 -0400)
commitbfcd3d440ff7cdbac7f852faa47a187358fcb30e
tree2d7616cbc2ebffa67f4d40992933f79582aa624d
parent993bc1cc323a9571453b3d6e6fd2ed0cefcaaaf3
scsi: lpfc: enhance LE data structure copies to hardware

The driver builds the control structures in host memory using
definitions that are based on 32-bit words. After building the structure
it is then written to the adapter.

This patch slightly optimizes LE hosts by copying the structures via
64-bit copies.  This is doable as the adapter interface is LE thus there
is no byteswapping as the copy is performed.

The same optimization would be nice on BE systems, but when byteswapping
occurs, it swaps 32-bit words as well, thus trashing the control
structure. Given amount of code that is dependent upon the 32-bit word
definition, it was decided to not change things for the minor
optimization. Thus PPC 64-bit systems sticks with doing 32-bit copies.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c