Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp689675yba; Fri, 26 Apr 2019 07:12:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiCoY0y8iO6ANguc648/18Cd8KilFLcdkJ0yAk9rpqmOfTlkZJsOGZedgBoyTMwj3d/ZLl X-Received: by 2002:a17:902:54c:: with SMTP id 70mr46717836plf.210.1556287976585; Fri, 26 Apr 2019 07:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556287976; cv=none; d=google.com; s=arc-20160816; b=og5I0qr7FX00j5d6alq9R1Y2/f35OdDJGbjOfOMEBWed9+L4vS/JkSCkjWDBTf6WTR WoKke7b9dLzWWZKohlsAsrKPwfwUCScdea1FD0urSeqfuC8NkMhi1/8RvpAgfs3BanG7 lFSk93+GI17w0VhtRHr9HbJVT0sRw2kSuk1F5HfeNgeraNUrKDhcqHJh/TkBJPU1tHNP aEbjEBMHy5ilANLrr0PuX3JDtV32/YJASgbjzWZokJAZjN3IekTCy7cMwJEhD03Dc34b tdAvpFymZFeNkzXFJBBsq8m4KYc4pcoaxXRQUAECU9MsK69R8iUJA/ezDBAhOGPRGaSK UBNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RVcIwwwp8SsK3CaYECOTG/vA/Hn3rv+HJkD7y1tj5z8=; b=JV08NYKSke/jyf7XEII0UruGtt6fnu6s1OgaNqmsk9QI5rBwIgAAxoEtIo625p3zbe OwDDOngWYW+DcIEWXpInuLJOoxbdk9vplS9rZftSRQ+Shpsc/oa2aNFl3EDEdaTbs98i rjiib9/T/EAXKbliCWYdd19SYit50WwgC/+JNkF59HsQxm+lbWPYDqxNF8/NrBVleFJi q/42F/nZTXetiOTcsfXeT4dVDZ26GoM6Qra79Lt4uSdvFXUE06rVfh8faZtmgJEYc69F BCQXQBh+Pi7e+RT4nBAWMuYLpf4wEpFzCRv5ZKcc5avOHa4e9TS6Mv8RJT9RFUNFaBtT HGxw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si26076113plg.262.2019.04.26.07.12.40; Fri, 26 Apr 2019 07:12:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726392AbfDZOLa (ORCPT + 99 others); Fri, 26 Apr 2019 10:11:30 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45158 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbfDZOLa (ORCPT ); Fri, 26 Apr 2019 10:11:30 -0400 Received: by mail-wr1-f66.google.com with SMTP id s15so4597537wra.12 for ; Fri, 26 Apr 2019 07:11:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RVcIwwwp8SsK3CaYECOTG/vA/Hn3rv+HJkD7y1tj5z8=; b=cNWxeh7pzpu4hJgKogelUY0qG7UOvD574idISPTIOanvf2vw+cECP/4TXQJJ1PY9Vo MIceOeKMPdiX2P6/HWgWsnI4k8khMtVJSg+RnJ2zhnyCXzlmL+cOCvsuPooaQ0AvDsos zoOGsqNCpJyKpK+GXLxM+QdPgH6JLRLgTUi9mXcaXom7TbP86YV1jOH4t/dwo0X1nu0+ L5k3LACg1p6uZqNCJ5rTTkvDvMqZ0Ubanck+Iy7eBAXZbcpGLw5OeeRcbl1ntR06Wp77 sOCDfjQwg/A8O7+vKyz/BnT4tmb13x5jZWA2lUqJT3/F1St9bcY7ircpMGQC3zK3MqFp 70aw== X-Gm-Message-State: APjAAAWyTuQGvzjdr7iZZhQrEI38zZwfTa1zDJDRUM32uFH8Ri6TaZ1y 0dSgvTKREtBNgxhQqTL2R3aahQ== X-Received: by 2002:adf:fd06:: with SMTP id e6mr13949182wrr.94.1556287888631; Fri, 26 Apr 2019 07:11:28 -0700 (PDT) Received: from localhost (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id d14sm10263253wre.78.2019.04.26.07.11.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 07:11:27 -0700 (PDT) Date: Fri, 26 Apr 2019 16:11:26 +0200 From: Oleksandr Natalenko To: Konstantin Khlebnikov Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, Jeff Kirsher , Sasha Levin , Joseph Yasi , Aaron Brown , Alexander Duyck , e1000-devel@lists.sourceforge.net Subject: Re: [PATCH 1/2] Revert "e1000e: fix cyclic resets at link up with active tx" Message-ID: <20190426141126.shpgjeya5lciudiw@butterfly.localdomain> References: <155548879651.3454.13167784936351314661.stgit@buzz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <155548879651.3454.13167784936351314661.stgit@buzz> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 17, 2019 at 11:13:16AM +0300, Konstantin Khlebnikov wrote: > 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); > Tested-by: Oleksandr Natalenko -- Best regards, Oleksandr Natalenko (post-factum) Senior Software Maintenance Engineer