tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bus_dmamap_sync() for uhci(4)



On Mon, Jun 23, 2008 at 03:20:03AM +0900, Izumi Tsutsui wrote:
> bouyer%antioche.eu.org@localhost wrote:
> 
> > > NVIDIA EHCI has some hardware bug that we don't handle (see PR#37884),
> > > though it could be fixed by proper bus_dmatag_subregion(9) and
> > > bus_dmamap_sync(9) calls that Manuel is working on.
> > 
> > Note that we can do bus_dmatag_subregion() without the bus_dmamap_sync()
> > calls here, because all DMA memory used by the USB subsystem comes from
> > bus_dmamem_alloc(). I'm adding bus_dmamap_sync() calls here because they
> > also should cause memory barriers, which are needed to avoid race
> > condition between host and controller in the DMA descriptors linked lists
> > management.
> 
> Do current USB drivers have bus_dmamap_sync(9) calls for data xfers?

No, but data xfers are also done though bus_dmamem_alloc()'ed memory.
The USB subsystem does memcpy() from/to this memory for each transfers.
Again, *all* DMA memory used by the USB subsystem comes from
bus_dmamem_alloc(). That's why it works on e.g. amd64 with more than 4GB RAM.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index