Message ID | bc8a1ecc-4b94-e0b9-ba05-acf674c1b5e6@gmail.com |
---|---|
State | New |
Headers | show |
Series | [net-next] r8169: let rtl8169_mark_to_asic clear rx descriptor field opts2 | expand |
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 181b35b78..c0731c33c 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -3889,6 +3889,7 @@ static inline void rtl8169_mark_to_asic(struct RxDesc *desc) { u32 eor = le32_to_cpu(desc->opts1) & RingEnd; + desc->opts2 = 0; /* Force memory writes to complete before releasing descriptor */ dma_wmb(); @@ -4543,7 +4544,6 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget u64_stats_update_end(&tp->rx_stats.syncp); } release_descriptor: - desc->opts2 = 0; rtl8169_mark_to_asic(desc); }
Clearing opts2 belongs to preparing the descriptor for DMA engine use. Therefore move it into rtl8169_mark_to_asic(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)