Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3956107yba; Wed, 17 Apr 2019 01:15:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqweSs48UoCOWapyALRcdiWazavixSaWZJLfGU/HSCmD5bJLL9H4ktUun6njyGCbLY3UK0bp X-Received: by 2002:a17:902:e704:: with SMTP id co4mr46878212plb.30.1555488906331; Wed, 17 Apr 2019 01:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555488906; cv=none; d=google.com; s=arc-20160816; b=qOidlPOaYUsnWVJ+p6wmz7gYGhv5ZS8BKiAB4YjWVScsxILXHkfcWl6HT4rUVM3oso tGDOmyWVQRdkDnY03Bkn7YIWsRhRu3lv2zrOpQz2HUmEIilABIRp6mP3RpjEDp57U64Z C+/8N7L6BSCMDeQe14ZluiXmtzkiZ7FBl3sZZf4Gz6EvvWlG8vqg29Y7KJJZQ690H0ft tmoF6VvmxRHUBA1QV9kAp8y3xzVq9Zm5pm5Vw80FPryqzeAx/1N8BdggkQeu1jCKpWS+ KwIyubY/T9Bp5CWWElGMUiKOqnQ+V9JCSXw3pei2hcMk2Ssa3R0Jcwh4K0q1b4DNkBZm XO2g== 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:message-id:date:cc:to:from:subject:dkim-signature; bh=nU/UyANuJr7HaL5b4DzuWw7Mi4MpXvT5ArjGHc26ZUU=; b=L0VZ6uegL4hmM1eYZCCA9lKfNinzLiaL3aBtTOFr5UNvqZ3ZLYDeEDXKnVgHZQFpfc Hn9jnR3lbN8rjeaC89QSVeSc4K3pbYSy8xKyBxGnJk6gftxYK7e57qKM9x+Nd4SooNSZ en0pFqtYqJdtThUdlovKlonk+wIMWEZesh3fOQpGPcGy2IWnNcamjwLrIAZpz0A1Er4M 33wrEgnqEIH3weLI17g2s+lAd3+hX2mrbrIag0i0M/437FeCmT5hhiYyE7uq0jXGz8sx vDK32thh3c/6rUrZPIjnBV4H1kUsce0Rs+lhYK/UMrOd3JC6ZTR65b9gEUFy2kJwxh2k MIeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex-team.ru header.s=default header.b=eDOFkQw2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex-team.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l189si47068365pgd.291.2019.04.17.01.14.51; Wed, 17 Apr 2019 01:15:06 -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=@yandex-team.ru header.s=default header.b=eDOFkQw2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex-team.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731158AbfDQINX (ORCPT + 99 others); Wed, 17 Apr 2019 04:13:23 -0400 Received: from forwardcorp1o.mail.yandex.net ([95.108.205.193]:33472 "EHLO forwardcorp1o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727569AbfDQINX (ORCPT ); Wed, 17 Apr 2019 04:13:23 -0400 Received: from mxbackcorp1j.mail.yandex.net (mxbackcorp1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::162]) by forwardcorp1o.mail.yandex.net (Yandex) with ESMTP id 8F64C2E146A; Wed, 17 Apr 2019 11:13:19 +0300 (MSK) Received: from smtpcorp1o.mail.yandex.net (smtpcorp1o.mail.yandex.net [2a02:6b8:0:1a2d::30]) by mxbackcorp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id DjTnSs4Kr0-DGMW1YLO; Wed, 17 Apr 2019 11:13:19 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1555488799; bh=nU/UyANuJr7HaL5b4DzuWw7Mi4MpXvT5ArjGHc26ZUU=; h=Message-ID:Date:To:From:Subject:Cc; b=eDOFkQw2KbaFmgJC4QJ8beBbcBd6cjadfmrWNd5Ld3mE8SPeO0Md+UhRZaccZ9unE Xl0LMS19Nd6euyFVBPUd3zsFCYNf3DiphdLWHQzi0wuIARaUKQ6qv1BZs+YMDtLYo5 kGmCP4+fto5Y6uoKT1sW34LjDVgflUT+fHH6DEXc= Authentication-Results: mxbackcorp1j.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from dynamic-red.dhcp.yndx.net (dynamic-red.dhcp.yndx.net [2a02:6b8:0:40c:f5ec:9361:ed45:768f]) by smtpcorp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id rHSB8NUiqu-DGYGUY2o; Wed, 17 Apr 2019 11:13:16 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: [PATCH 1/2] Revert "e1000e: fix cyclic resets at link up with active tx" From: Konstantin Khlebnikov To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, Jeff Kirsher Cc: Sasha Levin , Joseph Yasi , Aaron Brown , Alexander Duyck , e1000-devel@lists.sourceforge.net Date: Wed, 17 Apr 2019 11:13:16 +0300 Message-ID: <155548879651.3454.13167784936351314661.stgit@buzz> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 7acc61e4f645..ba96e52aa8d1 100644 --- 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 work_struct *work) /* 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 @@ static void e1000_watchdog_task(struct work_struct *work) 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);