Re: [patch] fix add_bounce_page() for BUS_DMA_KEEP_PG_OFFSET

From: John Baldwin <jhb_at_freebsd.org>
Date: Mon, 27 Apr 2015 09:32:18 -0400
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
Received on Mon Apr 27 2015 - 11:50:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:57 UTC