Skip to content

Commit

Permalink
[SCSI] 3w-9xxx: scsi_dma_unmap fix
Browse files Browse the repository at this point in the history
This patch fixes the following regression the occurred during the
scsi_dma_map()/unmap() changes:

3w-9xxx 0001:45:00.0: DMA-API: device driver tries to free DMA memory
it has not allocated [device address=0x0000000000000000] [size=36
bytes]

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
adam radford authored and James Bottomley committed May 15, 2009
1 parent 5e43754 commit 8454e98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/3w-9xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,8 @@ static void twa_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id)
{
struct scsi_cmnd *cmd = tw_dev->srb[request_id];

scsi_dma_unmap(cmd);
if (cmd->SCp.phase == TW_PHASE_SGLIST)
scsi_dma_unmap(cmd);
} /* End twa_unmap_scsi_data() */

/* scsi_host_template initializer */
Expand Down

0 comments on commit 8454e98

Please sign in to comment.