From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Date: Sun, 13 Dec 2015 21:00:57 +0000 Subject: Re: [PATCH net-next] ravb: Add fixed-link support Message-Id: <566DDC89.2070804@cogentembedded.com> List-Id: References: <1450019810-324-1-git-send-email-ykaneko0929@gmail.com> In-Reply-To: <1450019810-324-1-git-send-email-ykaneko0929@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yoshihiro Kaneko , netdev@vger.kernel.org Cc: "David S. Miller" , Simon Horman , Magnus Damm , linux-sh@vger.kernel.org Hello. On 12/13/2015 06:16 PM, Yoshihiro Kaneko wrote: > From: Kazuya Mizuguchi > > This patch adds support of the fixed PHY. > This patch is based on commit 87009814cdbb ("ucc_geth: use the new fixed > PHY helpers"). > > Signed-off-by: Kazuya Mizuguchi > Signed-off-by: Yoshihiro Kaneko > --- > > This patch is based on the master branch of David Miller's next networking > tree. > > drivers/net/ethernet/renesas/ravb_main.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > index 1cf1226..300acb3 100644 > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c [...] > @@ -887,6 +888,17 @@ static int ravb_phy_init(struct net_device *ndev) > > /* Try connecting to PHY */ > pn = of_parse_phandle(np, "phy-handle", 0); > + if (!pn) { > + /* In the case of a fixed PHY, the DT node associated > + * to the PHY is the Ethernet MAC DT node. > + */ > + if (of_phy_is_fixed_link(np)) { > + err = of_phy_register_fixed_link(np); > + if (err) > + return err; > + } > + pn = np; I'm seeing that other drivers call of_node_get() here, why don't you? [...] MBR, Sergei