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.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 1:29 AM
Unknown Object (File)
Oct 30 2024, 7:56 PM
Unknown Object (File)
Oct 29 2024, 2:29 PM
Unknown Object (File)
Oct 3 2024, 8:30 AM
Unknown Object (File)
Oct 3 2024, 8:30 AM
Unknown Object (File)
Oct 3 2024, 8:30 AM
Unknown Object (File)
Oct 3 2024, 8:30 AM
Unknown Object (File)
Oct 3 2024, 8:16 AM
Subscribers

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
Lint Not Applicable
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.