Re: [PATCH 0/3] fix GART to respect device's dma_mask about virtual mappings

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: FUJITA Tomonori
Date: Tuesday, September 16, 2008 - 10:13 am

On Tue, 16 Sep 2008 15:43:35 +0200
Andi Kleen <andi@firstfloor.org> wrote:


Yes,



I don't think that the bounce guarantees that dma_alloc_coherent()
returns an address that a device can access to.



I'm not familiar with what the networking does, for example, seems
that b44 sets dev->dma_mask to DMA_30BIT_MASK and b44_start_xmit()
does:

mapping = ssb_dma_map_single(bp->sdev, skb->data, len, DMA_TO_DEVICE);
if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_30BIT_MASK) {
	struct sk_buff *bounce_skb;

	/* Chip can't handle DMA to/from >1GB, use bounce buffer */
	if (!ssb_dma_mapping_error(bp->sdev, mapping))
		ssb_dma_unmap_single(bp->sdev, mapping, len,
				     DMA_TO_DEVICE);

IOMMUs can try to return an address that the NIC can access to.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] add iommu_device_max_index IOMMU helper function, FUJITA Tomonori, (Fri Sep 12, 3:42 am)
[PATCH 2/3] add dma_get_mask helper function, FUJITA Tomonori, (Fri Sep 12, 3:42 am)
Re: [PATCH 0/3] fix GART to respect device's dma_mask abou ..., FUJITA Tomonori, (Tue Sep 16, 10:13 am)