Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933249AbbGJUlj (ORCPT ); Fri, 10 Jul 2015 16:41:39 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:34777 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932944AbbGJUl3 (ORCPT ); Fri, 10 Jul 2015 16:41:29 -0400 Message-ID: <55A02D90.8090903@gmail.com> Date: Fri, 10 Jul 2015 13:39:44 -0700 From: Florian Fainelli User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Stas Sergeev , netdev CC: Linux kernel , Sebastien Rannou , Arnaud Ebalard , Stas Sergeev , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Grant Likely , "devicetree@vger.kernel.org" Subject: Re: [PATCH 2/3] of_mdio: add new DT property 'autoneg' for fixed-link References: <559FF511.5080102@list.ru> <559FF63E.8020209@list.ru> <55A010F9.7030808@gmail.com> <55A02656.7020508@list.ru> In-Reply-To: <55A02656.7020508@list.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3644 Lines: 91 On 10/07/15 13:08, Stas Sergeev wrote: > 10.07.2015 21:37, Florian Fainelli пишет: >> On 10/07/15 09:43, Stas Sergeev wrote: >>> Currently for fixed-link the MAC driver decides whether to use the >>> link status auto-negotiation or not. >>> Unfortunately the auto-negotiation may not work when expected by >>> the MAC driver. Sebastien Rannou explains: >>> << Yes, I confirm that my HW does not generate an in-band status. >>> AFAIK, it's >>> a PHY that aggregates 4xSGMIIs to 1xQSGMII ; the MAC side of the PHY >>> (with >>> inband status) is connected to the switch through QSGMII, and in this >>> context >>> we are on the media side of the PHY. >> >>> https://lkml.org/lkml/2015/7/10/206 >>> >>> This patch introduces the new boolean property 'autoneg' that allows >>> the user to request the auto-negotiation explicitly. >> The implementation looks better, but the name might still be slightly >> controversial. I would go with "use-in-band-status" which is more >> strictly defined than "autoneg" which could mean anything and everything. >> >> What do you think? > I actually think autoneg is a bit better. > > - Autonegotiation is a widely used and known term: > https://en.wikipedia.org/wiki/Autonegotiation > And who knows what in-band status is? You and I apparently do because otherwise you would not have ran into this problem and more generally, anyone having some mild exposure to the (S|R)GMII protocols should at some point, but that is a pointless argument. > And, more importantly, who knows what is it used for? > Who even knows it is used for autonegotiation? It is not about what do people know most, it is about being accurate and specific. > > - When we set autoneg for fixed-link, we basically just > say "no MDIO here, but please do autoneg by any other > means, if possible". I agree with this. > > - in-band status is an implementation delail, and it is > specific to a particular protocols. If you request the > in-band status for some protocol that doesn't support > it, perhaps you should get -EINVAL, because such a > config makes no sense. With autonegotiation, the rules > are not that strict: it can be "unimplemented", which doesn't > necessary mean nonsense in the config. So by specifying "autoneg", you are not specific about the kind of auto-negotiation protocol available, which is precisely my point: you need to go down to that level of detail for this to be useful. So maybe something like: autoneg = "in-band-status" would actually be a better thing in terms of description because then you would tell what can be made available/working? > > - autonegotiation is a wider term, and may be implemented > by some other means than the in-band status (which is > probably impossible for a fixed-link though). > > - In the terms that the driver uses, it is autonegotiation, eg > MVNETA_GMAC_AUTONEG_CONFIG. And when you go down > the implementation details, you see MVNETA_GMAC_INBAND_AN_ENABLE, > which is just one AN bit of many. But arguably, there could be another auto-negotiation method, which is not in-band status related, which means that you would need a way to distinguish between using in-band status, or using something else or nothing, would not you? > > So I really would prefer to keep things as is. > But if you insist, I can rename, but there will still be no > -EINVAL checks for obviously wrong configs. -- Florian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/