]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: change wmb to smb_wmb in rtl8169_start_xmit
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 20 Apr 2020 20:52:59 +0000 (22:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2020 23:03:48 +0000 (16:03 -0700)
commitbb94dd4ae49361c03bde36a92f52b8703eaf654e
tree1f02044a8b4cb3f3becf4fe294bc199fcc1188fc
parente14bc092ab39995bc60a62325b3f12dcf0a2756a
r8169: change wmb to smb_wmb in rtl8169_start_xmit

A barrier is needed here to ensure that rtl_tx sees the descriptor
changes (DescOwn set) before the updated tp->cur_tx value. Else it may
wrongly assume that the transfer has been finished already. For this
purpose smp_wmb() is sufficient.

No separate barrier is needed for ordering the descriptor changes
with the MMIO doorbell write. The needed barrier is included in
the non-relaxed writel() used by rtl8169_doorbell().

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c