Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3536865ybk; Tue, 19 May 2020 07:06:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyOgwLA2dgakoKiYAYS5h2eEJ3aAaqRwSFAK4EVCfhyfbxPNI2zyFRfqsfcWu3RbajlM1x X-Received: by 2002:a17:906:3584:: with SMTP id o4mr19645706ejb.70.1589897183840; Tue, 19 May 2020 07:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589897183; cv=none; d=google.com; s=arc-20160816; b=ondprxe3mGEqBty7ZYmeZ8pjE7SwrfdeoUskv1JmYIP5dR9T31ufJgYAZWcM2NohS+ 4vEKhnjDx51vMuRzrvQS99eeJUo8dVTzrPpnUzkCcmK3NkpvwI7tNdbFA7pEaH6TVhRk EfVox1XuGQpCtZYF9tktvgtkJpBLwaTLtqt2IT3hfkbfOkZgtQtHZ9Bg25QZUFVwJhsK mrsWBeD4IdCzUx6AedQpZS8Ti3yhOZh/umO73H6/5l0AK33vWNURgrAl9hyFpgftqYtG 9GNzm0m18GegGdByetemAT9jY8TnZgcUJXQOCDWhfw0JR132ypR7KS0tkuzNJMOydW64 dizw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TN/CXi3D/lMLDHmyY1ueBQoAKOPRiUPLI1/uNun8uT0=; b=gO9trMHCwqOo7GPYbvjm9OmsADHNVABco2OTOFjlcKew7NUbDqgezTbbDYB+bUMixH VmIC5aGQCaA08ZBh1ANvcaZAS/tLL9enYGj4FmgqB9hkSBAMptZz36kxovid4WsqKm1o wnBKHzpQZiJ/ysd14P/VYaQ9eoElPm/bFtOPeQXbir1iB7cCu/O3cjncf0QV6Dab0wUA PWQu1Ut4yLM4pXOxSm7GMYwTi/SFmTIkyhVpB3bHN5PFAMKI8D1FepL6gwMrAAig+J4m oTC4p9MfO+Tc7gO8SXUN1KZdIKqJUiQ78qQeZmMglnjVR4lhyx/27DIgol8NxA/HEShX 18VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=Fhdjhq9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb26si8596173ejb.196.2020.05.19.07.05.59; Tue, 19 May 2020 07:06:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=Fhdjhq9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728997AbgESOD6 (ORCPT + 99 others); Tue, 19 May 2020 10:03:58 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:38936 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727057AbgESOD6 (ORCPT ); Tue, 19 May 2020 10:03:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TN/CXi3D/lMLDHmyY1ueBQoAKOPRiUPLI1/uNun8uT0=; b=Fhdjhq9m3Obnk9hioP6xSMePcy LY1tyVoFYi3HMZGdViE0MSjBC7VXxsh0I0gjMHR56K30eHa5AsIaXLGylm19WpjkT6bAEgepycKo+ sosGEMbPKYvaajp2Vgv8pPdY1ue1x0Q7PlsaJJ3JjKiN0ovAML7qQDfTmt3eP5YiEI7w=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jb2qS-002iHN-PC; Tue, 19 May 2020 16:03:48 +0200 Date: Tue, 19 May 2020 16:03:48 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: "David S. Miller" , Florian Fainelli , Heiner Kallweit , Jakub Kicinski , Jonathan Corbet , Michal Kubecek , David Jander , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Russell King , mkl@pengutronix.de, Marek Vasut , Christian Herber Subject: Re: [PATCH net-next v1 1/2] ethtool: provide UAPI for PHY Signal Quality Index (SQI) Message-ID: <20200519140348.GI624248@lunn.ch> References: <20200519075200.24631-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200519075200.24631-1-o.rempel@pengutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > --- a/net/ethtool/common.c > +++ b/net/ethtool/common.c > @@ -310,6 +310,16 @@ int __ethtool_get_link(struct net_device *dev) > return netif_running(dev) && dev->ethtool_ops->get_link(dev); > } > > +int __ethtool_get_sqi(struct net_device *dev) > +{ > + struct phy_device *phydev = dev->phydev; > + > + if (!phydev->drv->get_sqi) > + return -EOPNOTSUPP; > + > + return phydev->drv->get_sqi(phydev); > +} > + You are only providing access via netlink ethtool? There is no ioctl method to get this. If so, i wonder if common.c is the correct place for this, or if it should be moved into linkstate.c. You can then drop the __. Michal? Andrew