]> git.baikalelectronics.ru Git - kernel.git/commit
e1000: Use dma_wmb() instead of wmb() before doorbell writes
authorVenkatesh Srinivas <venkateshs@google.com>
Mon, 10 Jun 2019 21:27:50 +0000 (14:27 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 28 Jun 2019 22:59:43 +0000 (15:59 -0700)
commit5539c917dc148550a93f4c50f4411cbb68c85925
tree0747b28deb959313bd788522a899f89676061d88
parent14dd4170737aa629c61a7864a67c2c9f6ffdfa20
e1000: Use dma_wmb() instead of wmb() before doorbell writes

e1000 writes to doorbells to post transmit descriptors and fill the
receive ring. After writing descriptors to memory but before
writing to doorbells, use dma_wmb() rather than wmb(). wmb() is more
heavyweight than necessary for a device to see descriptor writes.

On x86, this avoids SFENCEs before doorbell writes in both the
Tx and Rx paths. On ARM, this converts DSB ST -> DMB OSHST.

Tested: 82576EB / x86; QEMU (qemu emulates an 8257x)

Signed-off-by: Venkatesh Srinivas <venkateshs@google.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000/e1000_main.c