29 dma_page->
offset = first & ~PAGE_MASK;
30 dma_page->
tail = 1 + ((first+size-1) & ~PAGE_MASK);
52 if (PageHighMem(dma->
map[map_offset])) {
64 sg_set_page(&dma->
SGlist[map_offset], dma->
bouncemap[map_offset], len, offset);
67 sg_set_page(&dma->
SGlist[map_offset], dma->
map[map_offset], len, offset);
79 for (i = 0, sg = dma->
SGlist; i < dma->SG_length; i++, sg++) {
87 buffer_offset = buffer_offset_2;
94 if (itv->
udma.SG_handle == 0) {
96 itv->
udma.SG_handle = pci_map_single(itv->
pdev, itv->
udma.SGarray,
98 ivtv_udma_sync_for_cpu(itv);
103 void __user *userbuf,
int size_in_bytes)
109 IVTV_DEBUG_DMA(
"ivtv_udma_setup, dst: 0x%08x\n", (
unsigned int)ivtv_dest_addr);
113 IVTV_DEBUG_WARN(
"ivtv_udma_setup: SG_length %d page_count %d still full?\n",
121 IVTV_DEBUG_WARN(
"ivtv_udma_setup: Error %d page_count from %d bytes %d offset\n",
133 IVTV_DEBUG_WARN(
"failed to map user pages, returned %d instead of %d\n",
136 for (i = 0; i <
err; i++)
163 ivtv_udma_sync_for_device(itv);
184 ivtv_udma_sync_for_cpu(itv);
198 if (itv->
udma.SG_handle) {
199 pci_unmap_single(itv->
pdev, itv->
udma.SG_handle,
204 if (itv->
udma.SG_length) {
209 if (itv->
udma.bouncemap[i])