From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH] net: phy: phylink: fix SFP interface autodetection Date: Sat, 22 Sep 2018 20:18:00 +0100 Message-ID: <20180922191800.GN30658@n2100.armlinux.org.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Lunn , Florian Fainelli , netdev@vger.kernel.org, Antoine Tenart , Gregory CLEMENT To: Baruch Siach Return-path: Received: from pandora.armlinux.org.uk ([78.32.30.218]:45250 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbeIWBM4 (ORCPT ); Sat, 22 Sep 2018 21:12:56 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Sep 22, 2018 at 10:09:44PM +0300, Baruch Siach wrote: > When connecting a PHY to phylink use the detected interface. Otherwise, > the link fails to come up when the configured 'phy-mode' differs from > the SFP detected mode. > > This fixes 1GB SFP module link up on eth3 of the Macchiatobin board that > is configured in the DT to "2500base-x" phy-mode. What I actually meant is that a PHY attached from a SFP interface should use link_config.interface. A PHY attached as not part of a SFP interface should continue using the DT-parsed link_interface. What I envisaged seeing is phylink_connect_phy() being renamed to __phylink_connect_phy(), and taking the phy interface, phylink_sfp_connect_phy() calling __phylink_connect_phy() with link_config.interface, and a replacement phylink_connect_phy() which called __phylink_connect_phy() with link_interface. Sorry I wasn't explicit enough last time around. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 13.8Mbps down 630kbps up According to speedtest.net: 13Mbps down 490kbps up