]> git.baikalelectronics.ru Git - kernel.git/commit
net: pcs: rzn1-miic: update speed only if interface is changed
authorClément Léger <clement.leger@bootlin.com>
Wed, 29 Jun 2022 12:20:03 +0000 (14:20 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 2 Jul 2022 02:16:00 +0000 (19:16 -0700)
commit29809860fa2d77cd0455957f6d1ed43b70d44960
tree31b0e7a71ee3c3daa269d73b8b07f8b17f07b93b
parentb11f3fad82642adf5f1b5606416857f39607a8e4
net: pcs: rzn1-miic: update speed only if interface is changed

As stated by Russel King, miic_config() can be called as a result of
ethtool setting the configuration while the link is already up. Since
the speed is also set in this function, it could potentially modify
the current speed that is set. This will only happen if there is
no PHY present and we aren't using fixed-link mode.

Handle that by storing the current interface mode in the miic_port
structure and update the speed only if the interface mode is going to
be changed.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Link: https://lore.kernel.org/r/20220629122003.189397-1-clement.leger@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/pcs/pcs-rzn1-miic.c