OSDN Git Service

scsi: lpfc: Add push-to-adapter support to sli4
authorJames Smart <jsmart2021@gmail.com>
Thu, 22 Feb 2018 16:18:43 +0000 (08:18 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 23 Feb 2018 01:39:29 +0000 (20:39 -0500)
commit1351e69fc6db30e186295f1c9495d03cef6a01a2
treeaedf6e9ba594a1643a7f32fdc21d3b530f13105e
parent27d6ac0a6e830043bd5db89fee8adddb41ada2f7
scsi: lpfc: Add push-to-adapter support to sli4

New if_type=6 adapters support an additional BAR that provides
apertures to allow direct WQE to adapter push support - termed
Direct Packet Push (DPP). WQ creation differs slightly to ask for
a WQ to be DPP-ized. When submitting a WQE to a DPP WQ, it is
submitted to the host memory for the WQ normally, but is also
written by the host cpu directly to a BAR aperture.  Write buffer
coalescing in hardware is (hopefully) turned on, enabling single
pci write operation support. The doorbell is thing rung to indicate
the WQE is available and was pushed to the aperture.

This patch:
- Updates the WQ Create commands for the DPP options
- Adds the bar mapping for if_type=6 DPP bar
- Adds the WQE pushing to the DDP aperture received from WQ create
- Adds a new module parameter to disable DPP operation if desired.
  Default is enabled.

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.h
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_hw4.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli4.h