Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3585773rwb; Mon, 16 Jan 2023 09:54:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXvmQVyqQ99dVxrwtA2OUdx87EhaBCGKLE+VigG8OGHJytoOZddsAT1vm+fl8rJgCmfVtCC8 X-Received: by 2002:a17:907:9714:b0:86f:57d3:e3a7 with SMTP id jg20-20020a170907971400b0086f57d3e3a7mr7817493ejc.48.1673891698123; Mon, 16 Jan 2023 09:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673891698; cv=none; d=google.com; s=arc-20160816; b=ALDPocwxHBMdOZmIXhBR2+HiaZ6uUJNfupZsVOE0IbJSpMLyDWjAnVnM46vgJC5e+T QoHsnNoQLFFEifurejWJBzBTrX3pRBJvtsvb1oC/loQZlIXz4o2ohFUT1TN6uKijExT9 2zRxS8lEaCjM9Lt9AABw5UlS7p5YwpfaEFLpoow4PV/17FdU7Ci58Z4fswXUNH2TGwyt T/T4RjmBI0UvKldpB/M6Y2Cy59xta44PSaB1xDdkcQBWmy05gPdPdvZCW5GjGzs80djV uOwnDyj3vCbIdmHXOdIFj1YBsSalwbD5c3dtpiMfebzr77kBv9Hpe6BdvzapJLnJ5f/h j09w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:organization :subject:cc:to:from:dkim-signature; bh=YW340CRyYikMeWbLA1NSf7DqfUetbMMdynXgtHHdE48=; b=kvJOQZllV4aYsqupBuk6Ak81ifHesKXIp/6kT2kfekw/d+DuLtakxwiqXbk8LD3Q0P UhMhTw1nRcsghRLh0v8H/azIT1UObuVtEIjKTwQlWIuZg1Drn0l55MQEMbXQnot/uRh9 d54uO/nTs5SajLj00PC4xU/eyTC3JWvoeH2EnfFDv8RMW8v23o9U7B/scbPpNITeb5es 8CdBvrBJBiLAIum+UKGTtTdLyx/Gz11wKah9VJrNfL98OKcztA5bRLCT6wuHfnTb3gV6 hhCWft74iu5uyHDBMJIwIVuSHMS9pc+WIiAd5rbfiD5DEgaVkMyscNcKmOlWnvhSxFLA aRlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mork.no header.s=b header.b=QFnDAMX2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mork.no Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs10-20020a1709072d0a00b0086c26c27ac9si11280379ejc.203.2023.01.16.09.54.46; Mon, 16 Jan 2023 09:54:58 -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=pass header.i=@mork.no header.s=b header.b=QFnDAMX2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mork.no Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230210AbjAPPaA (ORCPT + 50 others); Mon, 16 Jan 2023 10:30:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232278AbjAPP3J (ORCPT ); Mon, 16 Jan 2023 10:29:09 -0500 Received: from dilbert.mork.no (dilbert.mork.no [IPv6:2a01:4f9:c010:a439::d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D5D32686A; Mon, 16 Jan 2023 07:24:16 -0800 (PST) Received: from canardo.dyn.mork.no ([IPv6:2a01:799:c9a:3200:0:0:0:1]) (authenticated bits=0) by dilbert.mork.no (8.15.2/8.15.2) with ESMTPSA id 30GFLaf62098571 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Mon, 16 Jan 2023 15:21:37 GMT Received: from miraculix.mork.no ([IPv6:2a01:799:c9a:3202:549f:9f7a:c9d8:875b]) (authenticated bits=0) by canardo.dyn.mork.no (8.15.2/8.15.2) with ESMTPSA id 30GFLUi12005449 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Mon, 16 Jan 2023 16:21:30 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1673882491; bh=YW340CRyYikMeWbLA1NSf7DqfUetbMMdynXgtHHdE48=; h=From:To:Cc:Subject:References:Date:Message-ID:From; b=QFnDAMX2JhFemSQY1nYiU1QWqvPvrdhpdtxFFvS9BhbBaNkMkhfHyu+adWDwk5FWB wESQkHOLc5fvYq048POks3giDPMA9iDjhke8m2pImwPDPn11yIkZ8+dLfhMIxzXubk d2Ob3c7U3Ii79c8FT3gFNEIH95nEv/Y4uamrjRX0= Received: (nullmailer pid 376851 invoked by uid 1000); Mon, 16 Jan 2023 15:21:30 -0000 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= To: "Russell King (Oracle)" 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 Organization: m References: <87o7qy39v5.fsf@miraculix.mork.no> <87h6wq35dn.fsf@miraculix.mork.no> Date: Mon, 16 Jan 2023 16:21:30 +0100 In-Reply-To: (Russell King's message of "Mon, 16 Jan 2023 14:59:22 +0000") Message-ID: <87bkmy33ph.fsf@miraculix.mork.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 0.103.7 at canardo X-Virus-Status: Clean 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_PASS,SPF_PASS 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 "Russell King (Oracle)" writes: > To prove the point, in mtk_pcs_config(): > > if (interface =3D=3D PHY_INTERFACE_MODE_SGMII) { > sgm_mode =3D 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. Changed it with a printk to make sure I didn't mess up: if (1 || phylink_autoneg_inband(mode)) { pr_info("forcing AN\n"); But unfortunately without success. Still same failure. Output when changing peer speed: [ 54.539438] mtk_soc_eth 15100000.ethernet wan: Link is Down [ 56.619937] mtk_sgmii_select_pcs: id=3D1 [ 56.623690] mtk_pcs_config: interface=3D4 [ 56.627511] offset:0 0x140 [ 56.627513] offset:4 0x4d544950 [ 56.630215] offset:8 0x20 [ 56.633340] forcing AN [ 56.638292] mtk_pcs_config: rgc3=3D0x0, advertise=3D0x1 (changed), link_= timer=3D1600000, sgm_mode=3D0x103, bmcr=3D0x1000, use_an=3D1 [ 56.649226] mtk_pcs_link_up: interface=3D4 [ 56.653135] offset:0 0x81140 [ 56.653137] offset:4 0x4d544950 [ 56.656001] offset:8 0x1 [ 56.659137] mtk_soc_eth 15100000.ethernet wan: Link is Up - 1Gbps/Full -= flow control rx/tx and the phy still reports this: root@OpenWrt:/# mdio mdio-bus 6:30 raw 9 0x000e Bj=C3=B8rn