]> git.baikalelectronics.ru Git - kernel.git/commit
net: octeon: mgmt: Repair filling of RX ring
authorAlexander Sverdlin <alexander.sverdlin@nokia.com>
Fri, 29 May 2020 12:17:10 +0000 (14:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jun 2020 18:45:20 +0000 (11:45 -0700)
commit48f63747c3044017ff3709eba1513fd9d8980aec
tree3c8e9ee992e7873cce8fe19c86fede79d03a30da
parent72552d3958de96eab7434b71c0d1e1580db9e80e
net: octeon: mgmt: Repair filling of RX ring

The removal of mips_swiotlb_ops exposed a problem in octeon_mgmt Ethernet
driver. mips_swiotlb_ops had an mb() after most of the operations and the
removal of the ops had broken the receive functionality of the driver.
My code inspection has shown no other places except
octeon_mgmt_rx_fill_ring() where an explicit barrier would be obviously
missing. The latter function however has to make sure that "ringing the
bell" doesn't happen before RX ring entry is really written.

The patch has been successfully tested on Octeon II.

Fixes: 7f4d1828f8cb ("MIPS: remove mips_swiotlb_ops")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c