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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD87AC6FD1D for ; Tue, 14 Mar 2023 14:12:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=iymt9MvDv59Ft7ZAhIxlOVTV/YMeI0JivSzn78lN25o=; b=lPmYUxzoDMsJrE Vu8Lx+ChymU1wNTrRRuBlEsXwjZMGWyUtWr1VshcpeSS2nE0sgMmlq+sLlH158SrefLMmYs67izmI EfY01VsMuPX+AWQzrPYuwKySNHqIZsdiLFZG6rDmsGdslNPGINXqQJVg1L37owNSMo1qds8ggWHFw sdXjRnPvcvmW+gY7AEetvFEFC1FjFk4ZBJZtRJ4eTA4RleJ/Tm1S3S+bEGLCsdsRynuE+xb+AaARG pPAsWZBwFHItNP/JIByXWQP+XMDpIWtx0SvDtepl0o5S2+dJylHgk2b/ewTT3f786YppFxwAoCGQx 8AuOzYjvNRx7Y5o6lSQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pc5NA-00AQ3l-1Z; Tue, 14 Mar 2023 14:11:28 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pc5N6-00AQ1R-1N; Tue, 14 Mar 2023 14:11:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type: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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=k1DEtHIhLxRnbG8lB4HWAB8Y4xPQZEX9Zid75ZjCTvk=; b=jpgpNy9fMP5h6PmZdKe/nnjsq0 IkWVUgi0+aJ/1NUjaaXKN2XuBV9+7Vs+s4INIgb1twXhPzG1sbM92I3hbywBel/zjbffM16qbhWsm TsItyC5HwqtFhv2zyC2dzombosQ9YZsaGH528S6x4PRvAT0ywKiOIfEixy95orB4iFsdHTFcTjJfT z3sdKOC1euDOhf2uP9WwirTwMcqTbrqbxOgN3MstLse26dIszHjCPeS/N7QmQTo4I2mqJIHGvPOLO Nf/682DepH6jjWMPFFJuznI9I1Wx7Zo4vu0t4CowSuN10HwSgbDadC39GqQOi8PTusieTvqx/tCYW yLrkcxmA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55970) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pc5Mv-0005Cq-4c; Tue, 14 Mar 2023 14:11:13 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pc5Mr-0000QN-SX; Tue, 14 Mar 2023 14:11:10 +0000 Date: Tue, 14 Mar 2023 14:11:09 +0000 From: "Russell King (Oracle)" To: Frank Wunderlich Cc: Daniel Golle , netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: Re: [PATCH net-next v12 08/18] net: ethernet: mtk_eth_soc: fix 1000Base-X and 2500Base-X modes Message-ID: References: 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-20230314_071124_470129_A928B16E X-CRM114-Status: GOOD ( 23.72 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 14, 2023 at 02:59:11PM +0100, Frank Wunderlich wrote: > Hi > = > very good...do not need the manual autoneg with the last Patch :) Great news! Thanks for your patience. > > Gesendet: Dienstag, 14. M=E4rz 2023 um 11:10 Uhr > > Von: "Russell King (Oracle)" > = > > For 802.3z modes, MLO_AN_INBAND with Autoneg clear in the advertising m= ode > > disables in-band negotiation. This is exactly how "ethtool -s ethX > > autoneg off" works. > = > ok, this seems now correctly set. > = > > > > The patch below should result in ethtool reporting 2500baseT rather= than > > > > 2500baseX, and that an=3D1 should now be an=3D0. Please try it, and= dump the > > > > ethtool eth1 before asking for autoneg to be manually disabled, and= also > > > > report the kernel messages. > = > root@bpi-r3:~# ip link set eth1 up > [ 91.624075] mtk_soc_eth 15100000.ethernet eth1: configuring for inband= /2500base-x link mode > [ 91.632485] mtk_soc_eth 15100000.ethernet eth1: major config 2500base-x > [ 91.639094] mtk_soc_eth 15100000.ethernet eth1: phylink_mac_config: mo= de=3Dinband/2500base-x/Unknown/Unknown/none adv=3D00,00000000,00008000,0000= 6400 pause=3D00 link=3D0 an=3D0 > root@bpi-r3:~# [ 95.808983] mtk_soc_eth 15100000.ethernet eth1: Link is= Up - Unknown/Unknown - flow control off > [ 95.817706] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready > > root@bpi-r3:~# ethtool eth1 > Settings for eth1: > Supported ports: [ FIBRE ] > Supported link modes: 2500baseT/Full > Supported pause frame use: Symmetric Receive-only > Supports auto-negotiation: No > Supported FEC modes: Not reported > Advertised link modes: 2500baseT/Full > Advertised pause frame use: Symmetric Receive-only > Advertised auto-negotiation: No > Advertised FEC modes: Not reported > Speed: Unknown! > Duplex: Unknown! (255) > Auto-negotiation: off > Port: FIBRE > PHYAD: 0 > Transceiver: internal > Current message level: 0x000000ff (255) > drv probe link timer ifdown ifup rx_err tx= _err > Link detected: yes = > = > root@bpi-r3:~# dmesg | grep -i 'sfp\|eth1' > [ 0.000000] Linux version 6.3.0-rc1-bpi-r3-sfp13 (frank@frank-G5) (aar= ch64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binut= ils for Ubuntu) 2.38) #2 SMP Tue Mar 143 > [ 1.658048] sfp sfp-1: Host maximum power 1.0W > [ 1.663128] sfp sfp-2: Host maximum power 1.0W > [ 1.812401] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine = at 0xffffffc00af80000, irq 123 > [ 2.001796] sfp sfp-1: module OEM SFP-2.5G-T rev 1.= 0 sn SK2301110008 dc 230110 > [ 2.011307] mtk_soc_eth 15100000.ethernet eth1: optical SFP: interface= s=3D[mac=3D2-4,21-22, sfp=3D22] > [ 2.020000] mtk_soc_eth 15100000.ethernet eth1: optical SFP: chosen 25= 00base-x interface > [ 2.028080] mtk_soc_eth 15100000.ethernet eth1: requesting link mode i= nband/2500base-x with support 00,00000000,00008000,00006400 > [ 91.624075] mtk_soc_eth 15100000.ethernet eth1: configuring for inband= /2500base-x link mode > [ 91.632485] mtk_soc_eth 15100000.ethernet eth1: major config 2500base-x > [ 91.639094] mtk_soc_eth 15100000.ethernet eth1: phylink_mac_config: mo= de=3Dinband/2500base-x/Unknown/Unknown/none adv=3D00,00000000,00008000,0000= 6400 pause=3D00 link=3D0 an=3D0 > [ 95.808983] mtk_soc_eth 15100000.ethernet eth1: Link is Up - Unknown/U= nknown - flow control off > [ 95.817706] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready > = > so you can see the link-up comes directly after the interface up > = > does the ethtool-output look like expected? i see speed/duplex is set as = supported/advertised but not active > = > Supported link modes: 2500baseT/Full > Advertised link modes: 2500baseT/Full > vs. > Speed: Unknown! > Duplex: Unknown! (255) = Yes, and I think that's reasonable given that the PHY is inaccessible, and therefore we have no way to know what the PHY is actually doing. > imho ETHTOOL_LINK_MODE_2500baseT_Full_BIT sets only the supported which i= ntersected with the advertised from the other side maximum should be taken = as actual mode...so this part seems not correctly working at the moment. ... except we don't know what "the other side" is doing because we need to read that from the PHY in the SFP. > the "Supported ports: [ FIBRE ]" is also misleading for copper sfp, but i= mho all SFP are shown like this. ... unless they have a PHY we can access. > full log if needed: > https://pastebin.com/6yWe4Kyi > = > next step: > is it possible to have pause for rate adaption (handling rx pause frames = correctly)? That's certainly the next issue to sort out. I'll send a patch when I've sorted that out. Thanks! -- = RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel