diff options
author | James Smart <jsmart2021@gmail.com> | 2018-06-26 08:24:26 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-07-10 22:15:09 -0400 |
commit | 414abe0ab66f951efe743a3293cb36ac3255214a (patch) | |
tree | b02c0d27f741ec53e661717492af9d24c05f0ea2 /drivers/scsi/lpfc/lpfc_nvmet.c | |
parent | 68c9b55deea51151d9da3d45ecc9a5ef72f9dfb1 (diff) | |
download | lwn-414abe0ab66f951efe743a3293cb36ac3255214a.tar.gz lwn-414abe0ab66f951efe743a3293cb36ac3255214a.zip |
scsi: lpfc: Make PBDE optimizations configurable
The PBDE optimizations aren't supported in all firmware revs.
Make optimizations configurable in case there's a side effect on old
firmware.
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>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nvmet.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nvmet.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index 102c970a00e6..ccb35efef1e1 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -2493,7 +2493,7 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba, bf_set(wqe_xc, &wqe->fcp_treceive.wqe_com, 0); /* Word 11 - set pbde later */ - if (phba->nvme_embed_pbde) { + if (phba->cfg_enable_pbde) { do_pbde = 1; } else { bf_set(wqe_pbde, &wqe->fcp_treceive.wqe_com, 0); @@ -2608,16 +2608,19 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba, bf_set(lpfc_sli4_sge_last, sgl, 1); sgl->word2 = cpu_to_le32(sgl->word2); sgl->sge_len = cpu_to_le32(cnt); - if (do_pbde && i == 0) { + if (i == 0) { bde = (struct ulp_bde64 *)&wqe->words[13]; - memset(bde, 0, sizeof(struct ulp_bde64)); - /* Words 13-15 (PBDE)*/ - bde->addrLow = sgl->addr_lo; - bde->addrHigh = sgl->addr_hi; - bde->tus.f.bdeSize = - le32_to_cpu(sgl->sge_len); - bde->tus.f.bdeFlags = BUFF_TYPE_BDE_64; - bde->tus.w = cpu_to_le32(bde->tus.w); + if (do_pbde) { + /* Words 13-15 (PBDE) */ + bde->addrLow = sgl->addr_lo; + bde->addrHigh = sgl->addr_hi; + bde->tus.f.bdeSize = + le32_to_cpu(sgl->sge_len); + bde->tus.f.bdeFlags = BUFF_TYPE_BDE_64; + bde->tus.w = cpu_to_le32(bde->tus.w); + } else { + memset(bde, 0, sizeof(struct ulp_bde64)); + } } sgl++; ctxp->offset += cnt; |