Commit 1ceb7ee7 authored by Russell King's avatar Russell King Committed by David S. Miller

net: phylink: update ethtool reporting for fixed-link modes

Comparing the ethtool output from phylink and non-phylink fixed-link
setups shows that we have some differences:

- The "auto-negotiation" fields are different; phylink reports these
  as "No", non-phylink reports these as "Yes" for the supported and
  advertising masks.
- The link partner advertisement is set to the link speed with non-
  phylink, but phylink leaves this unset, causing all link partner
  fields to be omitted.

The phylink ethtool output also disagrees with the software emulated
PHY dump via the MII registers.

Update the phylink fixed-link parsing code so that we better reflect
the behaviour of the non-phylink code that this facility replaces, and
bring the ethtool interface more into line with the report from via the
MII interface.
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ccbc6dac
...@@ -241,8 +241,10 @@ static int phylink_parse_fixedlink(struct phylink *pl, ...@@ -241,8 +241,10 @@ static int phylink_parse_fixedlink(struct phylink *pl,
phylink_set(pl->supported, MII); phylink_set(pl->supported, MII);
phylink_set(pl->supported, Pause); phylink_set(pl->supported, Pause);
phylink_set(pl->supported, Asym_Pause); phylink_set(pl->supported, Asym_Pause);
phylink_set(pl->supported, Autoneg);
if (s) { if (s) {
__set_bit(s->bit, pl->supported); __set_bit(s->bit, pl->supported);
__set_bit(s->bit, pl->link_config.lp_advertising);
} else { } else {
phylink_warn(pl, "fixed link %s duplex %dMbps not recognised\n", phylink_warn(pl, "fixed link %s duplex %dMbps not recognised\n",
pl->link_config.duplex == DUPLEX_FULL ? "full" : "half", pl->link_config.duplex == DUPLEX_FULL ? "full" : "half",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment