From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BBC1C433B4 for ; Wed, 31 Mar 2021 22:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8AE961078 for ; Wed, 31 Mar 2021 22:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232686AbhCaWnH (ORCPT ); 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: netdev@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