From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH] net: phy: sfp: correct store of detected link modes Date: Thu, 29 Nov 2018 13:14:27 +0000 Message-ID: <20181129131427.GV30658@n2100.armlinux.org.uk> References: <20181129104615.GT30658@n2100.armlinux.org.uk> <87o9a86p6q.fsf@tkos.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Lunn , Florian Fainelli , netdev@vger.kernel.org To: Baruch Siach Return-path: Received: from pandora.armlinux.org.uk ([78.32.30.218]:37772 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbeK3AT6 (ORCPT ); Thu, 29 Nov 2018 19:19:58 -0500 Content-Disposition: inline In-Reply-To: <87o9a86p6q.fsf@tkos.co.il> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Nov 29, 2018 at 02:30:53PM +0200, Baruch Siach wrote: > Hi Russell, > > Russell King - ARM Linux writes: > > On Thu, Nov 29, 2018 at 12:40:11PM +0200, Baruch Siach wrote: > >> The link modes that sfp_parse_support() detects are stored in the > >> 'modes' bitmap. There is no reason to make an exception for 1000Base-PX > >> or 1000Base-BX10. > > > > I think you may be carrying some local patch, have an incorrect merge, > > or maybe there's a patch in -next which changed this. > > > > Mainline has: > > > > if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS)) { > > /* If the encoding and bit rate allows 1000baseX */ > > if (id->base.encoding == SFP_ENCODING_8B10B && br_nom && > > br_min <= 1300 && br_max >= 1200) > > phylink_set(modes, 1000baseX_Full); > > } > > > > but your patch changes that phylink_set() from: > > > > phylink_set(support, 1000baseX_Full); > > > > to: > > > > phylink_set(modes, 1000baseX_Full); > > > > which in the context of what's in mainline doesn't make sense. > > The code that this patch touches is at line 165 in current mainline as > of commit 60b548237fe: > > 162 /* 1000Base-PX or 1000Base-BX10 */ > 163 if ((id->base.e_base_px || id->base.e_base_bx10) && > 164 br_min <= 1300 && br_max >= 1200) > 165 phylink_set(support, 1000baseX_Full); > > net-next as of e561bb29b6 carries no change in this file, as far as I > can see. Ah, sorry, I was looking further down. Yes, your change is correct - it was missed in 03145864bd0fcac29e33442f39d67d4f28b0777c, so it needs a fixes tag for that commit. Probably missed by having patches hanging around for soo long. Fixes: 03145864bd0f ("sfp: support 1G BiDi (eg, FiberStore SFP-GE-BX) modules") Acked-by: Russell King Thanks! -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up