This patch for the 3w-9xxx driver is for 2.6.30-rc5. 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] James, could you please apply this? Thanks, -Adam Signed-off-by: Adam Radford <aradford@xxxxxxxxx> Note: This patch is included in-line below and also as an attachment in case Gmail hoses the patch. diff -Naur linux-2.6.30-rc4/drivers/scsi/3w-9xxx.c linux-2.6.30-rc4.new/drivers/scsi/3w-9xxx.c --- linux-2.6.30-rc4/drivers/scsi/3w-9xxx.c 2009-05-04 21:19:49.000000000 -0700 +++ linux-2.6.30-rc4.new/drivers/scsi/3w-9xxx.c 2009-05-04 21:23:59.000000000 -0700 @@ -1978,7 +1978,8 @@ { 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 */
diff -Naur linux-2.6.30-rc4/drivers/scsi/3w-9xxx.c linux-2.6.30-rc4.new/drivers/scsi/3w-9xxx.c --- linux-2.6.30-rc4/drivers/scsi/3w-9xxx.c 2009-05-04 21:19:49.000000000 -0700 +++ linux-2.6.30-rc4.new/drivers/scsi/3w-9xxx.c 2009-05-04 21:23:59.000000000 -0700 @@ -1978,7 +1978,8 @@ { 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 */