OSDN Git Service

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)
commit48f8fdb4b4269c0435238604d2ba3ca4f67f5620
tree2d7616cbc2ebffa67f4d40992933f79582aa624d
parentcd2400715c1250db78f5b54795edd1960815820a
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