Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp33146pxf; Wed, 31 Mar 2021 15:45:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+iTuZubBSeoKarIfgui1bs2YZQngLL/HJCKnG0W3p7uY+r6nM4NuHhCU44Ds/JFB8Kp13 X-Received: by 2002:a17:906:5e50:: with SMTP id b16mr6271211eju.272.1617230738906; Wed, 31 Mar 2021 15:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617230738; cv=none; d=google.com; s=arc-20160816; b=az1HafjFThEUIiEBf0yi2ZXUtj4FS1Qvms9jebqOeOCjRnyocbNiwaAxzSs4W68Iag VjJgFmUDFOfzt2i3M0oRW/YRQMyfS6Blzgi0njfJIC8bvw5CbSe35JBPKRfjtyQMtLZV vUju8WxNOgx0Jm7kDKDOVdp30rsq8ZQkYE2QegEKqdUmNVa5+1ZhVo/knT+S+VN4Dq6y jK11IOMHImcAAjFYQ9vdz03gr7Ng3QV0bcETaAbjj8Ye+KVoymcpAarRshrML1rI7KZp VH/7r7KPKUhbx1UgJkDwd9wlzIBYFgz75ERkmyD0s4xsGRpCYnvj5lKF3UmDIU40sR6v lMJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=8rqnv/Mn2d10UE3cZTc2hUIuLEMcURt+KlF+KGkzJlk=; b=GhO0YSa/7yrf09x0FKm2SuPyep2EyzazL+p/I9oRm/f/c/LvIPv+MwM3Fp3h5MBfGs 8AIzt+VtI52sYSa0InHS6D/TyYTJF6/uGex6DSsoNqs0BUPIUo4mOpl40qwkjBOYTCFi jH56cAjnefvoq8IK9W3d4znCqSWHt6GQSrJNdlo6NCm+V8epZAM9Pxb2wXLLo8FZREmx Gl5k6mXfXUFF51qK5oorgow3rDavbtqkHWC1xUzpvGkzLRg1L/N5Enq7UzhfWWW5qunV DRNv+D87aRAc8PO4VT7IsIWSl2PJKsMV36l4erL9gzK3u1UzADpU/E6DbH0F9WAR8Ls/ B77Q== ARC-Authentication-Results: i=1; mx.google.com; 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 hc31si2706981ejc.524.2021.03.31.15.45.16; Wed, 31 Mar 2021 15:45:38 -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; 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 S232988AbhCaWoY (ORCPT + 99 others); Wed, 31 Mar 2021 18:44:24 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:57164 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232718AbhCaWnt (ORCPT ); Wed, 31 Mar 2021 18:43:49 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lRjYt-00EFFS-L6; Thu, 01 Apr 2021 00:43:43 +0200 Date: Thu, 1 Apr 2021 00:43:43 +0200 From: Andrew Lunn To: Grant Grundler Cc: Oliver Neukum , Jakub Kicinski , Roland Dreier , nic_swsd , netdev , "David S . Miller" , LKML , Grant Grundler Subject: Re: [PATCHv4 4/4] net: cdc_ether: record speed in status method Message-ID: References: <20210330021651.30906-1-grundler@chromium.org> <20210330021651.30906-5-grundler@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210330021651.30906-5-grundler@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 29, 2021 at 07:16:51PM -0700, Grant Grundler wrote: > From: Grant Grundler > > Until very recently, the usbnet framework only had support functions > for devices which reported the link speed by explicitly querying the > PHY over a MDIO interface. However, the cdc_ether devices send > notifications when the link state or link speeds change and do not > expose the PHY (or modem) directly. > > Support funtions (e.g. usbnet_get_link_ksettings_internal()) to directly > query state recorded by the cdc_ether driver were added in a previous patch. > > Instead of cdc_ether spewing the link speed into the dmesg buffer, > record the link speed encoded in these notifications and tell the > usbnet framework to use the new functions to get link speed/state. > > User space can now get the most recent link speed/state using ethtool. > > v4: added to series since cdc_ether uses same notifications > as cdc_ncm driver. > > Signed-off-by: Grant Grundler Reviewed-by: Andrew Lunn Andrew