diff options
author | James Smart <james.smart@emulex.com> | 2013-09-06 12:18:45 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-09-10 19:12:00 -0400 |
commit | 98bbf5f77f47d7de9839285af50daa4407f5db71 (patch) | |
tree | 61c110751d3e300642d9d936326d6e3f16224b31 /drivers/scsi/lpfc | |
parent | 716d3bc5030bf916b4eea15c7c00c95329f2cda4 (diff) |
[SCSI] lpfc 8.3.42: Fix random errors using first burst
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 1242b6c4308b..49916a952bfa 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -4342,6 +4342,7 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
4342 | char tag[2]; | 4342 | char tag[2]; |
4343 | uint8_t *ptr; | 4343 | uint8_t *ptr; |
4344 | bool sli4; | 4344 | bool sli4; |
4345 | uint32_t fcpdl; | ||
4345 | 4346 | ||
4346 | if (!pnode || !NLP_CHK_NODE_ACT(pnode)) | 4347 | if (!pnode || !NLP_CHK_NODE_ACT(pnode)) |
4347 | return; | 4348 | return; |
@@ -4389,8 +4390,12 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
4389 | iocb_cmd->ulpPU = PARM_READ_CHECK; | 4390 | iocb_cmd->ulpPU = PARM_READ_CHECK; |
4390 | if (vport->cfg_first_burst_size && | 4391 | if (vport->cfg_first_burst_size && |
4391 | (pnode->nlp_flag & NLP_FIRSTBURST)) { | 4392 | (pnode->nlp_flag & NLP_FIRSTBURST)) { |
4392 | piocbq->iocb.un.fcpi.fcpi_XRdy = | 4393 | fcpdl = scsi_bufflen(scsi_cmnd); |
4393 | vport->cfg_first_burst_size; | 4394 | if (fcpdl < vport->cfg_first_burst_size) |
4395 | piocbq->iocb.un.fcpi.fcpi_XRdy = fcpdl; | ||
4396 | else | ||
4397 | piocbq->iocb.un.fcpi.fcpi_XRdy = | ||
4398 | vport->cfg_first_burst_size; | ||
4394 | } | 4399 | } |
4395 | fcp_cmnd->fcpCntl3 = WRITE_DATA; | 4400 | fcp_cmnd->fcpCntl3 = WRITE_DATA; |
4396 | phba->fc4OutputRequests++; | 4401 | phba->fc4OutputRequests++; |