From owner-freebsd-current@FreeBSD.ORG Mon Apr 27 13:50:11 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE91D3FB; Mon, 27 Apr 2015 13:50:11 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C968516B5; Mon, 27 Apr 2015 13:50:11 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5C2D7B924; Mon, 27 Apr 2015 09:50:10 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Cc: Hans Petter Selasky , Ian Lepore , Svatopluk Kraus Subject: Re: [patch] fix add_bounce_page() for BUS_DMA_KEEP_PG_OFFSET Date: Mon, 27 Apr 2015 09:32:18 -0400 Message-ID: <1878637.qa1RymYSTA@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <553B2D56.1000405@selasky.org> References: <1429882188.1157.2.camel@freebsd.org> <553B2D56.1000405@selasky.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 27 Apr 2015 09:50:10 -0400 (EDT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 13:50:12 -0000 On Saturday, April 25, 2015 07:59:50 AM Hans Petter Selasky wrote: > On 04/24/15 15:29, Ian Lepore wrote: > > On Fri, 2015-04-24 at 13:34 +0200, Svatopluk Kraus wrote: > >> The add_bounce_page() can be called from _bus_dmamap_load_phys(). > >> Client virtual address is zero (not valid) in that case. So, client > >> physical address must be used to get an offset when > >> BUS_DMA_KEEP_PG_OFFSET flag is set. Note that client physical address > >> is always valid. > >> > >> Svatopluk Kraus > > > > The only user of BUS_DMA_KEEP_PG_OFFSET in the system is USB. If the > > flag didn't exist, we could do bouncing with a whole lot more > > efficiency, at least in the ARM world. I wonder if it would be possible > > to just eliminate the flag (and of course, USB's need for it, which I > > fully admit I don't understand even a little bit). > > > > Hi, > > USB (EHCI/UHCI/OHCI) needs this flag when computing scatter/gather > lists. Please ensure it works like expected. The good news is XHCI needs > it less than the EHCI. > > Ian: The patch looks good - will you commit it? I think the patch looks good. Feel free to commit it (someone) if I don't get to it first. -- John Baldwin