Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5345337ybe; Tue, 17 Sep 2019 06:43:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4YZi/c1ICfS9+jJ4/7uXeseH4JbvUY7wZg9CXkeETIk/i3w+BRprD28/44Hd72HiqAf1l X-Received: by 2002:a50:886d:: with SMTP id c42mr4763476edc.24.1568727803219; Tue, 17 Sep 2019 06:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568727803; cv=none; d=google.com; s=arc-20160816; b=mbo1AjVWkF7wrigPE5VSFp1Urr5x2tskN0Oiz0dqb+vKC8oJkfP5k2kcYsaJXEpXdB duEd7qFxB+M+g4etLVL0uZHhM5YZwZpBL1dUz5sEheVY6VqzIcthNjxKDPuyh47NSHDB 77Zy67u4qA6pUM5qAgwWugAloFyt9Qhw+zkZ5NjfBJKiRloNVGp5dy/aVyyEhD9U2D9k /0XRQv43ykNnbxokzX8uTeWuEqDhgTAO28oy2Q49Zztd4YiNatyaQE9HZCJ7ZEsIxWc4 58pIZQ1SC7oedEYXOSEVQ23c0gTwlkmqvfyh45w+r3C+HRymXL5JNZemMxauFozbjNfN 9yfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ELl1NsfX5Fc5G0TSWnTjkQIkDmrHqxQp19xYdCPSi/Q=; b=YmUZctAEgnvYGo6wz8YL84c+tOWv9J82nnsS0Ntb1L6Nd4xXJJBRMkpp3gDh8Dtnp1 mTa9n8sdwKKbtK/4tPU2A6iQ5Rm/hUHWuFOVdBEZ2uYIrO9oYfVAvbOO9cWOtQo85L3s it/9Yso5icFilEzE9w189pSGqKsKOxSUE8RfC4o+xa4bIuFRWOLFMFIkhX3+erK3MbSw EhINKTWMNrj+/9hchpWTRZlnmbAMauZjNuFV15KuY+sfhwp8vjb3DCI8L1ydfqpF7MXP 9WjmAZUmoAlJHv6vsTl+gC41z2KrfR1WqjsGPsWYaP2ZaNbEJfurYh9uvEfrOZbUGk4p 3K8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=tzWGR7ST; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si1066785ejf.174.2019.09.17.06.42.55; Tue, 17 Sep 2019 06:43:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=tzWGR7ST; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728579AbfIQNkA (ORCPT + 99 others); Tue, 17 Sep 2019 09:40:00 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:41488 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728095AbfIQNkA (ORCPT ); Tue, 17 Sep 2019 09:40:00 -0400 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-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=ELl1NsfX5Fc5G0TSWnTjkQIkDmrHqxQp19xYdCPSi/Q=; b=tzWGR7STXwrLQfe2EyTw0l/2j XblxtpPO8359nqUIHTJl9Ns/wjUzdk6PDEBHt++J82SS7VbwwMxj0sl753i2QwCKTumYfOgP4gbE8 blPn1xyB8h4MrHxPeiuV8cHn60aR/mkZ0WSPe/H7KtFJcr+Pb2ghJvj40PXjadkw3htfIzpGFdGaQ lBppuwEq6ADgADOoNFt/SoDgqhJR14eixo4otjcLC3Snsls1jFNIxmpMHIk5/q70Q1QVGcvAZbw9O onlOebpntKn2sUip2UURck/WpCBYyZV1J9Y40bQW4MpMdjxrHr9QkjYVOWBBeaYOpaX9xM4qKhqUL VBjHS8Z6w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44786) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iADhu-00028T-Ba; Tue, 17 Sep 2019 14:39:50 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iADhn-0001Ks-4N; Tue, 17 Sep 2019 14:39:43 +0100 Date: Tue, 17 Sep 2019 14:39:43 +0100 From: Russell King - ARM Linux admin To: tinywrkb Cc: Andrew Lunn , Baruch Siach , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Shawn Guo , Sascha Hauer , open list , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] ARM: dts: imx6dl: SolidRun: add phy node with 100Mb/s max-speed Message-ID: <20190917133942.GR25745@shell.armlinux.org.uk> References: <20190910155507.491230-1-tinywrkb@gmail.com> <20190910185033.GD9761@lunn.ch> <87muf6oyvr.fsf@tarshish> <20190915135652.GC3427@lunn.ch> <20190917124101.GA1200564@arch-dsk-01> <20190917125434.GH20778@lunn.ch> <20190917133253.GA1210141@arch-dsk-01> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190917133253.GA1210141@arch-dsk-01> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 17, 2019 at 04:32:53PM +0300, tinywrkb wrote: > On Tue, Sep 17, 2019 at 02:54:34PM +0200, Andrew Lunn wrote: > > On Tue, Sep 17, 2019 at 03:41:01PM +0300, tinywrkb wrote: > > > On Sun, Sep 15, 2019 at 03:56:52PM +0200, Andrew Lunn wrote: > > > > > Tinywrkb confirmed to me in private communication that revert of > > > > > 5502b218e001 fixes Ethernet for him on effected system. > > > > > > > > > > He also referred me to an old Cubox-i spec that lists 10/100 Ethernet > > > > > only for i.MX6 Solo/DualLite variants of Cubox-i. It turns out that > > > > > there was a plan to use a different 10/100 PHY for Solo/DualLite > > > > > SOMs. This plan never materialized. All SolidRun i.MX6 SOMs use the same > > > > > AR8035 PHY that supports 1Gb. > > > > > > > > > > Commit 5502b218e001 might be triggering a hardware issue on the affected > > > > > Cubox-i. I could not reproduce the issue here with Cubox-i and a Dual > > > > > SOM variant running v5.3-rc8. I have no Solo/DualLite variant handy at > > > > > the moment. > > > > > > > > Could somebody with an affected device show us the output of ethtool > > > > with and without 5502b218e001. Does one show 1G has been negotiated, > > > > and the other 100Mbps? If this is true, how does it get 100Mbps > > > > without that patch? We are missing a piece of the puzzle. > > > > > > > > Andrew > > > > > > linux-test-5.1rc1-a2703de70942-without_bad_commit > > > > > > Settings for eth0: > > > Supported ports: [ TP MII ] > > > Supported link modes: 10baseT/Half 10baseT/Full > > > 100baseT/Half 100baseT/Full > > > 1000baseT/Full > > > > So this means the local device says it can do 1000Mbps. > > > > > > > Supported pause frame use: Symmetric > > > Supports auto-negotiation: Yes > > > Supported FEC modes: Not reported > > > Advertised link modes: 10baseT/Half 10baseT/Full > > > 100baseT/Half 100baseT/Full > > > 1000baseT/Full > > > > The link peer can also do 1000Mbps. > > > > > > > Advertised pause frame use: Symmetric > > > Advertised auto-negotiation: Yes > > > Advertised FEC modes: Not reported > > > Link partner advertised link modes: 10baseT/Half 10baseT/Full > > > 100baseT/Half 100baseT/Full > > > 1000baseT/Full > > > Link partner advertised pause frame use: Symmetric > > > Link partner advertised auto-negotiation: Yes > > > Link partner advertised FEC modes: Not reported > > > Speed: 100Mb/s > > > > Yet they have decided to do 100Mbps. > > > > We need to understand Why? The generic PHY driver would not do this on > > its own. So i'm thinking something has poked a PHY register with some > > value, and this patch is causing it to be over written. > > > > Please can you use mii-tool -v -v to dump the PHY registers in each > > case. > > > > Thanks > > Andrew > > Here's the output of # mii-tool -v -v eth0 > > * linux-test-5.1rc1-a2703de70942-without_bad_commit > > Using SIOCGMIIPHY=0x8947 > eth0: negotiated 100baseTx-FD flow-control, link ok > registers for MII PHY 0: > 3100 796d 004d d072 15e1 c5e1 000f 0000 > 0000 0000 0800 0000 0000 0000 0000 a000 > 0000 0000 0000 f420 082c 0000 04e8 0000 > 3200 3000 0000 063d 0000 0000 0000 0000 > product info: vendor 00:13:74, model 7 rev 2 > basic mode: autonegotiation enabled > basic status: autonegotiation complete, link ok > capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD > advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control > link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control This is *not* advertising 1000baseT modes (register 9). > > > * linux-test-5.1rc1-5502b218e001-with_bad_commit > > Using SIOCGMIIPHY=0x8947 > eth0: negotiated 100baseTx-FD flow-control, link ok > registers for MII PHY 0: > 3100 796d 004d d072 15e1 c5e1 000d 0000 > 0000 0000 0800 0000 0000 0000 0000 a000 > 0000 0000 0000 0000 082c 0000 04e8 0000 > 3200 3000 0000 063d 0000 0000 0000 0000 > product info: vendor 00:13:74, model 7 rev 2 > basic mode: autonegotiation enabled > basic status: autonegotiation complete, link ok > capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD > advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control > link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control Neither is this. However, the kernel and phylib _thinks_ that it is. My guess is something has rewritten the PHY registers from userspace, rather than using ethtool to change the advertisment. The MAC is still trying to operate at 1000Mbps (since that is what phylib resolved) yet the link might be actually operating at 100Mbps - but for that to happen, we should've seen the link go down and up again. Odd. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up