From: Bhanu Prakash Gollapudi Date: Fri, 27 May 2011 18:47:26 +0000 (-0700) Subject: [SCSI] bnx2fc: scsi_dma_unmap() not invoked on IO completions X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b5a95fe7ef464a67fab6ff870aa740739e788f90;p=linux-beck.git [SCSI] bnx2fc: scsi_dma_unmap() not invoked on IO completions 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index b5b5c346d779..454c72cdafbc 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -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); @@ -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: