]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2fc: scsi_dma_unmap() not invoked on IO completions
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>
Fri, 27 May 2011 18:47:26 +0000 (11:47 -0700)
committerBob Picco <bob.picco@oracle.com>
Fri, 3 Feb 2012 18:18:31 +0000 (13:18 -0500)
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>
(cherry picked from commit b5a95fe7ef464a67fab6ff870aa740739e788f90)

drivers/scsi/bnx2fc/bnx2fc_io.c

index 5dc4205ed8afbb948263d12df3546401249dc2a7..45eba6d609c9a6f8d989941329636b79fd94b19a 100644 (file)
@@ -1743,7 +1743,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);
@@ -1763,6 +1762,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: