From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next] net: phy: switch drivers to use dynamic feature detection Date: Mon, 8 Apr 2019 00:13:12 +0200 Message-ID: <20190407221312.GA14347@lunn.ch> References: <0cc96fab-e102-c0d1-ade0-90e3e06dc9f1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <0cc96fab-e102-c0d1-ade0-90e3e06dc9f1@gmail.com> Sender: netdev-owner@vger.kernel.org To: Heiner Kallweit Cc: Florian Fainelli , David Miller , Ray Jui , Scott Branden , Richard Cochran , Kevin Hilman , Heiko Stuebner , bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org List-Id: linux-rockchip.vger.kernel.org On Sun, Apr 07, 2019 at 11:57:13AM +0200, Heiner Kallweit wrote: > Recently genphy_read_abilities() has been added that dynamically detects > clause 22 PHY abilities. I *think* this detection should work with all > supported PHY's, at least for the ones with basic features sets, i.e. > PHY_BASIC_FEATURES and PHY_GBIT_FEATURES. So let's remove setting these > features explicitly and rely on phylib feature detection. Hi Heiner We could make this a two step process, to avoid regressions. For one cycle compare genphy_read_abilities() against .features and raise a WARN_ON() if they differ. And keep using the .features value. Then a release late, complete the swap removing .features and the WARN_ON. Andrew