]> git.baikalelectronics.ru Git - kernel.git/commit
net: Google gve: Remove dma_wmb() before ringing doorbell
authorLiran Alon <liran.alon@oracle.com>
Fri, 3 Jan 2020 16:44:59 +0000 (18:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jan 2020 20:40:53 +0000 (12:40 -0800)
commit8502d645d0a301dc9a47a771a72b02d5d0ca0fbf
treeb52c82984379aaab718a28a7004f9f6245abb374
parentfc51b7c761ee97e2ffd2b3a34397b4afcfc7ec88
net: Google gve: Remove dma_wmb() before ringing doorbell

Current code use dma_wmb() to ensure Rx/Tx descriptors are visible
to device before writing to doorbell.

However, these dma_wmb() are wrong and unnecessary. Therefore,
they should be removed.

iowrite32be() called from gve_rx_write_doorbell()/gve_tx_put_doorbell()
should guaratee that all previous writes to WB/UC memory is visible to
device before the write done by iowrite32be().

E.g. On ARM64, iowrite32be() calls __iowmb() which expands to dma_wmb()
and only then calls __raw_writel().

Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/google/gve/gve_rx.c
drivers/net/ethernet/google/gve/gve_tx.c