From patchwork Fri Jun 5 10:56:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 1550 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Fri, 05 Jun 2009 09:57:47 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Fri, 05 Jun 2009 06:58:29 -0300 (BRT) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MCWBH-0004zf-9v; Fri, 05 Jun 2009 09:57:47 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751235AbZFEJ5g (ORCPT + 1 other); Fri, 5 Jun 2009 05:57:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751379AbZFEJ5g (ORCPT ); Fri, 5 Jun 2009 05:57:36 -0400 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:46133 "EHLO t61.ukuu.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751235AbZFEJ5g (ORCPT ); Fri, 5 Jun 2009 05:57:36 -0400 Received: from t61.ukuu.org.uk (t61.ukuu.org.uk [127.0.0.1]) by t61.ukuu.org.uk (8.14.3/8.14.3) with ESMTP id n55AuIGn020231; Fri, 5 Jun 2009 11:56:19 +0100 From: Alan Cox Subject: [PATCH] ivtv: Fix PCI direction To: torvalds@linux-foundation.org, linux-media@vger.kernel.org Date: Fri, 05 Jun 2009 11:56:18 +0100 Message-ID: <20090605105551.20201.22179.stgit@t61.ukuu.org.uk> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Alan Cox 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 --- drivers/media/video/ivtv/ivtv-queue.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/ivtv/ivtv-queue.c b/drivers/media/video/ivtv/ivtv-queue.c index ff7b7de..7fde36e 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); }