Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp695335img; Thu, 28 Feb 2019 06:28:55 -0800 (PST) X-Google-Smtp-Source: AHgI3IaQHwNgvOC4LSVshR2p7EaMqrZxCIO/fk+5xTqz3UqR1X2zpqpHA5ahR7uzmleg7/1vs5Nc X-Received: by 2002:a63:4509:: with SMTP id s9mr8647187pga.420.1551364135349; Thu, 28 Feb 2019 06:28:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551364135; cv=none; d=google.com; s=arc-20160816; b=gmCpeQodIlYTuYwcXuYQzGJNYa5YOBsJG6+YekT18mlbMFvYQH9XAf/XTwa81xJIjV YhMQDq2CJHmzTrFz47yJgGV69S7XyE5gcdSCkDQl7kJV0TbN0UtOf9416GXI41N5xIs8 35aWHqTkFr9fCqZsV6IlKw7SSLZzKClgF/hfYRJ+i38QuBBDP2RkaHhcsH+SaleMsA0n K9X/t57vY9Lg+5B1CaV402zxfQZ9U1186ovLryX6Vb3xOmpXGRT7g71VpGIWFlSsNx4g H54VfbcexABA0Qb7VGBrbqsda2SotgA46k0AmRy9sY4GYl+eNsFM9OWOWEHlr7D8hZJD 9aLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PruYnDGHuGwDCaBY1Iw2m5uMVL1Msp/oHSP0q55Admw=; b=oPMEE9H2rtoSsPflzggAgPFZjwPTkivjYaT9b4ce8eKBlP8sAlCrXcRADUqYloHQYx mjSe7p1K9weQH9rciJ7k5wcxnjr/JmaZ4tYEmNEm1h2GcpwbFzHBqVXD8BJr1DHsjg2a QN1hDW5RRL9eA4iGMVrsfVV+QzYdlLJkKA4XftzDkjVrgWVGUgTEwbr6LO9MdDh+N+dF MVlHi1MpyplxjuW/uJwomTJQvbWL2B0ez5EmczmcL43vtXmeK77BbMXpRSM9bdI8NAcB WRDbvMp0G/JTncTqJOkho17Xwk77/FH4W6kFZAy5mL4euanRt9PA9pok2B9wjLdw77C8 hwpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si17896707pfi.150.2019.02.28.06.28.39; Thu, 28 Feb 2019 06:28:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732827AbfB1NZW (ORCPT + 99 others); Thu, 28 Feb 2019 08:25:22 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:52035 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732669AbfB1NZR (ORCPT ); Thu, 28 Feb 2019 08:25:17 -0500 X-Originating-IP: 90.88.147.150 Received: from localhost (aaubervilliers-681-1-27-150.w90-88.abo.wanadoo.fr [90.88.147.150]) (Authenticated sender: antoine.tenart@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id E3D3520014; Thu, 28 Feb 2019 13:25:13 +0000 (UTC) From: Antoine Tenart To: davem@davemloft.net, linux@armlinux.org.uk Cc: Antoine Tenart , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, maxime.chevallier@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, ymarkman@marvell.com, mw@semihalf.com Subject: [PATCH net-next 05/15] net: mvpp2: reconfiguring the port interface is PPv2.2 specific Date: Thu, 28 Feb 2019 14:21:18 +0100 Message-Id: <20190228132128.30154-6-antoine.tenart@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190228132128.30154-1-antoine.tenart@bootlin.com> References: <20190228132128.30154-1-antoine.tenart@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 ++++++-------- 1 file 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 71a3fdb76b12..204cae75a05b 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -4673,16 +4673,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 */ @@ -4696,7 +4694,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); -- 2.20.1