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 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 74EFBC433ED for ; Fri, 2 Apr 2021 12:36:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 177E761002 for ; Fri, 2 Apr 2021 12:36:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 177E761002 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VDhstrKiVF6lcYK/XKsk+WZGtWQ+IPO1TOPy68rYnsY=; b=qL4J8pqPk16cLCIR1wy5oJWjL sBOy27GhjX87b1rHoaW5/BbUC3w4YB/8rurtDrhTva3YNq3gKiIJk0PgU0b4eHoP4tj/r8GCB2E3u L41fh8Xf8Ac9XfCfYJ8OXXiAYq0raxonGoyG5/iBQ8uMMPCTSWrHaZ4IAfAbzY2TZgNR70KySWOAz +i+ZwrcfndNRrj+rca2rzDdWjtbML2PmPy43Qv/RS6jUpRvZ3J8SPsQ5ry6/XHrvMVNS4ilSfZWKT Ee05CioPDK2oJP7hJIOUBlAWCRqgd7waHWvK0k3oc1YglsF8JGK63zal01HazeNyeLk2QUc7I6jkF b7HRmVkow==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lSJ1F-00CycD-UK; Fri, 02 Apr 2021 12:35:22 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lSJ1A-00CybM-3f for linux-arm-kernel@lists.infradead.org; Fri, 02 Apr 2021 12:35:18 +0000 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210402_133516_254847_1DA386C4 X-CRM114-Status: GOOD ( 14.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel