Skip to content

Commit

Permalink
[SCSI] bnx2fc: scsi_dma_unmap() not invoked on IO completions
Browse files Browse the repository at this point in the history
Do not set io_req->sc_cmd to NULL until bnx2fc_unmap_sg_list() is called to
enable it to unmap the DMA mappings.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Bhanu Prakash Gollapudi authored and James Bottomley committed Jun 29, 2011
1 parent a4dc08c commit b5a95fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/bnx2fc/bnx2fc_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,6 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
printk(KERN_ERR PFX "SCp.ptr is NULL\n");
return;
}
io_req->sc_cmd = NULL;

if (io_req->on_active_queue) {
list_del_init(&io_req->link);
Expand All @@ -1754,6 +1753,7 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
}

bnx2fc_unmap_sg_list(io_req);
io_req->sc_cmd = NULL;

switch (io_req->fcp_status) {
case FC_GOOD:
Expand Down

0 comments on commit b5a95fe

Please sign in to comment.