]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ice: Don't allow same value for Rx tail to be written twice
authorBrett Creeley <brett.creeley@intel.com>
Thu, 6 Feb 2020 09:20:02 +0000 (01:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:45:11 +0000 (16:45 +0100)
commitc332e753426e8c5227dc25bd74243b2e50e5a1f5
treebd841a0b2838c7bb21c394ca58739601d336d308
parent7acf371968bbb24af5cd1331412dcfb3eeaeecd6
ice: Don't allow same value for Rx tail to be written twice

[ Upstream commit 168983a8e19b89efd175661e53faa6246be363a0 ]

Currently we compare the value we are about to write to the Rx tail
register with the previous value of next_to_use. The problem with this
is we only write tail on 8 descriptor boundaries, but next_to_use is
updated whenever we clean Rx descriptors. Fix this by comparing the
value we are about to write to tail with the previously written tail
value. This will prevent duplicate Rx tail bumps.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_txrx_lib.c