+++ /dev/null
-From 73e0304c829778d91116e22f78358d5b2ce07dbd Mon Sep 17 00:00:00 2001
-From: James Smart <james.smart@avagotech.com>
-Date: Wed, 16 Dec 2015 18:12:00 -0500
-Subject: [PATCH 055/135] lpfc: Fix RDP ACC being too long.
-
-[ Upstream commit eb8d68c9930f7f9c8f3f4a6059b051b32077a735 ]
-
-Fix RDP ACC being too long.
-
-Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
-Signed-off-by: James Smart <james.smart@avagotech.com>
-Reviewed-by: Hannes Reinicke <hare@suse.de>
-Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/scsi/lpfc/lpfc_els.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
---- a/drivers/scsi/lpfc/lpfc_els.c
-+++ b/drivers/scsi/lpfc/lpfc_els.c
-@@ -4792,6 +4792,7 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba,
- struct lpfc_nodelist *ndlp = rdp_context->ndlp;
- struct lpfc_vport *vport = ndlp->vport;
- struct lpfc_iocbq *elsiocb;
-+ struct ulp_bde64 *bpl;
- IOCB_t *icmd;
- uint8_t *pcmd;
- struct ls_rjt *stat;
-@@ -4801,6 +4802,8 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba,
-
- if (status != SUCCESS)
- goto error;
-+
-+ /* This will change once we know the true size of the RDP payload */
- cmdsize = sizeof(struct fc_rdp_res_frame);
-
- elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize,
-@@ -4841,6 +4844,13 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba,
-
- elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
-
-+ /* Now that we know the true size of the payload, update the BPL */
-+ bpl = (struct ulp_bde64 *)
-+ (((struct lpfc_dmabuf *)(elsiocb->context3))->virt);
-+ bpl->tus.f.bdeSize = (fec_size + RDP_DESC_PAYLOAD_SIZE + 8);
-+ bpl->tus.f.bdeFlags = 0;
-+ bpl->tus.w = le32_to_cpu(bpl->tus.w);
-+
- phba->fc_stat.elsXmitACC++;
- rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
- if (rc == IOCB_ERROR)