newbus bus access routines and bus_space_barrier()

Adrian Chadd adrian at freebsd.org
Sun Oct 16 01:48:28 UTC 2011


Hi all,

I'm not clued up on the way of the bus API, so please excuse the
newbie questions.

Nathan and I found that ath(4) wasn't working for a user because of a
missing bus barrier. Ath trips it up because it does lots of loops of
register reads/writes through the bus stream API rather than the
normal bus API.
It does this because it handles the register value swapping in
hardware rather than in software.

The correct fix is to teach ath(4) to use bus_space_barrier() calls
when doing stream calls, which I can do, but the newbus documentation
points out that both normal and stream bus access doesn't enforce
ordering, and barrier calls are needed. But I don't see lots of
bus_space_barrier() calls everywhere. Why's that?

Thanks,


Adrian


More information about the freebsd-arch mailing list