Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753244AbcCYInT (ORCPT ); Fri, 25 Mar 2016 04:43:19 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:58429 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753027AbcCYImv (ORCPT ); Fri, 25 Mar 2016 04:42:51 -0400 Message-ID: <56F4F9F6.8070103@st.com> Date: Fri, 25 Mar 2016 09:42:30 +0100 From: Giuseppe CAVALLARO User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Keeping CC: Gabriel Fernandez , , Subject: Re: [PATCH] stmmac: Fix phy without MDIO subnode References: <1458817012-14293-1-git-send-email-john@metanate.com> <56F3E3E2.6070001@st.com> <20160324170119.28d54ed5.john@metanate.com> In-Reply-To: <20160324170119.28d54ed5.john@metanate.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.52.139.8] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-03-25_02:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1941 Lines: 53 On 3/24/2016 6:01 PM, John Keeping wrote: > On Thu, 24 Mar 2016 13:56:02 +0100, Giuseppe CAVALLARO wrote: > >> This should be fixed by some work done some days >> ago and not yet committed. >> >> Pls see "stmmac: MDIO fixes" patch-set and let me know >> if ok on your side. > > Yes, that works for me. thx John for having tested it on your side. peppe > > > Thanks, > John > >> On 3/24/2016 11:56 AM, John Keeping wrote: >>> Since commit 88f8b1bb41c6 ("stmmac: Fix 'eth0: No PHY found' >>> regression") we no longer allocate mdio_bus_data unless there is a MDIO >>> subnode. This breaks the ethernet on the Radxa Rock2 (using >>> rk3288-rock2-square.dts) which does not have an MDIO subnode. >>> >>> That commit was correct that the phy_bus_name test is unhelpful since we >>> allocate "plat" in the same function and never set phy_bus_name so let's >>> just drop the test which restores the previous behaviour. >>> >>> Fixes: 88f8b1bb41c6 ("stmmac: Fix 'eth0: No PHY found' regression") >>> Signed-off-by: John Keeping >>> --- >>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >>> index dcbd2a1..e0fa060 100644 >>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >>> @@ -189,7 +189,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) >>> if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0) >>> dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n"); >>> >>> - if ((plat->phy_node && !of_phy_is_fixed_link(np)) || !plat->mdio_node) >>> + if ((plat->phy_node && !of_phy_is_fixed_link(np))) >>> plat->mdio_bus_data = NULL; >>> else >>> plat->mdio_bus_data = >>> >> > >