Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1283393

Re: SoCFPGA ethernet broken

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From David Daney <ddaney@caviumnetworks.com>
Newsgroups linux.kernel
Subject Re: SoCFPGA ethernet broken
Date Thu, 03 Dec 2015 22:30:02 +0100
Message-ID <qBJBU-22d-7@gated-at.bofh.it> (permalink)
References <qjX0B-8R-17@gated-at.bofh.it> <qjX0B-8R-15@gated-at.bofh.it> <qjXjX-DP-5@gated-at.bofh.it> <qjXjX-DP-3@gated-at.bofh.it> <qBIZb-1y2-19@gated-at.bofh.it>
X-Original-To Pavel Machek <pavel@denx.de>
Authentication-Results spf=none (sender IP is ) smtp.mailfrom=David.Daney@caviumnetworks.com;
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
MIME-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding 7bit
X-Originating-IP [64.2.3.194]
X-Clientproxiedby BY2PR07CA057.namprd07.prod.outlook.com (10.141.251.32) To SN1PR07MB2143.namprd07.prod.outlook.com (25.164.47.13)
X-Microsoft-Exchange-Diagnostics 1;SN1PR07MB2143;2:T0nKpZS10FUrfiQZU+SRE0Wgi8iixpl5zK1flMfIwoi99l4wZK2HdcFhShet6uNxTHNCQP9S4sTorOPQW6W4f3VLFqvZa7s2Zovd9l9TWxFbiY+bCCAc3i4kQ8vvxgMGgLUfDR/i5QiG+ig/S+InBw==;3:sV7I6ve+GKOlWJ5NX8TaEi4RTt9rh0n2I0FaxGxYMrjKI3PWdnSZS/7fC8ixJ45WgVyCLNS1cSQNeOl9tcWnWmPEsos42+8rIAP/l0bg3btv9mJuTgSV/7hAF8bkF7Rm;25:mg8g+svpd0fEAKEjs82EZFaU+I93TlA3IrOMwDHJw4r+gxYa6ZqBAAb5G7wz0SsSN7vI2quzd3jUiJyg1T84gB3QDVAlnopKtEdcCw413d9ieMM/cbz9HB6VkSq/p5FSD/I2Rve/yhl93Bk7GJJdo0O7MbkVHadmjj510/eDPVzBK0MEaQM6vaf26sdQ0OBSGS15pwKi8eb/eq6nxbxBOc2Z81uH9hJKJeChmE4sh/9OkNOlOsxwB+NtP43GHKlV8+n6BJsTrCdVK21mIil8mw==
X-Microsoft-Antispam UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2143;
X-Microsoft-Exchange-Diagnostics 1;SN1PR07MB2143;20:3e08ZVHJlPmhs7wVUFaAZZJujeeL8B1OyoUX4xQ4cSZcljJWHJgvl0pcNS2xCX8OcvLikLVMF1WUi1cVz9gpyFYLkDN/5Rx3cqDjECqKT666jOGbvW/xsSs9+h1Ro+Uq8x2u+UdmHmq+Yd5lfK/AuF/1w/fVWpJSbvfiMx1sU07kKCbumYfHmSh1/E7yiJdVikuSS4flkTG+SOq7G+tEiRlRzuSUYWYSHaJCt8yf2LjsYSW8XS2nuolqlqzU4i5PeW8YsNq3t+UMVOUsHkfX+ZtygomCmiKiWExfXQY/G/2wUyom7eBbHdFEjbTT46DudRSTTinReY5z4sUBMaU143X/v6fH1AaUZWNOsZxrcMcz1bfgL4EZx2+c+EvQ2QM6ET+f0A5vXLF0S/HKR5FPw1Tku1vyk5OUBptd8UDc3aRrVGk0lyj0JB5wV2r8yo74lg3UlBc0lD0jmbzzpIm+wTGQ86DrP7PctmKfVH6gsh+A8UuSMr52/XjV0p7MHZmIQbU4ES3t71b2MnUssHiKOcTA8D8wClCJ2/+qzDYkBNQtkV/5cQj5k0rxDCh4tVR6hI6haQ1a8ltRONtkX1MnuJUhCLzlk6FOkdNf1g84+rE=
X-Microsoft-Antispam-Prvs <SN1PR07MB2143237EF72FB5CB4E03B81D9A0D0@SN1PR07MB2143.namprd07.prod.outlook.com>
X-Exchange-Antispam-Report-Test UriScan:;
X-Exchange-Antispam-Report-Cfa-Test BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046);SRVR:SN1PR07MB2143;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2143;
X-Microsoft-Exchange-Diagnostics 1;SN1PR07MB2143;4:ZcBylaEjwQhoT5VleuMlcu0Q6yyDmyr5aSM7gm41R8It/0txHhZz6sXSe18LFBhiO3o452leMzkBAvrvg5NLvA7yghShw2TN2d9NMrMCNRveUCw9psksihaqsYCqM8V+t9oOj5/9i4YCZSNUXXTWtDJULa+MrDBhaxjUKAIyeZCvfgNVvViZKyc8h5xMSx2xl3VY5DUNkwDwCox3+InyqrWsAYe66Bkwg/07Owl+qgIaQZ8eUREYZ6PFIoAHfMH/3/enktNTNqOPJaeuVJNCpWR9EktH14RV+hpFTPXvpVXUx0bM7j7J3TjSPEkzVPvIBeKOWVDa0j4LwjWi6ANRdSEVaz2GKjKtrTBduUMg7szzLlq3GPYp3YZuX25knF5O
X-Forefront-Prvs 077929D941
X-Forefront-Antispam-Report SFV:NSPM;SFS:(10009020)(6009001)(199003)(377424004)(24454002)(479174004)(377454003)(189002)(97736004)(50466002)(36756003)(189998001)(1096002)(6116002)(4001350100001)(5001960100002)(586003)(5004730100002)(2950100001)(3846002)(4001150100001)(77096005)(101416001)(65816999)(230700001)(92566002)(5008740100001)(110136002)(106356001)(19580395003)(40100003)(80316001)(76176999)(122386002)(47776003)(105586002)(66066001)(87266999)(53416004)(33656002)(23756003)(81156007)(65956001)(50986999)(54356999)(65806001)(59896002)(87976001)(64126003)(83506001)(69596002)(42186005)(93886004);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR07MB2143;H:dl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en;
Received-Spf None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts)
X-Microsoft-Exchange-Diagnostics 1;SN1PR07MB2143;23:VXH6uB7oiGTkRZTIbbwdPCJ46CcvmiOGm7qOAtX0MaR5HpoQl3vCjM5sgg1tkOY4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ZovVsEIVepGFs+1QWNtn3k35pI8Fqym+7duB1Vz4MC8fkgU6L2kudJuHiraNHA1GB0ql8/sCFK+rCjiHu41BuJYlmTLyPQ6Q990bAamzN7I6WdWHnApr+E/MVjTQT7npphLcmABcLFYf48jlqmxLwU6OukCuGnPovm8E7ouqVrP7WRnHZTe2OS7fRMs/RC
X-Microsoft-Exchange-Diagnostics 1;SN1PR07MB2143;5:TNNT3jTzOhweGXD/YNIyRcP4AWz4hhqKADjhrrNRz4A2lCEmEDNPiekJPtDv3iQmad8qX1Zl/VKGlz6HqIynX0GI78JEDnQoETvT0xd4w0wxZHKgJIe0mTT+S7aE5JgjrSJbzW7IoQQF2pG5tBL0hQ==;24:Rb8UFnAjhFLS2qIMhwaHHsmU143VcT1hyQ3NURx1laENilua15u5N1n+IqaS0Z5892MvK8apEz63JixSphpXgToCwxEabhkSAYwju8SBI0c=
Spamdiagnosticoutput 1:23
Spamdiagnosticmetadata NSPM
X-Originatororg caviumnetworks.com
X-Ms-Exchange-Crosstenant-Originalarrivaltime 03 Dec 2015 21:23:58.8249 (UTC)
X-Ms-Exchange-Crosstenant-Fromentityheader Hosted
X-Ms-Exchange-Transport-Crosstenantheadersstamped SN1PR07MB2143
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 73
Organization linux.* mail to news gateway
X-Original-Cc Florian Fainelli <f.fainelli@gmail.com>, Dinh Nguyen <dinguyen@opensource.altera.com>, "David S. Miller" <davem@davemloft.net>, <david.daney@cavium.com>, <netdev@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
X-Original-Date Thu, 3 Dec 2015 13:23:56 -0800
X-Original-Message-ID <5660B2EC.1050705@caviumnetworks.com>
X-Original-References <561FF9E2.30102@opensource.altera.com> <56200687.9040903@gmail.com> <562005AD.8020903@opensource.altera.com> <56200BD7.8020505@gmail.com> <20151203204811.GB14427@amd>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1283393

