Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4084852rwi; Sat, 22 Oct 2022 05:03:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5iNxMnl3KLU9AkmtSeaCgwRWrixtngA44rfy026bPcJuZI/rDAJEipSKFwM/FyhCW1PPvA X-Received: by 2002:a17:907:94ce:b0:79c:d3c5:e9f6 with SMTP id dn14-20020a17090794ce00b0079cd3c5e9f6mr5584548ejc.219.1666440194768; Sat, 22 Oct 2022 05:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666440194; cv=none; d=google.com; s=arc-20160816; b=DJwR2pNazkL33hk3BXTJhVTDl0yf55MRtd5FrB5+4diu+w972az8SKElw5llIjo7Ry V6N1piRPtFE/AcFL58QA6vPJY47MlJZPehJEOV3atOPwwg97FVMPdlfKL3YPMuwb6JFL 7M259/owPtCDxeZcH8ZPsQ4/naX4zUSTpZvwNKyEkEgyxWZ0RUbYdq4n9zi28otVYdXw b6EY4I5FYdp67FbbPeifL9UkJczWrWlDSrsfyGDdjm8n1E3//eKOt3H4oMAmIyro3Yhk 5ijhPYGC3o51XvCERVJEhHyWROtLo9ES2F/eZGkmwGqlPzWmSwtGHyex2QvciiJiKapL kPIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :sensitivity:importance:date:subject:cc:to:from:message-id :mime-version:dkim-signature; bh=/B2xlRoYaO6vdRiaURdXthAWr6Z3JTRdnxZApfQ8yCA=; b=SD2wLxGDIDKjO0A73uyK1GJvyTDlrlYT/C/LTxP356cgUziOw80Dz0SBtPZYJ9NJtb jfq2d5WW5zircv3qAiaHZZFZUK18zrBGcKDpRfRW6FHExqSFMVKReFrN0tccSHGl6UAz O69DB1DMfj4xoclGIx7FaRbFuejUEWaq/fdh3NtLPnbYJ8gTbmmUOAMTMmbtHDCi/H24 Nxa2CNgVCiFpBYOQAxeAydrnQY0iiLVZS7PndmCwMser1C3M67BGL8UTDYenwFN94g2v uRHnFUWlBmcu8MCPLKbmo+vqDKUiY7HROVE1+VLpQ7DuK00s/obOmipVNc2IwTvFsE2l HETQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="bFtep/Ey"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd19-20020a1709076e1300b00741688254f4si20776012ejc.163.2022.10.22.05.02.46; Sat, 22 Oct 2022 05:03:14 -0700 (PDT) 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=@gmx.net header.s=badeba3b8450 header.b="bFtep/Ey"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230269AbiJVLXB (ORCPT + 99 others); Sat, 22 Oct 2022 07:23:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbiJVLWp (ORCPT ); Sat, 22 Oct 2022 07:22:45 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5640169EC2; Sat, 22 Oct 2022 03:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1666435920; bh=3Yd90e9Q3V8HInE/QdG86ZT+3Jb9FgTQiauiO9qiniw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=bFtep/EyWURlXqgf9v4kjce5ykEHZdH+xMN9epLAVheyC4MRJaQ++eQSH4/B+9+Qi knSJacrOCimWL1jaD1ngGwaCZY4ACsqvX1s2P6heH2M0So+5V/nG6HrfIAdi7Mr/0G u2yuYTBEj2M6aTXXqWn5kiTzWis1+LCoTPQykxGE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [80.245.73.148] ([80.245.73.148]) by web-mail.gmx.net (3c-app-gmx-bs49.server.lan [172.19.170.102]) (via HTTP); Sat, 22 Oct 2022 12:52:00 +0200 MIME-Version: 1.0 Message-ID: From: Frank Wunderlich To: "Russell King (Oracle)" Cc: 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: Aw: Re: Re: Re: [PATCH v2] net: mtk_sgmii: implement mtk_pcs_ops Content-Type: text/plain; charset=UTF-8 Date: Sat, 22 Oct 2022 12:52:00 +0200 Importance: normal Sensitivity: Normal In-Reply-To: References: <20221020144431.126124-1-linux@fw-web.de> <02A54E45-2084-440A-A643-772C0CC9F988@public-files.de> <9BC397B2-3E0B-4687-99E5-B15472A1762B@fw-web.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:/yp+jB8wmgCtvIVgjcE7k4KpTSbWp2vpANssuY7SBFJCyxd+swPt57st3f9b5swAGXYzB NTpO1Fxzt19W9CUJANtb1MCEg8hj6c+UHZ+Kh0iUk6MDazLicfwXwLUk17Lw3/g2UNnLr1LEEeim YOyb5p1bvIaD5DrRrv0JnmGE2tu2WaTZ1+/ULfzbamzYeFKuorV/L1O2O3Pp6nMC52XH48jVjrT1 R8yw5p2kAm1UMQqNL1YjK1ZW9IUejt+50MctyghHABP4XHV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kT+fl8ccRQFvMcdGNlL4b+1jQ344rrEDZaZ9da az7dBWzqz/bBLhEtvKddhTxUgVA+WtZZTdhxsrnIgSMwyh5I4RdjRSmSGgwS16Aw7iYnBNpwe uiRzw81mvpEzAqCPZZi06Zly+9O88zVAsPS2Y8GTuXT+f6rZYxyRWDgGdALHY51VOcFi4UWYB 2gswqjuXG6hl3XjXRrWuJurJbjb/KUf/eLF2Ovk3Y/XwjsnYvz2SMWhY38zBd9MhMerr8M+rW EtgLY3QCQWa4UQTQTZiPZWIFB9Z7bgsDG1Ul0cmmIhoF7+9/i+9NWouxJXHqOeMVZFKVXSbMc fcMPo0dM Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 > Gesendet: Samstag, 22. Oktober 2022 um 11:11 Uhr > Von: "Russell King (Oracle)" > Please try this untested patch, which should setup the PCS to perform > autonegotiation when using in-band mode for 1000base-X, write the > correct to offset 8, and set the link timer correctly. hi, this patch breaks connectivity at least on the sfp-port (eth1). root@bpi-r3:~# ip link set eth1 up [ 65.457521] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/= 1000base-x link mode root@bpi-r3:~# [ 65.522936] offset:0 0x2c1140 [ 65.522950] offset:4 0x4d544950 [ 65.525914] offset:8 0x40e041a0 [ 65.529064] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Unkn= own - flow control off [ 65.540733] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready root@bpi-r3:~# ip a a 192.168.0.19/24 dev eth1 root@bpi-r3:~# ip r a default via 192.168.0.10 root@bpi-r3:~# iperf3 -c 192.168.0.21 #ping does not work too iperf3: error - unable to send control message: Bad file descriptor root@bpi-r3:~# ethtool eth1 [ 177.346183] offset:0 0x2c1140 [ 177.346202] offset:4 0x4d544950 Settings for eth[ 177.349168] offset:8 0x40e041a0 1: Supported p[ 177.352477] offset:0 0x2c1140 [ 177.356952] offset:4 0x4d544950 Supported link modes: 1000baseX/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 1000baseX/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Unknown! (255) Auto-negotiation: on 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:~# from sgmii_init [ 1.091796] dev: 1 offset:0 0x81140 [ 1.094977] dev: 1 offset:4 0x4d544950 [ 1.098456] dev: 1 offset:8 0x1 ... pcs_get_state [ 65.522936] offset:0 0x2c1140 [ 65.522950] offset:4 0x4d544950 [ 65.525914] offset:8 0x40e041a0 [ 177.346183] offset:0 0x2c1140 [ 177.346202] offset:4 0x4d544950 [ 177.349168] offset:8 0x40e041a0 [ 177.352477] offset:0 0x2c1140 [ 177.356952] offset:4 0x4d544950 regards Frank