Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp61307ybv; Wed, 5 Feb 2020 01:08:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwKoL0XSnYX2D9Tw5VWgAV2R0zxsq95e/jE9nzQ75FRTm7mZVRgR4aZZOG9lfI2pmIfKmTv X-Received: by 2002:aca:90f:: with SMTP id 15mr2223259oij.18.1580893700657; Wed, 05 Feb 2020 01:08:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580893700; cv=none; d=google.com; s=arc-20160816; b=Le6L3+rGEEgQv6YpcMBADWeK/oYW1lcA3PQeO/xEGBQ1pyhYzUdbxD5SAMttJ8y0Hj 3/jYRjNAj1wZ5N0owFsDya862H04pVRUOMvJGBdCwuDF5FyK4gJ1HeQ03FywG/yrJgVD 0iTizzt81dgWaWbjd3juAhf7QVFGxRnAjOkT9m1eEw6Ik+TsP1uJlx3dWVRMJIfi9Jdc hmlTDJvHkWuX0MqseAO6w5oMytocdjw0SvvX7vwID/1xNCK2QwYkIJMiWBNoSxOdpN9l +LWvFAIF6/TrAh0vlyORE3IfO0fc3Qhldl9h6xU8E0QoJeiyn9Mw0xrCDaQZLIkDs6rD V5Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=YSH25QJ701RLQgeF8YRi7XonW53hGqVrK4CPVUxgUHs=; b=niaP0wQB9iu4PRPrLlbWEIQRkf4oHXyvJQvltlGE3XP45I08ho8gKHvUWfn97iK5Ev nqpdbITpyeSb1i3/hPnL6zOFWfEu4XJvk6NsIEr5dGoqSOJOO1JeKCGbuik5nuWulveE EMaqKLuuOCRFrqbuT2QmbtVozjEbBviFThVH+XL2SWLv7PJIzygwr69lbtgbxvxurm8p GC/68Yqs1cS3532Zt4PZ2ExGaT7z5EzzP3mAVqQ2b0k/X96R3VkdlCX5Tf8OemMG6Yaj PRR16h/ZEcpvwap6INr5AGQzFNKoYV9TYGrl7vtL6SjKbie3lQieQqOWmQSBLuf1Fv5Y 1D8Q== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6si13115819otq.115.2020.02.05.01.08.06; Wed, 05 Feb 2020 01:08:20 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728143AbgBEJGo (ORCPT + 99 others); Wed, 5 Feb 2020 04:06:44 -0500 Received: from mga07.intel.com ([134.134.136.100]:63399 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgBEJGn (ORCPT ); Wed, 5 Feb 2020 04:06:43 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2020 01:06:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,405,1574150400"; d="scan'208";a="404085684" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga005.jf.intel.com with ESMTP; 05 Feb 2020 01:06:37 -0800 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1izGdq-0008JD-Ad; Wed, 05 Feb 2020 11:06:38 +0200 Date: Wed, 5 Feb 2020 11:06:38 +0200 From: Andy Shevchenko To: Kai-Heng Feng Cc: davem@davemloft.ne, mkubecek@suse.cz, jeffrey.t.kirsher@intel.com, "David S. Miller" , Jakub Kicinski , Jiri Pirko , Pablo Neira Ayuso , Maxime Chevallier , Heiner Kallweit , Florian Fainelli , Greg Kroah-Hartman , Ido Schimmel , Jouni Hogander , YueHaibing , Eric Dumazet , Wang Hai , Thomas Gleixner , Li RongQing , open list , "open list:NETWORKING [GENERAL]" Subject: Re: [PATCH v2 2/2] net-sysfs: Ensure begin/complete are called in speed_show() and duplex_show() Message-ID: <20200205090638.GS10400@smile.fi.intel.com> References: <20200205081616.18378-1-kai.heng.feng@canonical.com> <20200205081616.18378-2-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200205081616.18378-2-kai.heng.feng@canonical.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 05, 2020 at 04:16:16PM +0800, Kai-Heng Feng wrote: > Device like igb gets runtime suspended when there's no link partner. We > can't get correct speed under that state: > $ cat /sys/class/net/enp3s0/speed > 1000 > > In addition to that, an error can also be spotted in dmesg: > [ 385.991957] igb 0000:03:00.0 enp3s0: PCIe link lost > > It's because the igb device doesn't get runtime resumed before calling > get_link_ksettings(). > > So let's use a new helper to call begin() and complete() like what > dev_ethtool() does, to runtime resume/suspend or power up/down the > device properly. > > Once this fix is in place, igb can show the speed correctly without link > partner: > $ cat /sys/class/net/enp3s0/speed > -1 What is the meaning of -1? Does it tells us "Hey, something is bad in hardware I can't tell you the speed" or does it imply anything else? Wouldn't be better to report 0? Where is the documentation part of this ABI change? -- With Best Regards, Andy Shevchenko