From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next v2 09/10] r8169: remove mii_if_info member from struct rtl8169_private Date: Tue, 10 Jul 2018 23:37:26 +0200 Message-ID: <20180710213726.GA29156@lunn.ch> References: <84ac1cb7-bafd-5f15-8cda-e8dfd7d0deb3@gmail.com> <20180710210036.GK892@lunn.ch> <8b78b589-3d6c-65f4-d39a-2ce708af8220@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , Florian Fainelli , Realtek linux nic maintainers , "netdev@vger.kernel.org" To: Heiner Kallweit Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:58065 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732187AbeGJVia (ORCPT ); Tue, 10 Jul 2018 17:38:30 -0400 Content-Disposition: inline In-Reply-To: <8b78b589-3d6c-65f4-d39a-2ce708af8220@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jul 10, 2018 at 11:32:36PM +0200, Heiner Kallweit wrote: > On 10.07.2018 23:00, Andrew Lunn wrote: > >> @@ -6719,7 +6703,7 @@ static int r8169_phy_connect(struct rtl8169_private *tp) > >> if (ret) > >> return ret; > >> > >> - if (!tp->mii.supports_gmii && phydev->supported & PHY_1000BT_FEATURES) { > >> + if (!tp->supports_gmii && phydev->supported & PHY_1000BT_FEATURES) { > > > > It is better to use phy_set_max_speed() with SPEED_100 if > > tp->supports_gmii is not set. > > > Then the info message wouldn't fit any longer, it's meaningful in case > 1GBit PHY + 100MBit MAC only. What you should avoid is this part: phydev->supported & PHY_1000BT_FEATURES Because phydev->supported is going to go away sometime soon. Does anybody care about knowing they have a 1Gbit PHY connected to the 100Mbit MAC? So long as it works, i think not. Andrew