Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1641535imu; Wed, 12 Dec 2018 01:32:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/XyipbvzcjIzSSTKDVZxk00/DtzciaeKCaW9N+Nga7Zdtl6g7Eicc1uZAygE3LJLref15GE X-Received: by 2002:a63:ce08:: with SMTP id y8mr17418622pgf.388.1544607174216; Wed, 12 Dec 2018 01:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544607174; cv=none; d=google.com; s=arc-20160816; b=LC5OudErh/izfJ7w70eXGbqz3Fc/RebVo8mwC9jhkl0vFv4P0M2fEA8R0iMVlsVASu +JVE1hVSiSlYhqBDCkdh0d7H9pZRI53UaXgz7+sdEYxFpJFq4XladwjiwAaL3sUutX+8 51Yao6HdM1Lxqe0aKmn1Ew7XRclvzPrj+SMPe7qDc7eNyHRpL/zkBjZ9YLah0ZcrBHTL E3Cgw1AbQOgoHBxnOI1hrgsbvcVcSpfi1fKwAZxrmrKl2rwiY2YJXopwEeqBG7QRu0Jd 5NbCgr8QIoi4mS/Q6XWaY9DRk+zfhwW6hggPeBQeYw1GqJim3gbyAq3egHd8AKvPM6Em 2FVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/NhxCmHVdhrVg80RocR2F0p6JNLsCCr7FTqc3N3V11g=; b=Cid8mDWRc7/c5TtTkCm4WlXoAi8JRrXkMx8EB/FzOziJe3PSLLP4XUAE3sgPSLcGlK JyzCgPGA1Zn+omrD+2LlwhcpWEzEKGaadSNdA44f4EKBeNAgbfOvx3KUqBE/qLabIkuL LyfkpQzyayyCfABHGbTb78oYF7n34keTzNy/UcCuHcoZ7gn29mPNeeWlN4kAN1OG9EkO ejncTH2OnP9EoYJ1e+/F+GxBEEH8unufq8mu3WcYx+z6j4XRpuzVlfk/qxq5FK72c3Wg Fcf97XhxSHAqQYYiDvD7BAz0scP1tD99NbwQPLEXskfKe+OOeYOlwzIkSE7NTqM0M8hS lTyQ== 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 g124si13641537pgc.568.2018.12.12.01.32.30; Wed, 12 Dec 2018 01:32:54 -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 S1726824AbeLLJav (ORCPT + 99 others); Wed, 12 Dec 2018 04:30:51 -0500 Received: from mail.bootlin.com ([62.4.15.54]:55158 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726478AbeLLJav (ORCPT ); Wed, 12 Dec 2018 04:30:51 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 9536F2082C; Wed, 12 Dec 2018 10:30:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost (aaubervilliers-681-1-89-7.w90-88.abo.wanadoo.fr [90.88.30.7]) by mail.bootlin.com (Postfix) with ESMTPSA id 5EC9520731; Wed, 12 Dec 2018 10:30:38 +0100 (CET) Date: Wed, 12 Dec 2018 10:30:33 +0100 From: Antoine Tenart To: Russell King - ARM Linux Cc: Baruch Siach , Antoine Tenart , davem@davemloft.net, 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: Re: [PATCH net] net: mvpp2: 10G modes aren't supported on all ports Message-ID: <20181212093033.GA3219@kwain> References: <20181211163228.26130-1-antoine.tenart@bootlin.com> <20181211163635.GG30658@n2100.armlinux.org.uk> <877egg6jbt.fsf@tkos.co.il> <20181211185156.GH30658@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181211185156.GH30658@n2100.armlinux.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Russell, Baruch, On Tue, Dec 11, 2018 at 06:51:56PM +0000, Russell King - ARM Linux wrote: > On Tue, Dec 11, 2018 at 07:53:42PM +0200, Baruch Siach wrote: > > That is, something like this, right? > > > > diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > > index 125ea99418df..04cb0241ca2b 100644 > > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > > @@ -4404,13 +4404,18 @@ static void mvpp2_phylink_validate(struct net_device *dev, > > switch (state->interface) { > > case PHY_INTERFACE_MODE_10GKR: > > case PHY_INTERFACE_MODE_XAUI: > > + if (port->gop_id != 0) > > + goto empty_set; > > + /* Fall-through */ > > case PHY_INTERFACE_MODE_NA: > > - phylink_set(mask, 10000baseCR_Full); > > - phylink_set(mask, 10000baseSR_Full); > > - phylink_set(mask, 10000baseLR_Full); > > - phylink_set(mask, 10000baseLRM_Full); > > - phylink_set(mask, 10000baseER_Full); > > - phylink_set(mask, 10000baseKR_Full); > > + if (port->gop_id == 0) { > > + phylink_set(mask, 10000baseCR_Full); > > + phylink_set(mask, 10000baseSR_Full); > > + phylink_set(mask, 10000baseLR_Full); > > + phylink_set(mask, 10000baseLRM_Full); > > + phylink_set(mask, 10000baseER_Full); > > + phylink_set(mask, 10000baseKR_Full); > > + } > > /* Fall-through */ > > case PHY_INTERFACE_MODE_RGMII: > > case PHY_INTERFACE_MODE_RGMII_ID: > > > > Yep, looks fine to me, thanks. This looks good, thanks! I'll send a v2. Antoine -- Antoine T?nart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com