From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2E3FC433B4 for ; Fri, 2 Apr 2021 12:35:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7F1C6113D for ; Fri, 2 Apr 2021 12:35:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235333AbhDBMfT (ORCPT ); Fri, 2 Apr 2021 08:35:19 -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