Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757498Ab0D0Ww0 (ORCPT ); Tue, 27 Apr 2010 18:52:26 -0400 Received: from sh.osrg.net ([192.16.179.4]:56750 "EHLO sh.osrg.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755088Ab0D0WwY (ORCPT ); Tue, 27 Apr 2010 18:52:24 -0400 Date: Wed, 28 Apr 2010 07:50:07 +0900 To: linux@arm.linux.org.uk Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org, fujita.tomonori@lab.ntt.co.jp Subject: Re: [PATCH] ARM: dmabounce: fix partial sync in dma_sync_single_* API From: FUJITA Tomonori In-Reply-To: <20100413142607V.fujita.tomonori@lab.ntt.co.jp> References: <20100405123847C.fujita.tomonori@lab.ntt.co.jp> <20100412193536.GO3048@n2100.arm.linux.org.uk> <20100413142607V.fujita.tomonori@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20100428075137J.fujita.tomonori@lab.ntt.co.jp> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (sh.osrg.net [192.16.179.4]); Wed, 28 Apr 2010 07:50:09 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2491 Lines: 72 On Tue, 13 Apr 2010 14:27:04 +0900 FUJITA Tomonori wrote: > On Mon, 12 Apr 2010 20:35:36 +0100 > Russell King - ARM Linux wrote: > > > On Mon, Apr 05, 2010 at 12:39:32PM +0900, FUJITA Tomonori wrote: > > > I don't have arm hardware that uses dmabounce so I can't confirm the > > > problem but seems that dmabounce doesn't work for some drivers... > > > > Patch reviews fine, except for one niggle. I too don't have hardware > > I can test (well, I do except the kernel stopped supporting the UDA1341 > > audio codec on the SA1110 Neponset.) > > Thanks for reviewing. > > > > @@ -171,10 +172,17 @@ find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_ > > > read_lock_irqsave(&device_info->lock, flags); > > > > > > list_for_each_entry(b, &device_info->safe_buffers, node) > > > - if (b->safe_dma_addr == safe_dma_addr) { > > > - rb = b; > > > - break; > > > - } > > > + if (for_sync) { > > > + if (b->safe_dma_addr <= safe_dma_addr && > > > + safe_dma_addr < b->safe_dma_addr + b->size) { > > > + rb = b; > > > + break; > > > + } > > > + } else > > > + if (b->safe_dma_addr == safe_dma_addr) { > > > + rb = b; > > > + break; > > > + } > > > > This is the niggle; I don't like this indentation style. If you want to > > indent this if () statement, then please format like this: > > > > } else { > > if (b->safe...) { > > ... > > } > > } > > > > or format it as: > > > > } else if (b->safe...) { > > ... > > } > > ok, here's the fixed patch. > > = > From: FUJITA Tomonori > Subject: [PATCH] ARM: dmabounce: fix partial sync in dma_sync_single_* API > > Some network drivers do a partial sync with > dma_sync_single_for_{device|cpu}. The dma_addr argument might not be > the same as one as passed into the mapping API. > > This adds some tricks to find_safe_buffer() for > dma_sync_single_for_{device|cpu}. > > Signed-off-by: FUJITA Tomonori > --- > arch/arm/common/dmabounce.c | 30 +++++++++++++++++++++--------- > 1 files changed, 21 insertions(+), 9 deletions(-) Ping? Is this going to be merged via the arm tree? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/