All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp-cmBhpYW9OiY@public.gmane.org>
To: Florian Fainelli
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Linux kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Sebastien Rannou <mxs-i6rsG8ix9II@public.gmane.org>,
	Arnaud Ebalard <arno-LkuqDEemtHBg9hUCZPvPmw@public.gmane.org>,
	Stas Sergeev
	<stsp-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/3] of_mdio: add new DT property 'autoneg' for fixed-link
Date: Sat, 11 Jul 2015 00:02:45 +0300	[thread overview]
Message-ID: <55A032F5.8020801@list.ru> (raw)
In-Reply-To: <55A02D90.8090903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

10.07.2015 23:39, Florian Fainelli пишет:
>> - 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?
I would agree with this if your argument below is true (see below).

>> - 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?
"something else" is a big question here.
Can you think of _any_ other way that is both not an MDIO
(suits to fixed-link) and not an in-band?
If the answer is yes (even theoretically), then
autoneg = "in-band" | "off"
may make sense. Otherwise boolean just looks enough.
If we would implement autoneg outside of the fixed-link,
then its semantic would likely be
autoneg = "mdio" | "in-band" | "off"
But the fact that we put it under fixed-link where only a
single AN possibility exist, may probably be underlined by
a semantic specific to fixed-link.

One may also argue that
autoneg = "any-possible-autoneg-that-works" is better than
specifying it explicitly, which is exactly what the boolean does.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Stas Sergeev <stsp@list.ru>
To: Florian Fainelli <f.fainelli@gmail.com>, netdev <netdev@vger.kernel.org>
Cc: Linux kernel <linux-kernel@vger.kernel.org>,
	Sebastien Rannou <mxs@sbrk.org>,
	Arnaud Ebalard <arno@natisbad.org>,
	Stas Sergeev <stsp@users.sourceforge.net>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Grant Likely <grant.likely@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/3] of_mdio: add new DT property 'autoneg' for fixed-link
Date: Sat, 11 Jul 2015 00:02:45 +0300	[thread overview]
Message-ID: <55A032F5.8020801@list.ru> (raw)
In-Reply-To: <55A02D90.8090903@gmail.com>

10.07.2015 23:39, Florian Fainelli пишет:
>> - 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?
I would agree with this if your argument below is true (see below).

>> - 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?
"something else" is a big question here.
Can you think of _any_ other way that is both not an MDIO
(suits to fixed-link) and not an in-band?
If the answer is yes (even theoretically), then
autoneg = "in-band" | "off"
may make sense. Otherwise boolean just looks enough.
If we would implement autoneg outside of the fixed-link,
then its semantic would likely be
autoneg = "mdio" | "in-band" | "off"
But the fact that we put it under fixed-link where only a
single AN possibility exist, may probably be underlined by
a semantic specific to fixed-link.

One may also argue that
autoneg = "any-possible-autoneg-that-works" is better than
specifying it explicitly, which is exactly what the boolean does.

  parent reply	other threads:[~2015-07-10 21:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 16:38 [PATCH v2 0/2] net: enable inband link state negotiation only when explicitly requested Stas Sergeev
2015-07-10 16:41 ` [PATCH 1/3] fixed_phy: handle link-down case Stas Sergeev
2015-07-10 20:44   ` Florian Fainelli
2015-07-10 21:14     ` Stas Sergeev
2015-07-11  0:15       ` Florian Fainelli
2015-07-11  8:58         ` Stas Sergeev
     [not found] ` <559FF511.5080102-cmBhpYW9OiY@public.gmane.org>
2015-07-10 16:43   ` [PATCH 2/3] of_mdio: add new DT property 'autoneg' for fixed-link Stas Sergeev
2015-07-10 16:43     ` Stas Sergeev
2015-07-10 18:37     ` Florian Fainelli
2015-07-10 20:08       ` Stas Sergeev
     [not found]         ` <55A02656.7020508-cmBhpYW9OiY@public.gmane.org>
2015-07-10 20:39           ` Florian Fainelli
2015-07-10 20:39             ` Florian Fainelli
     [not found]             ` <55A02D90.8090903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-10 21:02               ` Stas Sergeev [this message]
2015-07-10 21:02                 ` Stas Sergeev
     [not found]                 ` <55A032F5.8020801-cmBhpYW9OiY@public.gmane.org>
2015-07-11  0:22                   ` Florian Fainelli
2015-07-11  0:22                     ` Florian Fainelli
2015-07-11  9:15                     ` Stas Sergeev
2015-07-10 16:45 ` [PATCH 3/3] mvneta: use inband status only when explicitly enabled Stas Sergeev
2015-07-10 20:31 ` [PATCH v2 0/2] net: enable inband link state negotiation only when explicitly requested Florian Fainelli
2015-07-10 20:45   ` Stas Sergeev
2015-07-13  9:54 ` Sebastien Rannou
2015-07-13  9:59   ` Stas Sergeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55A032F5.8020801@list.ru \
    --to=stsp-cmbhpyw9oiy@public.gmane.org \
    --cc=arno-LkuqDEemtHBg9hUCZPvPmw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mxs-i6rsG8ix9II@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=stsp-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.