From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [RFC/PATCH] net: nixge: Add PHYLINK support Date: Wed, 5 Sep 2018 03:01:00 +0200 Message-ID: <20180905010100.GN29121@lunn.ch> References: <20180905001535.19168-1-mdf@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, davem@davemloft.net, f.fainelli@gmail.com, alex.williams@ni.com, moritz.fischer@ettus.com, linux-kernel@vger.kernel.org To: Moritz Fischer Return-path: Content-Disposition: inline In-Reply-To: <20180905001535.19168-1-mdf@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > 3) I'm again not sure about the 'select PHYLINK', wouldn't > wanna break the build again... Hi Moritz I think it is safe. PHYLINK has no stated dependencies on OF. But i suspect it currently is pretty useless without OF. > @@ -1286,7 +1329,13 @@ static int nixge_probe(struct platform_device *pdev) > priv->coalesce_count_rx = XAXIDMA_DFT_RX_THRESHOLD; > priv->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD; > > - err = nixge_mdio_setup(priv, pdev->dev.of_node); > + mn = of_get_child_by_name(pdev->dev.of_node, "mdio"); > + if (!mn) { > + dev_warn(&pdev->dev, "No \"mdio\" subnode found, defaulting to legacy\n"); > + mn = pdev->dev.of_node; > + } > + > + err = nixge_mdio_setup(priv, mn); I would suggest making this a patch of its own. Also, do you need the legacy behaviour? If there are no boards out in the wild which this will break, just make the change. Please also update the device tree binding documentation. Andrew