Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2478876imd; Fri, 2 Nov 2018 12:07:06 -0700 (PDT) X-Google-Smtp-Source: AJdET5fjub+gWJBTDHHkwqxTOS8fgdnf2ZbUsPArSD3MRoK8iolGDhlwUDLDBfjAyMDwpiBzBTbD X-Received: by 2002:a63:db02:: with SMTP id e2mr2253416pgg.419.1541185625869; Fri, 02 Nov 2018 12:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541185625; cv=none; d=google.com; s=arc-20160816; b=CHxvHWhU3Rt+SyaALCAH6ZL63wHLyDYTjrgxjYc5pCpY+bO+5xQt+NSzrl5n2sw9u2 fNJPkX/HiZxRz1dbonBltw0sfkck9B/NABKh5/hxQ637MHy2UuSLIKfXx+Kj/GfH+joY f1n7yOLlwOeiD1SIqhRCgbL0SjYzmBSWBysVw3KqBJ42toNGAWEOc6DSe5DEprmJ0sTe nokE1xGNiitRhgw0MZelTQeKZ4Hc4H4M0SPb/nOnECZix1m40vvkkct5qi4+KkY0l2Mx 5wLYp38lgUSQuvMA/hhW08kvm6p7vhpd3py9zmZcd3TFPkrpPIEEtT5PdLwOAuJcqhAq rZdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7F8HxcHcPFJW3WoFFBNxeQARrVDPpePCLkrvquOj4qY=; b=fa9Zc/F1HuwvVQzGiFzREwByRTL4iG9LSk49qnNNfQTuiITF+FXD6v7wyhPgk/Mdkq +r7M5uGeGOTDGc+1Y/waGQmLTNans5YVNTTX6M25mnCu++pGPT17XZJG5uM90N6MF6Q9 1gmP2spzv6IsnxAs65vyKhCgq3CqYm4C7ExsWalBxaWYxnJAwepWvr3xjapxq6DWU6EQ BRBfX1BiVR5WccGW9xHdbcRyGa/QTe5+f2ESVRnkebSDoiVRTvjIknSpr2hFeMEZ1x6x xDJ+XW9xuYijjPV4sndj7i257wKAROBBJebzpusNmZO90bbI8H84j31Z/39wvdcmEdL+ pUUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wWfp0Z6m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay8-v6si32796758plb.235.2018.11.02.12.06.50; Fri, 02 Nov 2018 12:07:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wWfp0Z6m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729718AbeKCDuK (ORCPT + 99 others); Fri, 2 Nov 2018 23:50:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:45072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728835AbeKCDuJ (ORCPT ); Fri, 2 Nov 2018 23:50:09 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B80820854; Fri, 2 Nov 2018 18:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184117; bh=cdjFVVe5DIPX0L6K0yQHSLlPzVUKBsc0T+ty0Fl9uXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wWfp0Z6m9fkioZahlWXkOt7KHKGLp9Iy/8TdWmF8HGbKBn1ZgEWTEF2qpi8wUwNWw y1HpuFqkmMffR5VvEtzrVOMgwnKEdH0DjUOFwXMWTkn3Gq0dfKsn4wqbH1O9zF2vcg ogE969q7Apmkvp9Uz/FtafV/eUsd5noMoLh3PTXc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rickard x Andersson , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 060/150] net: fec: fix rare tx timeout Date: Fri, 2 Nov 2018 19:33:42 +0100 Message-Id: <20181102182907.741282330@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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