netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] net: dsa: mv88e6xxx: fix RGMII-ID port setup
@ 2019-08-11 15:08 Marek Behún
  2019-08-11 15:08 ` [PATCH net-next 2/2] net: fixed_phy: set is_gigabit_capable member when needed Marek Behún
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Marek Behún @ 2019-08-11 15:08 UTC (permalink / raw)
  To: netdev
  Cc: Marek Behún, Heiner Kallweit, Sebastian Reichel,
	Vivien Didelot, Andrew Lunn, Florian Fainelli, David S . Miller

The mv88e6xxx_port_setup_mac looks if one of the {link, speed, duplex}
parameters is being changed from the current setting, and if not, does
not do anything. This test is wrong in some situations: this method also
has the mode argument, which can also be changed.

For example on Turris Omnia, the mode is PHY_INTERFACE_MODE_RGMII_ID,
which has to be set byt the ->port_set_rgmii_delay method. The test does
not look if mode is being changed (in fact there is currently no method
to determine port mode as phy_interface_t type).

The simplest solution seems to be to drop this test altogether and
simply do the setup when requested.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 2e8b1ab2c6f7..aae63f6515b3 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -420,15 +420,6 @@ int mv88e6xxx_port_setup_mac(struct mv88e6xxx_chip *chip, int port, int link,
 	if (err)
 		return err;
 
-	/* Has anything actually changed? We don't expect the
-	 * interface mode to change without one of the other
-	 * parameters also changing
-	 */
-	if (state.link == link &&
-	    state.speed == speed &&
-	    state.duplex == duplex)
-		return 0;
-
 	/* Port's MAC control must not be changed unless the link is down */
 	err = chip->info->ops->port_set_link(chip, port, 0);
 	if (err)
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-08-13 15:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-11 15:08 [PATCH net-next 1/2] net: dsa: mv88e6xxx: fix RGMII-ID port setup Marek Behún
2019-08-11 15:08 ` [PATCH net-next 2/2] net: fixed_phy: set is_gigabit_capable member when needed Marek Behún
2019-08-11 15:40   ` Andrew Lunn
2019-08-11 16:08     ` Marek Behun
2019-08-11 16:59       ` Heiner Kallweit
2019-08-11 15:31 ` [PATCH net-next 1/2] net: dsa: mv88e6xxx: fix RGMII-ID port setup Andrew Lunn
2019-08-11 16:14   ` Marek Behun
2019-08-11 16:51     ` Andrew Lunn
2019-08-13 15:44       ` Marek Behún
2019-08-13 15:51         ` Marek Behún
2019-08-13 15:52         ` Andrew Lunn
2019-08-12  9:23 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).