Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1706062ybi; Wed, 17 Jul 2019 20:28:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwO9sC7blL5+hxQkX/KMQLZJ0SKUnFLFSnwDFi++UPUhN3lZENtDenBw7zFzcnVCIvUdOjD X-Received: by 2002:a63:d555:: with SMTP id v21mr23547760pgi.179.1563420520988; Wed, 17 Jul 2019 20:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563420520; cv=none; d=google.com; s=arc-20160816; b=JvpjBgif03vnovDtlSH4YJaQvG4QLv+JPk+btiAqY9hnR+oVc2NvUOjwtFuhY2jEwa 832hWL13TMy1jqb0kUsh2mBQd3qukbRcYNPQMFr/nvtRAlfSuDvTXC56PkyPyJiBsft6 9/8+6n8SGQVJ9RFP1rOVUSu8tXjuYdjHN2CQghs4tmx/dD9oLQKE/x0YNiNTyeOJE3t0 l811ul7bWX5y7g1YvmtwKGZ7Owy5zPIswvs9xdsJVkTAPwnZCqEZ1UtOuIfxhrMPA11y WFSnhVtKHlsJrqQk2uYdehNS3nXZjQuqus8FdOowAscBGQNZAwyKl8yu1aD9kJExkk4G qRVQ== 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=n6JxKiTQkhlm2IfvrJlCKYAUMCFZ6++eV56MjxKd3c4=; b=XhSLOKzibmXntOenqyVxoUTPJ1jNDdwyn0mBsIJFvaeYA583DqvhkeV1EZijlbOcuO z1reeo8Tevx6k4L79LKboSOjZqXScUcJcMD55SEe8R8bbEAv+nRQMMfb4Hfy7TepVa+i qSvvlfWY4LfiLGDi4s0NPDaW850Iuc0JIQlL1w+5ok3h9ArQtAQlw4iS6mblkC3jajDN VpAz0lO+E5s6SRA7Si2UvNExo41VdfOCqkyM615h1R3ZmNCNR/L1obox/wTDPXJN3T0e ZDm4TS1Su6eyhmKxoluY/hFIUlisb/MGqhgqfO2NJuvYP1U21mhm5eQSRa0qiJA7IkWC 43ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IB5c9jn6; 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 l63si25274265pge.264.2019.07.17.20.28.25; Wed, 17 Jul 2019 20:28:40 -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=IB5c9jn6; 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 S2389525AbfGRDDz (ORCPT + 99 others); Wed, 17 Jul 2019 23:03:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:34618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389458AbfGRDDx (ORCPT ); Wed, 17 Jul 2019 23:03:53 -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 4EE5A2053B; Thu, 18 Jul 2019 03:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563419031; bh=oGrlspCvBAcSwBw6nhcrK1QUZpnRDwUPNz+62kVtgVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IB5c9jn6/jBynA6wsu7ASvuYT8/ywyh5PKkInl0wKGWWhGMC/2i3LzTAunKMVfwGK iWRvE8sFMsCzc5Egk1NuW88sFXdiD9/ID3pUwDzuwF8cWFeA7WZlNPvmCPb908bJb5 SqTNaabPS9D3Nz2tLfhfDgWi9ajWCclKdVRX04LQ= 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 5.1 01/54] Revert "e1000e: fix cyclic resets at link up with active tx" Date: Thu, 18 Jul 2019 12:00:56 +0900 Message-Id: <20190718030053.424702612@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190718030053.287374640@linuxfoundation.org> References: <20190718030053.287374640@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 @@ -5309,13 +5309,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, @@ -5338,6 +5333,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);