scsi: lpfc: Work around NVME cmd iu SGL type
The hardware offload for NVME commands was created when the FC-NVME standard was setting SGL Descriptor Type to SGL Data Block Descriptor (0h) and SGL Descriptor Sub Type to Address (0h). A late change in NVMe-over-Fabrics obsoleted these values, creating a transport SGL descriptor type with new values to go into these fields. For initial hardware support, in order to be compliant to the spec, use host-supplied cmd IU buffers instead of the adapter generated values. Later hardware will correct this. Add a module parameter to override this offload disablement if looking for lowest latency. This is reasonable as nothing in FC-NVME uses the SQE SGL values. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
63452e1446
commit
4e565cf041
@@ -6880,6 +6880,18 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
|
||||
/* Save information as VPD data */
|
||||
phba->vpd.rev.biuRev = mqe->un.read_rev.first_hw_rev;
|
||||
phba->vpd.rev.smRev = mqe->un.read_rev.second_hw_rev;
|
||||
|
||||
/*
|
||||
* This is because first G7 ASIC doesn't support the standard
|
||||
* 0x5a NVME cmd descriptor type/subtype
|
||||
*/
|
||||
if ((bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) ==
|
||||
LPFC_SLI_INTF_IF_TYPE_6) &&
|
||||
(phba->vpd.rev.biuRev == LPFC_G7_ASIC_1) &&
|
||||
(phba->vpd.rev.smRev == 0) &&
|
||||
(phba->cfg_nvme_embed_cmd == 1))
|
||||
phba->cfg_nvme_embed_cmd = 0;
|
||||
|
||||
phba->vpd.rev.endecRev = mqe->un.read_rev.third_hw_rev;
|
||||
phba->vpd.rev.fcphHigh = bf_get(lpfc_mbx_rd_rev_fcph_high,
|
||||
&mqe->un.read_rev);
|
||||
@@ -9096,6 +9108,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
|
||||
wqe128->generic.bde.addrLow = 88; /* Word 22 */
|
||||
|
||||
bf_set(wqe_wqes, &wqe128->fcp_iwrite.wqe_com, 1);
|
||||
bf_set(wqe_dbde, &wqe128->fcp_iwrite.wqe_com, 0);
|
||||
|
||||
/* Word 22-29 FCP CMND Payload */
|
||||
ptr = &wqe128->words[22];
|
||||
@@ -9161,6 +9174,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
|
||||
wqe128->generic.bde.addrLow = 88; /* Word 22 */
|
||||
|
||||
bf_set(wqe_wqes, &wqe128->fcp_iread.wqe_com, 1);
|
||||
bf_set(wqe_dbde, &wqe128->fcp_iread.wqe_com, 0);
|
||||
|
||||
/* Word 22-29 FCP CMND Payload */
|
||||
ptr = &wqe128->words[22];
|
||||
@@ -9219,6 +9233,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
|
||||
wqe128->generic.bde.addrLow = 88; /* Word 22 */
|
||||
|
||||
bf_set(wqe_wqes, &wqe128->fcp_icmd.wqe_com, 1);
|
||||
bf_set(wqe_dbde, &wqe128->fcp_icmd.wqe_com, 0);
|
||||
|
||||
/* Word 22-29 FCP CMND Payload */
|
||||
ptr = &wqe128->words[22];
|
||||
|
Reference in New Issue
Block a user