net: phy: let phy_speed_down/up support speeds >1Gbps
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 12 Aug 2019 21:52:19 +0000 (23:52 +0200)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 14 Aug 2019 00:14:06 +0000 (17:14 -0700)
commit65b27995a4ab8fc51b4adc6b4dcdca20f7a595bb
tree7b8814cf8b7bd2767af3c3080b20c9b9c4a2b70f
parent331c56ac73846fa267c04ee6aa9a00bb5fed9440
net: phy: let phy_speed_down/up support speeds >1Gbps

So far phy_speed_down/up can be used up to 1Gbps only. Remove this
restriction by using new helper __phy_speed_down. New member adv_old
in struct phy_device is used by phy_speed_up to restore the advertised
modes before calling phy_speed_down. Don't simply advertise what is
supported because a user may have intentionally removed modes from
advertisement.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/phy/phy.c
include/linux/phy.h