]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:26 +0000 (17:49 +0200)
commitfd9757bb7044b1d01009240d0807a026b9c64038
tree30539e157b70bf527dcb1de09d62bab0e6cd3d40
parentecd872aa3197d189f35fb122a501810924fd80e8
net: octeon: mgmt: Repair filling of RX ring

commit 0c34bb598c510e070160029f34efeeb217000f8d upstream.

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: a999933db9ed ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c