aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-06-05 11:56:18 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-05 08:05:23 -0700
commite9e10124e269a39de089c5e0d9936fae2ff889b2 (patch)
treeca2327be762018a8fe0a5c1a45a37478a000d931 /drivers/media
parentedaba2c5334492f82d39ec35637c6dea5176a977 (diff)
ivtv: Fix PCI DMA direction
The ivtv stream buffers may be for receive or for send but the attached sg handle is always destined cpu->device. We flush it correctly but the allocation is wrongly done with the same type as the buffers. See bug: http://bugzilla.kernel.org/show_bug.cgi?id=13385 (Note this doesn't close the bug - it fixes the ivtv part and in turn the logging next shows up some rather alarming DMA sg list warnings in libata) Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/ivtv/ivtv-queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/ivtv/ivtv-queue.c b/drivers/media/video/ivtv/ivtv-queue.c
index ff7b7deded4..7fde36e6d22 100644
--- a/drivers/media/video/ivtv/ivtv-queue.c
+++ b/drivers/media/video/ivtv/ivtv-queue.c
@@ -230,7 +230,8 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
return -ENOMEM;
}
if (ivtv_might_use_dma(s)) {
- s->sg_handle = pci_map_single(itv->pdev, s->sg_dma, sizeof(struct ivtv_sg_element), s->dma);
+ s->sg_handle = pci_map_single(itv->pdev, s->sg_dma,
+ sizeof(struct ivtv_sg_element), PCI_DMA_TODEVICE);
ivtv_stream_sync_for_cpu(s);
}