On Mon, Feb 22, 2010 at 02:06:54AM +0900, Izumi Tsutsui wrote:
> > > (POLL() macro with bus_dmamap_sync() seems also wrong..)
> >
> > Hum, it looks correct to me. We are after the device wrote something
> > to RAM, so it's a POSTREAD operation, isn't it ?
>
> Strictly, if DMA is still on-going even after DMA'ed memory is polled,
> we also have to call PREREAD sync every time.
>
> for (xi = xxx; xi; xi--) {
> uint32_t temp;
> bus_dmamap_sync(..., POSTREAD|POSTWRITE);
> temp = le32toh(*sw);
> if (temp == I2O_EXEC_foo);
> break;
> bus_dmamap_sync(..., PREREAD);
> }
I see. But this would require changing the macro; more work than what
I can do right now.
--
Manuel Bouyer <[email protected]>
NetBSD: 26 ans d'experience feront toujours la difference
--