Subject: Re: USB stack needs early review (Re: Someone should fix our USB stack...)
To: None <mlelstv@serpens.de>
From: ITOH Yasufumi <itohy@netbsd.org>
List: tech-kern
Date: 03/23/2007 01:09:00
In article <etu7iu$qpk$1@serpens.de>
mlelstv@serpens.de writes:

> itohy@NetBSD.org (ITOH Yasufumi) writes:
> 
> > - volatiles in DMA structure, since it should not be needed
> >   with proper bus_dma_sync(9)s
> 
> Can you explain?

Sure.

Our HCI drivers didn't have bus_dmamap_sync(9) at all.
(Yeah, bus_dma_sync is a typo of bus_dmamap_sync.)
I wonder why it worked.

bus_dmamap_sync() commonly has two functions:
 1. buffer bouncing, and
 2. providing proper barrier to ensure the data will not be cached.

Declaring as "volatile" may have similar function as 2. and
may make it work on some platforms.
It is, however, useless if bus_dmamap_sync()s are present.

Does this satisfy your question?
-- 
ITOH Yasufumi