Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp33591pxf; Wed, 31 Mar 2021 15:46:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTMhWkULW36jZUxM8NNozYsExuibZLNuwrUx5AqU3InuuFlXOx4W8d5j//+qJVg5mzTHz1 X-Received: by 2002:a17:906:a44f:: with SMTP id cb15mr6027256ejb.420.1617230789703; Wed, 31 Mar 2021 15:46:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617230789; cv=none; d=google.com; s=arc-20160816; b=Z4OSXFsOQk+j9dHxHd1QYdD35O7LV+VvaekLFk4e7znhyvuu2ZdqZFPSfFyv290kfM nwjBtLul/RSJxUsHPgUxddIOHJ464yYOLLqtjeTMFVEVRtARASRupx0EuMIFobrvoa7X A1NbkpaITtMC9ikiXD20yViQSr5X4qglmimkcaV6P2KVWu90m9GQl9XZeGi1gexZtMeT 3GYDTKNMtcmwovxg9xtmENDSOnEkYF+t2OBJCUeJt/RE8BMvgK2K699RuBq9QPeDiN1t hn5iVOuq0z1Fyo9QJ3qsD/Rcc7hoXPLE4AxZNBRYmlW/JruAo51HGnqCOPJicoarOqJ8 mrOQ== 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=H7ka0IlBTLiPL/ThJh5uWAAUtWuybMFNnOz50DiV/5g=; b=HvZGtK4O09/tUOHUWt5bQ19h6G2OywpiUIdNZustA93aqNwwaxMKQlkieR2byuQ0Fr zUxPjTiCLiQLUp3FkFWUPdNcjM5NL9jaCKEOeCgCcfTpywKlVDxJ7yQaNAjwlHUIldY4 NHqprKmjaVSlFSvNd94ZK1AHP0xnO36h7klFixFGi09fTf3ZrtmaFW9EXR42Pmqt1F5d VyCAu3i4PL7waUJV6iK3rwGnQ/s1RGRIIueVXQdQdQlWsMK/jxoZw2O6cagCcH8rY/sm EJVn2jmsMD66kNuJZNBylR3+awMT01BmGyy1iPlUkzHkpeWUXDj4jZsV9ZzByYWZTGyE aLAA== 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 g25si2823381ejf.697.2021.03.31.15.46.06; Wed, 31 Mar 2021 15:46:29 -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 S232540AbhCaWnH (ORCPT + 99 others); Wed, 31 Mar 2021 18:43:07 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:57150 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232718AbhCaWme (ORCPT ); Wed, 31 Mar 2021 18:42:34 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lRjXf-00EFEU-SN; Thu, 01 Apr 2021 00:42:27 +0200 Date: Thu, 1 Apr 2021 00:42:27 +0200 From: Andrew Lunn To: Grant Grundler Cc: Oliver Neukum , Jakub Kicinski , Roland Dreier , nic_swsd , netdev , "David S . Miller" , LKML Subject: Re: [PATCHv4 3/4] net: cdc_ncm: record speed in status method Message-ID: References: <20210330021651.30906-1-grundler@chromium.org> <20210330021651.30906-4-grundler@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210330021651.30906-4-grundler@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 29, 2021 at 07:16:50PM -0700, Grant Grundler wrote: > From: Oliver Neukum > > 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_ncm 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_ncm driver were added in a previous patch. > > So instead of cdc_ncm 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. > Link speed/state is now available via ethtool. > > This is especially useful given all current RTL8156 devices emit > a connection/speed status notification every 32ms and this would > fill the dmesg buffer. This implementation replaces the one > recently submitted in de658a195ee23ca6aaffe197d1d2ea040beea0a2 : > "net: usb: cdc_ncm: don't spew notifications" > > v2: rebased on upstream > v3: changed variable names > v4: rewrote commit message > > Signed-off-by: Oliver Neukum > Tested-by: Roland Dreier > Signed-off-by: Grant Grundler Reviewed-by: Andrew Lunn Andrew