On Sun, Dec 6, 2009 at 12:13 AM, Roland Dreier
<rol...@digitalvampire.org> wrote:
>  > Im not an expert on the ral driver, but openbsd drivers practically
>  > never map device registers into memory. The value of flags will be
>  > written to hardware later.
>
> Unless I'm misunderstanding the driver, the TX ring is in system
> memory -- in other words the device will read the descriptors from
> RAM, any time after they are written.  There is an MMIO register to
> kick the chip and ask it to start processing the TX ring, but I think
> a sequence like the following is completely possible:

Oh, sorry, I somehow got stuck thinking you thought desc->flags was a
register on the device.  That would be unusual.  Your explanation
makes sense to me.  Until somebody comes along to give the right
answer :), I think normal practice is to call bus_dmamap_sync.  It
looks like most of the calls to setup_tx_desc are followed by a sync,
but that wouldn't help order the writes within the call.

Reply via email to