Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3404987rwb; Mon, 16 Jan 2023 07:36:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXt8HCM89YAD5FVM52E9boJLP41k+xoU8MLn4ab/+kr7G9j99o31stZHGW73u/KQoATznCOS X-Received: by 2002:a05:6402:48c:b0:483:d49f:e26c with SMTP id k12-20020a056402048c00b00483d49fe26cmr70689248edv.15.1673883377516; Mon, 16 Jan 2023 07:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673883377; cv=none; d=google.com; s=arc-20160816; b=UeSMxaptavGxcZxMzh4vf93Ou7dEC0vEoTZGhPPUpU20f9VMrdz/wYMxE6+DXU8uSI /m7P6AkfhtpAFsSohTh+LkhWxa+s2xniHOv+CLBwirK0L6MJezRuE7wcoPwwWWdNVjFg If7K+z6dbkx8WiXt4XvCGNDW+aK3T62uHvFdly4IaSmgDEN4MRiWrpPAtnGK883I7Xfx AW6XlY+LZUVVlSSBwdSJLeleHvi2VuFS5KnEr6gM7EcLfa1Vs84pstH8hP1lyDgJ9JAg Ad/HuMmyxn+Nq6SkfOIeZV/ow9CV7JjwqUscnwawRn+26nZdnr+UNPix3Wj3q+EyuP/E pYDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WFKnv3IXFGo/+R8aB760h27cGKXKKD/moSarcuDR1DI=; b=rQeD+qFOt7lYq1T2jHeZwDafiAsRG9ufuzcEkNISdFtD1kycqITmWAE9vi1p+KPmBa gBRCwohBQJ+rRwId1tJ9pPBhxldIyht5F3KPny75Qa78Vln+nd/fI03BajRpczAeag0M BAow2SWEO7dUhV4IdtIZVPP/wbxQVDduckhWDjGtdcKYZuBMfKjlcJxkVdkv72rPJRew nht6QsVGjD/tuGi7G1w4MQdV8jhy0upa/eq+10K99TYdpDCVgcYL9Ivrpvikg866AARJ 3cwSgr4FQuFbSk6kJV5cOR48aNJvj50GAB6W9i31z9Fizhs6haL5fXWQKhhhX4x2hX53 uAHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=KiXQaWYj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a056402270a00b00469054c7246si38513444edd.506.2023.01.16.07.36.04; Mon, 16 Jan 2023 07:36:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=KiXQaWYj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229582AbjAPPLs (ORCPT + 50 others); Mon, 16 Jan 2023 10:11:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232064AbjAPPL2 (ORCPT ); Mon, 16 Jan 2023 10:11:28 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B305234C7; Mon, 16 Jan 2023 06:59:46 -0800 (PST) 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=WFKnv3IXFGo/+R8aB760h27cGKXKKD/moSarcuDR1DI=; b=KiXQaWYjAzj22qeVwf+8jraFnd piSsFBsu9jpccuQs1OylYmOhIxYpYJMXk9UyP8itAzdxLXZH6mTTAzAzsQlF0ezNt4NoQdpe1IkY8 u4k28bU9DzDlGgLhdaq2SePXFBylBp0fFPF2Gd8K/VFGgpVHIi/HDGC4TJ1MNqtbFIB3V4jZwt3Zq a2jILgICyiMK0Ye8t3cBHRBaVU6/N/P71gpgPg43tBGnmXFdXv0semHNJb9z0WCUs/2JuoRMYNrSF 31fMcmwwLBZ8kcU/TEM9VyQ4w00g1Hv4AnsJ0drPuoayyhfQokV48ZP1CRv+eMOvMhEtJfolfdvIH 3bklwOgA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:36130) 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 1pHQxM-0005D4-H5; Mon, 16 Jan 2023 14:59:28 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pHQxG-00066F-Sc; Mon, 16 Jan 2023 14:59:22 +0000 Date: Mon, 16 Jan 2023 14:59:22 +0000 From: "Russell King (Oracle)" To: =?iso-8859-1?Q?Bj=F8rn?= Mork Cc: Frank Wunderlich , Frank Wunderlich , linux-mediatek@lists.infradead.org, Alexander Couzens , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: mtk_sgmii: implement mtk_pcs_ops Message-ID: References: <87o7qy39v5.fsf@miraculix.mork.no> <87h6wq35dn.fsf@miraculix.mork.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87h6wq35dn.fsf@miraculix.mork.no> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 16, 2023 at 03:45:24PM +0100, Bj?rn Mork wrote: > "Russell King (Oracle)" writes: > > On Mon, Jan 16, 2023 at 02:08:30PM +0100, Bj?rn Mork wrote: > >> Frank Wunderlich writes: > >> > >> > apart from this little problem it works much better than it actually is so imho more > >> > people should test it on different platforms. > >> > >> Hello! I've been banging my head against an MT7986 board with two > >> Maxlinear GPY211C phys for a while. One of those phys is connected to > >> port 5 of the MT7531 switch. This is working perfectly. > >> > >> The other GPY211C is connected to the second MT7986 mac. This one is > >> giving me a headache... > >> > >> I can only get the port to work at 2500Mb/s. Changing the speed to > >> anything lower looks fine in ethtool etc, but traffic is blocked. > > > > My guess would be that the GPY PHY is using in-band SGMII negotiation > > (it sets VSPEC1_SGMII_ANEN_ANRS when entering SGMII mode and clears > > it in 2500base-X), but as the link is not using in-band mode on the > > PCS side, the PHY never sees its in-band negotiation complete, so the > > link between PCS and PHY never comes up. > > > > Both sides need to agree on that detail. > > Any hints on how I would go about doing that? I am a little lost here, > changing arbitrary bits I don't understand the meaning of. Hi, To prove the point, in mtk_pcs_config(): if (interface == PHY_INTERFACE_MODE_SGMII) { sgm_mode = SGMII_IF_MODE_SGMII; if (phylink_autoneg_inband(mode)) { Force the second if() to always be true, and see whether that allows traffic to pass. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!