lpfc 8.3.42: Fix ramdom errors using first burst
Subsystems (2)
PATCH 3/18 lpfc 8.3.42: Fix ramdom errors using first burst
Fix ramdom errors using first burst
Signed-off-by James Smart <[email protected]>
---
lpfc_scsi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +7 -2
@@ -4342,6 +4342,7 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vchar tag[2 ];uint8_t *ptr;bool sli4; +uint32_t fcpdl;if (!pnode || !NLP_CHK_NODE_ACT (pnode))return ;
@@ -4389,8 +4390,12 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *v iocb_cmd->ulpPU =PARM_READ_CHECK ;if (vport->cfg_first_burst_size && (pnode->nlp_flag &NLP_FIRSTBURST )) { - piocbq->iocb.un.fcpi.fcpi_XRdy = - vport->cfg_first_burst_size; + fcpdl =scsi_bufflen (scsi_cmnd); +if (fcpdl < vport->cfg_first_burst_size) + piocbq->iocb.un.fcpi.fcpi_XRdy = fcpdl; +else + piocbq->iocb.un.fcpi.fcpi_XRdy = + vport->cfg_first_burst_size; } fcp_cmnd->fcpCntl3 =WRITE_DATA ; phba->fc4OutputRequests++;