Page MenuHomeFreeBSD

Fix iwn(4) on ARM: perform BUS_DMASYNC_PREREAD when initializing RX buffer
ClosedPublic

Authored by gonzo on Dec 6 2016, 12:47 AM.

Details

Summary

BUS_DMASYNC_PREREAD is required when setting up RX buffer, otherwise
data provided by card can be overwritten by data evicted from cache

Also use proper tag when setting up RX descriptor

Test Plan

Tested on Jetson TK1 with "Centrino Wireless-N 1000 [Condor Peak]" card

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gonzo retitled this revision from to Fix iwn(4) on ARM: perform BUS_DMASYNC_PREREAD when initializing RX buffer.
gonzo updated this object.
gonzo edited the test plan for this revision. (Show Details)
gonzo added a reviewer: adrian.
sys/dev/iwn/if_iwn.c
3036–3042 ↗(On Diff #22726)

We also need a bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_PREREAD); in this case, for the reloaded old mbuf, I think.

Also perform BUS_DMASYNC_PREREAD op when reloading old rx mbuf

This comment was removed by gonzo.
gonzo added inline comments.
sys/dev/iwn/if_iwn.c
3036–3042 ↗(On Diff #22726)

Yes, you're right. I think it was missing piece - now my ARM board successfully connects to AP. Performance is terrible (2.2 MBit/sec) and connection is unstable, but it's improvement comparing to original state.

adrian edited edge metadata.
This revision is now accepted and ready to land.Dec 10 2016, 3:20 AM
avos edited edge metadata.
ivadasz edited edge metadata.
This revision was automatically updated to reflect the committed changes.
gonzo marked an inline comment as done.