lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Jul 2015 17:22:36 -0700
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Stas Sergeev <stsp@...t.ru>, netdev <netdev@...r.kernel.org>
CC:	Linux kernel <linux-kernel@...r.kernel.org>,
	Sebastien Rannou <mxs@...k.org>,
	Arnaud Ebalard <arno@...isbad.org>,
	Stas Sergeev <stsp@...rs.sourceforge.net>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Grant Likely <grant.likely@...aro.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH 2/3] of_mdio: add new DT property 'autoneg' for fixed-link

On 10/07/15 14:02, Stas Sergeev wrote:
> 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?

Yes, I could think about I2C or SPI PHYs that you could use alongside an
Ethernet controller that would qualify for out-of-band, not in-band, yet
could still provide auto-negotiation. You may have special hardware with
such a SPI or I2C controller which provides automatic decoding of the
auto-neg registers. Have not looked at e.g: SFP form factors or fiber
links, but they could also have additional out-of-band type of
auto-negotiation available.

> If the answer is yes (even theoretically), then
> autoneg = "in-band" | "off"
> may make sense. Otherwise boolean just looks enough.

I think the answer is yes.

> 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.

Right, if auto-negotiation was defined outside of fixed-link, that is
indeed how I would also specify this.

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

I prefer excess of information rather than lack of information, because
you can always choose what to do with it. Especially when it comes to
Device Tree, plan carefully :)
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