From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01383C76192 for ; Thu, 18 Jul 2019 03:22:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE1EE21783 for ; Thu, 18 Jul 2019 03:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563420171; bh=GsQDKGHp0bAX604iiTE+AzbVnmm5nkTZCJpC+xIdO/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QkxlIpa5jSIRHZA51VFDLrdGNMEIH65QbPYwWxaY4h104a6PJSukCBFmowrzLRvvb LhtA+DEFMfTY/49TPfGOe3KTIsg+4SQ2p+n1pdaNgQjHJ0xV2olAufknz/Jq9p1NS0 P5deZM0AffZOFc6/e/vdeMqcRKBvA7b3/Ct9cbg4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391423AbfGRDWv (ORCPT ); Wed, 17 Jul 2019 23:22:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:40522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390753AbfGRDIb (ORCPT ); Wed, 17 Jul 2019 23:08:31 -0400 Received: from localhost (115.42.148.210.bf.2iij.net [210.148.42.115]) (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 2C1E92173B; Thu, 18 Jul 2019 03:08:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563419310; bh=GsQDKGHp0bAX604iiTE+AzbVnmm5nkTZCJpC+xIdO/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xmr4PExle8fNDHR0793Xod04c+o0W//HvI+63qksaags7MTgeWs2F9E7E464AigXs aMpiS0wuqIhCdhAWFbtyrrvEbis5/F02+JhCWhScvm4qM7rw3wug2QFThHvbhlV/bG YnOxQi3cy4tJsvOTzKOU7DlUYR9mAYWwLx9GJAmc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Konstantin Khlebnikov , Joseph Yasi , Aaron Brown , Oleksandr Natalenko , Jeff Kirsher Subject: [PATCH 4.14 01/80] Revert "e1000e: fix cyclic resets at link up with active tx" Date: Thu, 18 Jul 2019 12:00:52 +0900 Message-Id: <20190718030058.716880377@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190718030058.615992480@linuxfoundation.org> References: <20190718030058.615992480@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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 From: Konstantin Khlebnikov commit caff422ea81e144842bc44bab408d85ac449377b upstream. This reverts commit 0f9e980bf5ee1a97e2e401c846b2af989eb21c61. That change cased false-positive warning about hardware hang: e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready e1000e 0000:00:1f.6 eth0: Detected Hardware Unit Hang: TDH <0> TDT <1> next_to_use <1> next_to_clean <0> buffer_info[next_to_clean]: time_stamp next_to_watch <0> jiffies next_to_watch.status <0> MAC Status <40080080> PHY Status <7949> PHY 1000BASE-T Status <0> PHY Extended Status <3000> PCI Status <10> e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx Besides warning everything works fine. Original issue will be fixed property in following patch. Signed-off-by: Konstantin Khlebnikov Reported-by: Joseph Yasi Link: https://bugzilla.kernel.org/show_bug.cgi?id=203175 Tested-by: Joseph Yasi Tested-by: Aaron Brown Tested-by: Oleksandr Natalenko Signed-off-by: Jeff Kirsher Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -5306,13 +5306,8 @@ static void e1000_watchdog_task(struct w /* 8000ES2LAN requires a Rx packet buffer work-around * on link down event; reset the controller to flush * the Rx packet buffer. - * - * If the link is lost the controller stops DMA, but - * if there is queued Tx work it cannot be done. So - * reset the controller to flush the Tx packet buffers. */ - if ((adapter->flags & FLAG_RX_NEEDS_RESTART) || - e1000_desc_unused(tx_ring) + 1 < tx_ring->count) + if (adapter->flags & FLAG_RX_NEEDS_RESTART) adapter->flags |= FLAG_RESTART_NOW; else pm_schedule_suspend(netdev->dev.parent, @@ -5335,6 +5330,14 @@ link_up: adapter->gotc_old = adapter->stats.gotc; spin_unlock(&adapter->stats64_lock); + /* If the link is lost the controller stops DMA, but + * if there is queued Tx work it cannot be done. So + * reset the controller to flush the Tx packet buffers. + */ + if (!netif_carrier_ok(netdev) && + (e1000_desc_unused(tx_ring) + 1 < tx_ring->count)) + adapter->flags |= FLAG_RESTART_NOW; + /* If reset is necessary, do it outside of interrupt context. */ if (adapter->flags & FLAG_RESTART_NOW) { schedule_work(&adapter->reset_task);