dpaa2-eth: fix condition for number of buffer acquire retries
authorIoana Ciornei <ioana.ciornei@nxp.com>
Wed, 24 Jun 2020 11:34:19 +0000 (14:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:47 +0000 (08:23 +0200)
commit19787a1aa4af3370b8536df2632ae87eb031fc38
tree7e6113a884457c257a4f41271fc6fac4a6f29830
parent07bb7df94438743374dc2bf4e37123c6fe7d19ca
dpaa2-eth: fix condition for number of buffer acquire retries

[ Upstream commit 0e5ad75b02d9341eb9ca22627247f9a02cc20d6f ]

We should keep retrying to acquire buffers through the software portals
as long as the function returns -EBUSY and the number of retries is
__below__ DPAA2_ETH_SWP_BUSY_RETRIES.

Fixes: ef17bd7cc0c8 ("dpaa2-eth: Avoid unbounded while loops")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c