lkml.org 
[lkml]   [2018]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.18 060/150] net: fec: fix rare tx timeout
    Date
    4.18-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    [ Upstream commit 657ade07df72847f591ccdb36bd9b91ed0edbac3 ]

    During certain heavy network loads TX could time out
    with TX ring dump.
    TX is sometimes never restarted after reaching
    "tx_stop_threshold" because function "fec_enet_tx_queue"
    only tests the first queue.

    In addition the TX timeout callback function failed to
    recover because it also operated only on the first queue.

    Signed-off-by: Rickard x Andersson <rickaran@axis.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/freescale/fec_main.c | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
    index c729665107f5..e10471ee0a8b 100644
    --- a/drivers/net/ethernet/freescale/fec_main.c
    +++ b/drivers/net/ethernet/freescale/fec_main.c
    @@ -1157,7 +1157,7 @@ static void fec_enet_timeout_work(struct work_struct *work)
    napi_disable(&fep->napi);
    netif_tx_lock_bh(ndev);
    fec_restart(ndev);
    - netif_wake_queue(ndev);
    + netif_tx_wake_all_queues(ndev);
    netif_tx_unlock_bh(ndev);
    napi_enable(&fep->napi);
    }
    @@ -1272,7 +1272,7 @@ skb_done:

    /* Since we have freed up a buffer, the ring is no longer full
    */
    - if (netif_queue_stopped(ndev)) {
    + if (netif_tx_queue_stopped(nq)) {
    entries_free = fec_enet_get_free_txdesc_num(txq);
    if (entries_free >= txq->tx_wake_threshold)
    netif_tx_wake_queue(nq);
    @@ -1745,7 +1745,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)
    napi_disable(&fep->napi);
    netif_tx_lock_bh(ndev);
    fec_restart(ndev);
    - netif_wake_queue(ndev);
    + netif_tx_wake_all_queues(ndev);
    netif_tx_unlock_bh(ndev);
    napi_enable(&fep->napi);
    }
    @@ -2246,7 +2246,7 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,
    napi_disable(&fep->napi);
    netif_tx_lock_bh(ndev);
    fec_restart(ndev);
    - netif_wake_queue(ndev);
    + netif_tx_wake_all_queues(ndev);
    netif_tx_unlock_bh(ndev);
    napi_enable(&fep->napi);
    }
    --
    2.17.1


    \
     
     \ /
      Last update: 2018-11-02 20:26    [W:4.516 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site