summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2019-03-01 13:52:07 +0300
committerDavid S. Miller <davem@davemloft.net>2019-03-02 10:23:34 +0300
commitd78a18091f42122d4094e8ddcaeee083198a9c17 (patch)
treefdbaf7eee2839a8ddb7ea1c0d9738152efa0a12a /drivers/net/ethernet
parent052f7c8bac4440bc5e3b2086e4134055b862453a (diff)
downloadlinux-d78a18091f42122d4094e8ddcaeee083198a9c17.tar.xz
net: mvpp2: reconfiguring the port interface is PPv2.2 specific
This patch adds a check on the PPv2 version in-use not to reconfigure the port mode when an interface is updated when using PPv2.1 as the functions called are PPv2.2 specific. Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 5a2638b7443a..9467a2258ee0 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -4672,16 +4672,14 @@ static void mvpp2_mac_config(struct net_device *dev, unsigned int mode,
/* Make sure the port is disabled when reconfiguring the mode */
mvpp2_port_disable(port);
- if (change_interface) {
+ if (port->priv->hw_version == MVPP22 && change_interface) {
mvpp22_gop_mask_irq(port);
- if (port->priv->hw_version == MVPP22) {
- port->phy_interface = state->interface;
+ port->phy_interface = state->interface;
- /* Reconfigure the serdes lanes */
- phy_power_off(port->comphy);
- mvpp22_mode_reconfigure(port);
- }
+ /* Reconfigure the serdes lanes */
+ phy_power_off(port->comphy);
+ mvpp22_mode_reconfigure(port);
}
/* mac (re)configuration */
@@ -4695,7 +4693,7 @@ static void mvpp2_mac_config(struct net_device *dev, unsigned int mode,
if (port->priv->hw_version == MVPP21 && port->flags & MVPP2_F_LOOPBACK)
mvpp2_port_loopback_set(port, state);
- if (change_interface)
+ if (port->priv->hw_version == MVPP22 && change_interface)
mvpp22_gop_unmask_irq(port);
mvpp2_port_enable(port);