Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E0F6C61DA3 for ; Tue, 21 Feb 2023 09:48:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234012AbjBUJsV (ORCPT ); Tue, 21 Feb 2023 04:48:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232845AbjBUJsT (ORCPT ); Tue, 21 Feb 2023 04:48:19 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56BD335BB for ; Tue, 21 Feb 2023 01:48:18 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pUPFr-0004SR-FZ; Tue, 21 Feb 2023 10:48:11 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pUPFp-0000B0-Jj; Tue, 21 Feb 2023 10:48:09 +0100 Date: Tue, 21 Feb 2023 10:48:09 +0100 From: Oleksij Rempel To: "Russell King (Oracle)" Cc: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 0/4] net: phy: EEE fixes Message-ID: <20230221094809.GF19238@pengutronix.de> References: <20230221050334.578012-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 21, 2023 at 09:36:35AM +0000, Russell King (Oracle) wrote: > On Tue, Feb 21, 2023 at 06:03:30AM +0100, Oleksij Rempel wrote: > > changes v2: > > - restore previous ethtool set logic for the case where advertisements > > are not provided by user space. > > I don't think the _kernel_ should be doing this - this introduces a > different behaviour to the kernel. As I already said, setting the > default advertisement in the case of ethtool -s is done by userspace > not by the kernel. > > In fact, the kernel explicitly rejects an attempt to have autoneg > enabled with a zero advertising mask: > > linkmode_copy(advertising, cmd->link_modes.advertising); > linkmode_and(advertising, advertising, phydev->supported); > if (autoneg == AUTONEG_ENABLE && linkmode_empty(advertising)) > return -EINVAL; > > and I think we should have a uniform behaviour with the same API, > rather than different behaviours, as that becomes quite messy. I decided to revert this part to not mix different issue. This logic existed before my refactoring. So, it is better to handle it as different patch. Current patch set should address only regressions. -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |