From: "Ronghua Zhang" <[EMAIL PROTECTED]> Date: Tue, 10 Oct 2006 16:26:58 -0700
> Thank you for your explanation, David. > > But pci_map_page should work fine if we have multiple contiguous pages > in one frag that are allocated using alloc_pages, ie: > > frag->page = alloc_pages(GFP_KERNEL, 2); // get 4 pages > frag->page_offset = 0; > frag->size = 4 * PAGE_SIZE; > > dma_addr = pci_map_page(frag->page, frag->page_offset, frag->size, ..); You should look at the implementation of pci_map_page() on some interesting architectures such as sparc64 and powerpc where an IOMMU is used to map the pages into DMA space on the PCI bus. Those implementations (rightly) assume only a single page needs to be mapped. If you assume that multiple pages would get mapped properly by such a call, things would fail. You might even get a PCI Master ABORT after crossing past the end of the first page in that multi-page chunk since the IOMMU will not have a DMA translation. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html