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 <[email protected]>
---
 drivers/scsi/bnx2fc/bnx2fc_io.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index d3fc302..96013a9 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1728,7 +1728,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);
@@ -1748,6 +1747,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:
-- 
1.7.0.6




_______________________________________________
devel mailing list
[email protected]
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to