From patchwork Thu Mar 24 10:56:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 601552 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qW3lg6Rwjz9s1h for ; Thu, 24 Mar 2016 22:16:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=metanate.com header.i=@metanate.com header.b=UmFvGMZi; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932078AbcCXLQK (ORCPT ); Thu, 24 Mar 2016 07:16:10 -0400 Received: from dougal.metanate.com ([90.155.101.14]:39290 "EHLO metanate.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755393AbcCXLQF (ORCPT ); Thu, 24 Mar 2016 07:16:05 -0400 X-Greylist: delayed 1113 seconds by postgrey-1.27 at vger.kernel.org; Thu, 24 Mar 2016 07:16:05 EDT DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=Message-Id:Date:Subject:Cc:To:From; bh=jGvzpwwHzlrkcGyZus8cBtLCD8JZ5i9Aet0jWCuP5pY=; b=UmFvGMZiNfhDMW88Z7B3Q+CcaTPXiO5TA7ouoRDMAbGjUq19bHZcH1eGMxrzetnnNvAoxx9fw2KJ38krnCMprLILTRJODcAkmdrqidV14uqKYcLTqkjP/pfHzs+d0FUZ53w3gqtPA1cJY3cun5Bhidn85GBd4xDjnCkPxHs85LlImDe0/muB1c7sff1nVvnALK9JPgQMdR57RhchYGG4haPjHs7J1XS73zfd4kBApswz8K6AwIyFaBZdGpoGq2tuodY86XyWn885jBzix4kshJxSn1sX5Rl/Rvxo7MnAitn+Gttnp+BLYziMaIzqAd9ulmiSdUxlH611Tjqd/envAA==; Received: from brian ([192.168.88.1] helo=leela.metanate.com) by shrek.metanate.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.83_RC2) (envelope-from ) id 1aj2x2-0006pJ-5F; Thu, 24 Mar 2016 10:57:16 +0000 From: John Keeping To: Giuseppe Cavallaro Cc: Gabriel Fernandez , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, John Keeping Subject: [PATCH] stmmac: Fix phy without MDIO subnode Date: Thu, 24 Mar 2016 10:56:52 +0000 Message-Id: <1458817012-14293-1-git-send-email-john@metanate.com> X-Mailer: git-send-email 2.7.0.226.gfe986fe Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 =