Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp638698img; Thu, 28 Feb 2019 05:34:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ9rpJBB/D/lgl2L3FpgOEMxZdMpmES0+E/is6q0440vdT105GGRKpAgi406lF3IPOqLrOR X-Received: by 2002:a63:3648:: with SMTP id d69mr8528185pga.314.1551360891159; Thu, 28 Feb 2019 05:34:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551360891; cv=none; d=google.com; s=arc-20160816; b=Dx4ZteJLSjsXpw1DpJyvCn4dgJSXVYasg4xbOu22vfUGXlIFl8BKCAKh0aVF5OpZYo 5UaSlbKW6SDJaasSaAeFjqUoVsDh8OFyeYrjrMBPnxXcRHGPaUxADUHFuQrQ9T+6GJBt v7hLW9aEsEqZHhycq6s3vxl++fdBcDCUVgNCBVMo7ipJCjy016/UipolNyDHvISw45YE AbPOI9ihoHukp6VSbjvooILygYoM/o3ELB00IBnySQR7e9nx85Uv7/BLC2wG1ZrLMbP1 kjEzAlkfmF2IhrNmLfcaDZDcDLcOD3x35KazwIb6SToIjIWcHyAjnxz0oi4yTZvg5Vfk 9mWA== 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=KYTAKAn4/hg6cQs9fgETX9fzsI7vM/KmbfRdh3vZ4I8=; b=p+7wuxwqKx9SpWpi6PpKTD5YWvU2+mUu8V6hkP9HGf+BK/5pJTSyffoIoPE4Z3RBFo RO4pbNallbiADJ3ZTojtirbLUckd+2wmef+YERHw2UgkxvE3mwTFtSWOnNj7T5WS2nSd l3h6is0hGi4ptrbBqnC/uEXjAwdo8zXAll7nGj/RwHz02yKIV29hoPgxl8Eqpfc7L2Vl ZF+sWFZyT5duatXPL5SLMyzFhU5txWn+swyZdW3KKad+821pg9dYOhd6nKm3etEzYwy+ DIV4hhJDYL/xZpX9Hi+ugcjq9XevXu9+iC+uffr85nVGXAmSIWx7UqeB5MWF6U7x+TYe muLA== 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 w8si6153960pgl.587.2019.02.28.05.34.35; Thu, 28 Feb 2019 05:34:51 -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 S1732812AbfB1NZW (ORCPT + 99 others); Thu, 28 Feb 2019 08:25:22 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:34643 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732671AbfB1NZT (ORCPT ); Thu, 28 Feb 2019 08:25:19 -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 relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 5F922FF802; Thu, 28 Feb 2019 13:25:16 +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 06/15] net: mvpp2: fix validate for PPv2.1 Date: Thu, 28 Feb 2019 14:21:19 +0100 Message-Id: <20190228132128.30154-7-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 The Phylink validate function is the Marvell PPv2 driver makes a check on the GoP id. This is valid an has to be done when using PPv2.2 engines but makes no sense when using PPv2.1. The check done when using an RGMII interface makes sure the GoP id is not 0, but this breaks PPv2.1. Fixes it. Fixes: 0fb628f0f250 ("net: mvpp2: fix phylink handling of invalid PHY modes") Signed-off-by: Antoine Tenart --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 204cae75a05b..24cee6cbe309 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -4364,7 +4364,7 @@ static void mvpp2_phylink_validate(struct net_device *dev, case PHY_INTERFACE_MODE_RGMII_ID: case PHY_INTERFACE_MODE_RGMII_RXID: case PHY_INTERFACE_MODE_RGMII_TXID: - if (port->gop_id == 0) + if (port->priv->hw_version == MVPP22 && port->gop_id == 0) goto empty_set; break; default: -- 2.20.1