summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-06-05 10:56:18 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-05 10:56:18 +0000
commite3f49481ec12d850c2290cad0d7ebd61b0e8d8e6 (patch)
tree8fcdf24e45fde1b2f0502af1adba32a6901851e9 /linux/drivers/media/video/ivtv
parent4a8ec05c873aa6247954e168931f9937c948a6cc (diff)
downloadmediapointer-dvb-s2-e3f49481ec12d850c2290cad0d7ebd61b0e8d8e6.tar.gz
mediapointer-dvb-s2-e3f49481ec12d850c2290cad0d7ebd61b0e8d8e6.tar.bz2
ivtv: Fix PCI direction
From: Alan Cox <alan@linux.intel.com> 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> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/ivtv')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-queue.c b/linux/drivers/media/video/ivtv/ivtv-queue.c
index ff7b7dede..7fde36e6d 100644
--- a/linux/drivers/media/video/ivtv/ivtv-queue.c
+++ b/linux/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);
}