Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp470981yba; Wed, 15 May 2019 04:42:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo/ZKpuwcqWko8/FNFbkseYHhXf69d+XIKv02fzpleU28cXRyT3PFltui9dbOGLTxpZa4G X-Received: by 2002:a17:902:a585:: with SMTP id az5mr42878039plb.261.1557920576236; Wed, 15 May 2019 04:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557920576; cv=none; d=google.com; s=arc-20160816; b=ggS//P0fJHfl/9V+dFYXSOsxQtnkSYOG70okND0rUtZo4XvImqhGRbAxSp3GClX2QY 83T79q0Xkl8tx6beLMIEJMrVDrOzS9WfzMHzQjYCgDKFp38P1yIhTjmUqMm586ZRZoXR Ghh//M1o+FaiAON8bl+7M/MztaVidf/tEMqdtaGn6QEboKuIv5sV0e3JhX7PTsFHT4do pDiqfB3NIARMBpcltrp0S1qEjf20hGVC+35QJaLBuThByuVGo04Q1strHG8BepLgAsYp f1Xv1zIECH6Fi44I4jZhm74aRcKzqzekYsiNdRuhmXi8JB4hkPzofNnWkZGBZbtC3I7z uHAw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=As+oayRL2PxD6omdQI+3NMnY95SwgFdXagWUOcXKkc8=; b=wEgQFU0cRfUVhhnrhpCIP4PNlu4JwjFe1W2kQOrWxjv06SMDhXFb4nZiL3APyTpymh sI/m5a7GQpQrwXE/7FIYbgRqzQKRMgXv6Y1sJd6hwFtsCSvWSKKtzgp0rwI2g59UjEIQ aT1UQJXdm88pEt5ArIYtVETW4TD3LqaTLbCtTX308KuDq2BI+iu5sYu1MF/TnY2Dn27v SDOVcAqPUe6IM9xd6ApoP8F2Uo2wpI2O1HdrKPRwXOGYkBZkHTHlnL6NxQv72i35cX8E cSeduLG/zJMJOMwf0kRRbiVSPyE000/tIqzNi3GOxQeP89UWVrn3vqZQXLbuYfGEz4EG z7+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=u8jyptoB; 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 e37si1628913plb.10.2019.05.15.04.42.41; Wed, 15 May 2019 04:42:56 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=u8jyptoB; 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 S1731696AbfEOLjl (ORCPT + 99 others); Wed, 15 May 2019 07:39:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:41494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732656AbfEOLaC (ORCPT ); Wed, 15 May 2019 07:30:02 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B735220843; Wed, 15 May 2019 11:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919802; bh=UH5XIeSq/ssCBru59d4EIMimGVZsa7U5Hko6QUt3ygI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u8jyptoBBet1GCA1Z+J0DHf+BHsMyIvhViXUck4wo6oBKsYFlzIqfFb0pkX4fVtTG oKR1yCKKeVv5E8B+iwMa2sfyb5qgLsexnuTHt5vpMuR+4YgcEp0J+No0Jt1KkxIcxx oaAN7LOp5czKaFwhBYPyv9oJ/3rUDRXRVIXVujnc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antoine Tenart , "David S. Miller" , Sasha Levin Subject: [PATCH 5.0 099/137] net: mvpp2: fix validate for PPv2.1 Date: Wed, 15 May 2019 12:56:20 +0200 Message-Id: <20190515090700.717144179@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 8b318f30ab4ef9bbc1241e6f8c1db366dbd347f2 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 931beac3359d1..70031e2b22944 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -4370,7 +4370,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