Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1250400pxf; Fri, 2 Apr 2021 05:36:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPOiGOyjIBk6ISyKywzcatovlvQauI/gm497vu8QkubkY0v70xp0OEk7aMEhd1bG/MP/An X-Received: by 2002:a17:907:689:: with SMTP id wn9mr13783889ejb.485.1617366970260; Fri, 02 Apr 2021 05:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617366970; cv=none; d=google.com; s=arc-20160816; b=QIu1OvRnGyKZY6PoT6z11CQvCEHW1KBs5H46M9CQZZwDTIg3rYYjKvqBcVxIaF1E4K OKclW2oJhrN9GDj3uj1rTUBTpDbjdGMX1WvgpShWfXAo4jajwt+d7KHEQxlYErklxEGg zsyHEZBjyjZ54gDvqA7Oj+gfZgUoiOnEZVBItQl/XTlEUr4pyrHEuQtSDzggQjoXWVzA 4sn1xujHAz+oPeG0X0wJPdahujIhUIPgAnK3a6d6bJ1EVU53sJ1B/3LktElSQZaWfJGL GzikjhB43+lD4yd7WQqL7+MAAvpAsSlaBaT8grxU5VWT9CVydKHoncAV5pPOmkqVLg/W O1qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=30H9/gq13rtkgKVKrgzllQW4QYrnR7N42eIPEmfB5vg=; b=fTUqRAztAVkJPblBuxYYN9CWP7Ynb4W2yR+VCgL5BbJidOz+76p3wbl04geZrJFH7b YD74+w8BaSk72TnhUYzQa477fpgw1OdV1PH592p2eu2zOMl7SAnSPGVtHrIkZSR9zoSr vpj4/Fajh1wkT7fQj0mJWTxNgFFIbSA1QSi2hdkaP1p9Oy06iiQMvi2z9DZWw2PmVcKg 81wFVuy1OL1piY3FqiVZmKGXgs3JjhK9Dklo7ErTq26Tzty7pCPOWl9HiVYad6N5wmMg 1xxroIUjRv8WHEXxPfIzaqsRT46UIIfzRktsVysJskQLyPslDv+LhjwvmNGnD4d9wDMT Husw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de13si6111608edb.525.2021.04.02.05.35.44; Fri, 02 Apr 2021 05:36:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235285AbhDBMfS (ORCPT + 99 others); Fri, 2 Apr 2021 08:35:18 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:60154 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbhDBMfS (ORCPT ); Fri, 2 Apr 2021 08:35:18 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lSJ0t-00EUtn-9j; Fri, 02 Apr 2021 14:34:59 +0200 Date: Fri, 2 Apr 2021 14:34:59 +0200 From: Andrew Lunn To: "Voon, Weifeng" Cc: Russell King - ARM Linux admin , "Sit, Michael Wei Hong" , "peppe.cavallaro@st.com" , "alexandre.torgue@st.com" , "joabreu@synopsys.com" , "davem@davemloft.net" , "kuba@kernel.org" , "mcoquelin.stm32@gmail.com" , "Ong, Boon Leong" , "qiangqing.zhang@nxp.com" , "Wong, Vee Khee" , "fugang.duan@nxp.com" , "Chuah, Kim Tatt" , "netdev@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "hkallweit1@gmail.com" Subject: Re: [PATCH net-next 1/2] net: stmmac: enable 2.5Gbps link speed Message-ID: References: <20210401150152.22444-1-michael.wei.hong.sit@intel.com> <20210401150152.22444-2-michael.wei.hong.sit@intel.com> <20210401151044.GZ1463@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 02, 2021 at 07:45:04AM +0000, Voon, Weifeng wrote: > > > + /* 2.5G mode only support 2500baseT full duplex only */ > > > + if (priv->plat->has_gmac4 && priv->plat->speed_2500_en) { > > > + phylink_set(mac_supported, 2500baseT_Full); > > > + phylink_set(mask, 10baseT_Half); > > > + phylink_set(mask, 10baseT_Full); > > > + phylink_set(mask, 100baseT_Half); > > > + phylink_set(mask, 100baseT_Full); > > > + phylink_set(mask, 1000baseT_Half); > > > + phylink_set(mask, 1000baseT_Full); > > > + phylink_set(mask, 1000baseKX_Full); > > > > Why? This seems at odds to the comment above? > > > What about 2500baseX_Full ? > > The comments explain that the PCS<->PHY link is in 2500BASE-X > and why 10/100/1000 link speed is mutually exclusive with 2500. > But the connected external PHY are twisted pair cable which only > supports 2500baseT_full. The PHY should indicate what modes its supports. The PHY drivers get_features() call should set supported to only 2500baseT_Full, if that is all it supports. What modes are actually used should then be the intersect of what both the MAC and the PHY indicate they can do. Andrew