net: phy: adin: implement downshift configuration via phy-tunable
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 16 Aug 2019 13:10:09 +0000 (16:10 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Aug 2019 18:56:26 +0000 (11:56 -0700)
commit2d99b58461e111f1fd662f275f9711027bab4913
tree7547f49eede8582e43e0f28c76cf5a2bd5a397df
parentfa5bd9c5f1cdb0fa90530113056f45d699009ede
net: phy: adin: implement downshift configuration via phy-tunable

Down-speed auto-negotiation may not always be enabled, in which case the
PHY won't down-shift to 100 or 10 during auto-negotiation.

This change enables downshift and configures the number of retries to
default 4 (which is also in the datasheet

The downshift control mechanism can also be controlled via the phy-tunable
interface (ETHTOOL_PHY_DOWNSHIFT control).

The change has been adapted from the Aquantia PHY driver.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/adin.c