Show key headers only | View raw


On 12/03/2015 12:48 PM, Pavel Machek wrote:
> On Thu 2015-10-15 13:25:59, Florian Fainelli wrote:
>> On 15/10/15 12:59, Dinh Nguyen wrote:
>>> On 10/15/2015 03:03 PM, Florian Fainelli wrote:
>>>> On 15/10/15 12:09, Dinh Nguyen wrote:
>>>>> Hi,
>>>>>
>>>>> commit "8b63ec1837fa phylib: Make PHYs children of their MDIO bus, not
>>>>> the bus' parent." seems to have broken ethernet support for the SoCFPGA
>>>>> platform which is using the stmmac ethernet driver.
>>>>
>>>> It is not clear to me how this relates to what you are seeing yet.
>>>>
>>>>>
>>>>> It appears that during DHCP, it cannot get an IP address. This only
>>>>> happens if ethernet was not used by the bootloader to tftp an kernel
>>>>> image. If I use the bootloader to tftp an image then ethernet is working
>>>>> fine. So I think the PHY is not getting enabled properly.
>>>>>
>>>>> If I revert this patch, then ethernet is back to working on the platform.
>>>>
>>>> Is the Device Tree source for this platform available somewhere to look at?
>>>>
>>>
>>> Yes, I'm using the DTS that is in the mainline:
>>>
>>> arch/arm/boot/dts/socfpga.dtsi
>>> arch/arm/boot/dts/socfpga_cyclone5.dtsi
>>> arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>>
>> There are no PHY devices in any of these DTS files, instead there is the
>> non-standard "phy-addr" property which is set to 0xffffffff supposedly
>> to indicate that the MDIO bus should be scanned. This is likely part of
>> your problem. The stmmac driver seems to be looking for "snps,phy-addr"
>> and not "phy-addr", so I am not even clear how this is supposed to work,
>> and the driver mentions this custom property is deprecated anyway.
>>
>> The core problem is in
>> drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c::stmmac_mdio_register
>> which manually detects the PHY, that is mostly fine, except that it does
>> not really seem to work here for a reason that is still unclear to me.
>>
>> Your Ethernet PHYs need to be declared in Device Tree, see
>> Documentation/devicetree/bindings/net/phy.txt
>
> While updating DTS might be good idea, I don't think you can simply
> blame this on DTS. If it worked before the change, it is supposed to
> work after the change, otherwise we call that change a "regression"
> and revert the change.

