From: Darrick J. Wong Date: Sat, 11 Nov 2006 00:59:24 +0000 (-0800) Subject: [SCSI] aic94xx: Don't call pci_map_sg for already-mapped scatterlists X-Git-Tag: v2.6.23-rc1~7^2~50 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba330ffebb43c37cabc765c7cb0a80df01554657;p=pandora-kernel.git [SCSI] aic94xx: Don't call pci_map_sg for already-mapped scatterlists It turns out that libata has already dma_map_sg'd the scatterlist entries that go with an ata_queued_cmd by the time it calls sas_ata_qc_issue. sas_ata_qc_issue passes this scatterlist to aic94xx. Unfortunately, aic94xx assumes that any scatterlist passed to it needs to be pci_map_sg'd... which blows away the mapping that libata created! This causes (on a x260) Calgary IOMMU table leaks and duplicate frees when aic94xx and libata try to {pci,dma}_unmap_sg the scatterlist. Signed-off-by: Darrick J. Wong Key this check off ATA_PROTOCOL_STP Signed-off-by: James Bottomley --- Reading git-diff-tree failed