lkml.org 
[lkml]   [2020]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.8 176/464] dpaa2-eth: fix condition for number of buffer acquire retries
    Date
    From: Ioana Ciornei <ioana.ciornei@nxp.com>

    [ 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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    index 0998ceb1a26ea..89c43401f2889 100644
    --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    @@ -1109,7 +1109,7 @@ static void drain_bufs(struct dpaa2_eth_priv *priv, int count)
    buf_array, count);
    if (ret < 0) {
    if (ret == -EBUSY &&
    - retries++ >= DPAA2_ETH_SWP_BUSY_RETRIES)
    + retries++ < DPAA2_ETH_SWP_BUSY_RETRIES)
    continue;
    netdev_err(priv->net_dev, "dpaa2_io_service_acquire() failed\n");
    return;
    --
    2.25.1


    \
     
     \ /
      Last update: 2020-08-17 17:28    [W:4.039 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site