diff options
author | James Smart <james.smart@avagotech.com> | 2015-12-16 18:12:00 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2015-12-21 22:02:45 -0500 |
commit | eb8d68c9930f7f9c8f3f4a6059b051b32077a735 (patch) | |
tree | c7d302a2462ebcdbb3918c093ce2ee79d8eac31a /drivers/scsi/lpfc | |
parent | 81e7517723fc17396ba91f59312b3177266ddbda (diff) |
lpfc: Fix RDP ACC being too long.
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>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index f7a29676dc75..817cdfcd51a8 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -4824,6 +4824,7 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba, struct lpfc_rdp_context *rdp_context, | |||
4824 | struct lpfc_nodelist *ndlp = rdp_context->ndlp; | 4824 | struct lpfc_nodelist *ndlp = rdp_context->ndlp; |
4825 | struct lpfc_vport *vport = ndlp->vport; | 4825 | struct lpfc_vport *vport = ndlp->vport; |
4826 | struct lpfc_iocbq *elsiocb; | 4826 | struct lpfc_iocbq *elsiocb; |
4827 | struct ulp_bde64 *bpl; | ||
4827 | IOCB_t *icmd; | 4828 | IOCB_t *icmd; |
4828 | uint8_t *pcmd; | 4829 | uint8_t *pcmd; |
4829 | struct ls_rjt *stat; | 4830 | struct ls_rjt *stat; |
@@ -4833,6 +4834,8 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba, struct lpfc_rdp_context *rdp_context, | |||
4833 | 4834 | ||
4834 | if (status != SUCCESS) | 4835 | if (status != SUCCESS) |
4835 | goto error; | 4836 | goto error; |
4837 | |||
4838 | /* This will change once we know the true size of the RDP payload */ | ||
4836 | cmdsize = sizeof(struct fc_rdp_res_frame); | 4839 | cmdsize = sizeof(struct fc_rdp_res_frame); |
4837 | 4840 | ||
4838 | elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, | 4841 | elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, |
@@ -4874,6 +4877,13 @@ lpfc_els_rdp_cmpl(struct lpfc_hba *phba, struct lpfc_rdp_context *rdp_context, | |||
4874 | rdp_res->length = cpu_to_be32(fec_size + RDP_DESC_PAYLOAD_SIZE); | 4877 | rdp_res->length = cpu_to_be32(fec_size + RDP_DESC_PAYLOAD_SIZE); |
4875 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; | 4878 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; |
4876 | 4879 | ||
4880 | /* Now that we know the true size of the payload, update the BPL */ | ||
4881 | bpl = (struct ulp_bde64 *) | ||
4882 | (((struct lpfc_dmabuf *)(elsiocb->context3))->virt); | ||
4883 | bpl->tus.f.bdeSize = (fec_size + RDP_DESC_PAYLOAD_SIZE + 8); | ||
4884 | bpl->tus.f.bdeFlags = 0; | ||
4885 | bpl->tus.w = le32_to_cpu(bpl->tus.w); | ||
4886 | |||
4877 | phba->fc_stat.elsXmitACC++; | 4887 | phba->fc_stat.elsXmitACC++; |
4878 | rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0); | 4888 | rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0); |
4879 | if (rc == IOCB_ERROR) | 4889 | if (rc == IOCB_ERROR) |