diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-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) | |||
238 | bpl->tus.f.bdeSize = scsi_cmnd->request_bufflen; | 238 | bpl->tus.f.bdeSize = scsi_cmnd->request_bufflen; |
239 | if (datadir == DMA_TO_DEVICE) | 239 | if (datadir == DMA_TO_DEVICE) |
240 | bpl->tus.f.bdeFlags = 0; | 240 | bpl->tus.f.bdeFlags = 0; |
241 | else | ||
242 | bpl->tus.f.bdeFlags = BUFF_USE_RCV; | ||
241 | bpl->tus.w = le32_to_cpu(bpl->tus.w); | 243 | bpl->tus.w = le32_to_cpu(bpl->tus.w); |
242 | num_bde = 1; | 244 | num_bde = 1; |
243 | bpl++; | 245 | bpl++; |
@@ -245,8 +247,11 @@ lpfc_scsi_prep_dma_buf(struct lpfc_hba * phba, struct lpfc_scsi_buf * lpfc_cmd) | |||
245 | 247 | ||
246 | /* | 248 | /* |
247 | * Finish initializing those IOCB fields that are dependent on the | 249 | * Finish initializing those IOCB fields that are dependent on the |
248 | * scsi_cmnd request_buffer | 250 | * scsi_cmnd request_buffer. Note that the bdeSize is explicitly |
251 | * reinitialized since all iocb memory resources are used many times | ||
252 | * for transmit, receive, and continuation bpl's. | ||
249 | */ | 253 | */ |
254 | iocb_cmd->un.fcpi64.bdl.bdeSize = (2 * sizeof (struct ulp_bde64)); | ||
250 | iocb_cmd->un.fcpi64.bdl.bdeSize += | 255 | iocb_cmd->un.fcpi64.bdl.bdeSize += |
251 | (num_bde * sizeof (struct ulp_bde64)); | 256 | (num_bde * sizeof (struct ulp_bde64)); |
252 | iocb_cmd->ulpBdeCount = 1; | 257 | iocb_cmd->ulpBdeCount = 1; |