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=ham 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 271FEC43461 for ; Wed, 31 Mar 2021 22:44:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0211A610C9 for ; Wed, 31 Mar 2021 22:44:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232902AbhCaWoT (ORCPT ); Wed, 31 Mar 2021 18:44:19 -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: netdev@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