FWIW: My initial patch to address the failure worked with the original DTB.

Also: userspace wasn't broken. So, the commandment about not breaking 
userspace wasn't broken.  Although admittedly, breaking the kernel isn't 
good either.



>
> Plus, DTS is supposed to be ABI. Old DTS should still work on new
> kernels in ideal world.

If you supply the device tree file in the kernel tree, it is not an ABI.

If the device tree is not part of the kernel, and instead comes from the 
boot firmware of the board, then you could make the ABI claim.

David Daney
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: SoCFPGA ethernet broken Pavel Machek <pavel@denx.de> - 2015-12-03 21:50 +0100
  Re: SoCFPGA ethernet broken David Daney <ddaney@caviumnetworks.com> - 2015-12-03 22:30 +0100
    Re: SoCFPGA ethernet broken Andrew Lunn <andrew@lunn.ch> - 2015-12-04 02:20 +0100
      Re: SoCFPGA ethernet broken Andrew Lunn <andrew@lunn.ch> - 2015-12-04 03:00 +0100
        Re: SoCFPGA ethernet broken Andrew Lunn <andrew@lunn.ch> - 2015-12-04 15:40 +0100
    Re: SoCFPGA ethernet broken Pavel Machek <pavel@denx.de> - 2015-12-04 10:40 +0100

csiph-web