Commit 9025944
net: fec: add dma_wmb to ensure correct descriptor values
Two dma_wmb() are added in the XDP TX path to ensure proper ordering of
descriptor and buffer updates:
1. A dma_wmb() is added after updating the last BD to make sure
the updates to rest of the descriptor are visible before
transferring ownership to FEC.
2. A dma_wmb() is also added after updating the bdp to ensure these
updates are visible before updating txq->bd.cur.
3. Start the xmit of the frame immediately right after configuring the
tx descriptor.
Fixes: 6d6b39f ("net: fec: add initial XDP support")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 3be5f6c commit 9025944
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3834 | 3834 | | |
3835 | 3835 | | |
3836 | 3836 | | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
3837 | 3842 | | |
3838 | 3843 | | |
3839 | 3844 | | |
| |||
3843 | 3848 | | |
3844 | 3849 | | |
3845 | 3850 | | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
3846 | 3854 | | |
3847 | 3855 | | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
3848 | 3859 | | |
3849 | 3860 | | |
3850 | 3861 | | |
| |||
3873 | 3884 | | |
3874 | 3885 | | |
3875 | 3886 | | |
3876 | | - | |
3877 | | - | |
3878 | | - | |
3879 | | - | |
3880 | | - | |
3881 | | - | |
3882 | 3887 | | |
3883 | 3888 | | |
3884 | 3889 | | |
| |||
0 commit comments