Commit e2e5fb8d authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: improve rtl8169_mark_to_asic

Let the compiler decide about inlining, and as confirmed by Eric it's
better to use WRITE_ONCE here to ensure that the descriptor ownership
is transferred to NIC immediately.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 588c7e5c
......@@ -3824,15 +3824,14 @@ static int rtl8169_change_mtu(struct net_device *dev, int new_mtu)
return 0;
}
static inline void rtl8169_mark_to_asic(struct RxDesc *desc)
static 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();
desc->opts1 = cpu_to_le32(DescOwn | eor | R8169_RX_BUF_SIZE);
WRITE_ONCE(desc->opts1, cpu_to_le32(DescOwn | eor | R8169_RX_BUF_SIZE));
}
static struct page *rtl8169_alloc_rx_data(struct rtl8169_private *tp,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment