From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752351AbbJOUfm (ORCPT ); Thu, 15 Oct 2015 16:35:42 -0400 Received: from mail-bl2on0078.outbound.protection.outlook.com ([65.55.169.78]:1150 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751244AbbJOUfk (ORCPT ); Thu, 15 Oct 2015 16:35:40 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@caviumnetworks.com; Message-ID: <56200E15.9080603@caviumnetworks.com> Date: Thu, 15 Oct 2015 13:35:33 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Florian Fainelli , Dinh Nguyen CC: "David S. Miller" , , , "linux-kernel@vger.kernel.org" Subject: Re: SoCFPGA ethernet broken References: <561FF9E2.30102@opensource.altera.com> <56200687.9040903@gmail.com> <562005AD.8020903@opensource.altera.com> <56200BD7.8020505@gmail.com> In-Reply-To: <56200BD7.8020505@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: SN1PR0701CA0058.namprd07.prod.outlook.com (25.163.126.26) To SN1PR07MB2143.namprd07.prod.outlook.com (25.164.47.13) X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2143;2:ojc5DR3l1oKnkgaPlsBtAL/7u68DEy9DsJ21CDQ9YtRIcj+j8aTFaFh4dbiqfiM6aEUGc6Nx+ByFq8KyAqRishd9QoHzjvjSiYWBg/xSU2XPNyQNblob791wyRdH80k2jR6Jh6RMJq5F4fg8wSiP52Htb7vg2U1EbQqcMlreD3I=;3:dNfWIlyvfLFIj/jkG2xPPqNK1brgAw/flhCEO43/2W6vBqSS9/ZUHrtrvsktwxvO4I8VhgU+wproENYvbKqp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S: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001);SRVR:SN1PR07MB2143;BCL:0;PCL:0;RULEID:;SRVR:SN1PR07MB2143; X-Microsoft-Exchange-Diagnostics: 1;SN1PR07MB2143;4:g1UUF5JXWrM/GYlTk3DoI6OfERwA5l7Pzhe0sWi+PXMafHNsX+feMC/oU3rx2ApO8/vXTakFhFlxSJtb0wCrsKLj3MnCYAvdRMIFga3SoKtGfujsUpkG5P70FxX6kV9f8mKK/yymtJnmPhXDgsGZ8rLxU45d1xMfu9inIYqqwstu3iyZnyAWILPu2nAP2ss5IVYOJTip/JV7wdAGLCOzcuq5+wna0zACO38RPsKfx5sDHbXHdMqHMlDq8u+LL8Lf2cjnFefSTKlzrGRY6zYfH6+uvqzJYLrbyZxaROynu+aVviJu7PBKzA89I7P4/3zNge7r8XJx9gbPPGHr9Etw+SMocumYoxpsfSIcwiJPivs= X-Forefront-PRVS: 0730093765 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(199003)(479174004)(24454002)(189002)(87976001)(97736004)(5001960100002)(69596002)(87266999)(50986999)(66066001)(106356001)(64706001)(65956001)(40100003)(76176999)(23676002)(33656002)(54356999)(5007970100001)(101416001)(5001770100001)(19580395003)(80316001)(77096005)(5004730100002)(64126003)(42186005)(105586002)(4001350100001)(46102003)(189998001)(122386002)(50466002)(81156007)(47776003)(5008740100001)(59896002)(93886004)(83506001)(2950100001)(92566002)(53416004)(99136001)(65816999)(65806001)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR07MB2143;H:dl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjA3TUIyMTQzOzIzOjlheU1KL3Y2NG9YSUFNRThRak9UYlZQUkIv?= =?utf-8?B?bXkrUm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Z8rHGBXhjrE7cWpnINGimgmxaAASPOyYIMSebTXFGWK3JDVRt1U89QD7y5dy538DOWrMKjbDWMG566K+G/Xdj7eT7uG5Qx2mkO4MNxJg==;24:I6eWvgkNh+chfAIhjW153Thg7hQF8rEkG65xMuFl/Um+ODxTNGnchsRMH9uHCrwHfiq2DqXQTIDVtIplRHFAwGFUsXoMpNnK+I2I67EJKBY=;20:UNBJ2CLC5xWzWGjyvnsGFEUcsLdF/jxlrOcz0qz8AJQQTd9GXEuBYjTQgpLAaAalEU9zVmOmZqutsXZdfdhTew== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2015 20:35:36.5658 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2143 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/15/2015 01:25 PM, 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. > I think it is OK not to expose the PHYs in the device tree if they can be accurately probed without knowing information from the device tree. > 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. > I agree with this analysis. I have also been looking at the code and cannot see anything that depends on what the parent device of the PHY is. So it is a bit mystifying. I noticed in your original message you had in the boot log this: . . . [ 0.804992] libphy: stmmac: probed [ 0.808410] eth0: PHY ID 00221611 at 4 IRQ POLL (stmmac-0:04) active . . . Does this text change with and without the 8b63ec1837fa patch?