diff options
author | James.Smart@Emulex.Com <James.Smart@Emulex.Com> | 2005-08-10 15:02:45 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-12 12:08:13 -0500 |
commit | 483f05f0134e60b724bc3678507c1def860c56d5 (patch) | |
tree | d9bd0a9261a2e9e37a3c8149c66439e9cf8b01bd /drivers/scsi/lpfc | |
parent | 507caac75e86bd041c5462e5e988fb7138e21d79 (diff) | |
download | blackbird-op-linux-483f05f0134e60b724bc3678507c1def860c56d5.tar.gz blackbird-op-linux-483f05f0134e60b724bc3678507c1def860c56d5.zip |
[SCSI] lpfc driver 8.0.30 : fix iocb reuse initialization
IOCB BDE not getting fully initialized during reuse
Symptoms: Driver gets Status 3 and Reason 0x13 on IOCB completions.
Cause: The IOCB bpl.bdeSize and bdeFlags are not getting initialized on reuse.
Fix: Reinitialize these fields in prep_dma each time an IOCB is used.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 17e4974d4445..7cb1e467734f 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -238,6 +238,8 @@ lpfc_scsi_prep_dma_buf(struct lpfc_hba * phba, struct lpfc_scsi_buf * lpfc_cmd) bpl->tus.f.bdeSize = scsi_cmnd->request_bufflen; if (datadir == DMA_TO_DEVICE) bpl->tus.f.bdeFlags = 0; + else + bpl->tus.f.bdeFlags = BUFF_USE_RCV; bpl->tus.w = le32_to_cpu(bpl->tus.w); num_bde = 1; bpl++; @@ -245,8 +247,11 @@ lpfc_scsi_prep_dma_buf(struct lpfc_hba * phba, struct lpfc_scsi_buf * lpfc_cmd) /* * Finish initializing those IOCB fields that are dependent on the - * scsi_cmnd request_buffer + * scsi_cmnd request_buffer. Note that the bdeSize is explicitly + * reinitialized since all iocb memory resources are used many times + * for transmit, receive, and continuation bpl's. */ + iocb_cmd->un.fcpi64.bdl.bdeSize = (2 * sizeof (struct ulp_bde64)); iocb_cmd->un.fcpi64.bdl.bdeSize += (num_bde * sizeof (struct ulp_bde64)); iocb_cmd->ulpBdeCount = 1; |