[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201012142315.053f13f7@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Mon, 12 Oct 2020 14:23:15 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Marek Vasut <marex@...x.de>
Cc: netdev@...r.kernel.org,
Christoph Niedermaier <cniedermaier@...electronics.com>,
"David S . Miller" <davem@...emloft.net>,
NXP Linux Team <linux-imx@....com>,
Richard Leitner <richard.leitner@...data.com>,
Shawn Guo <shawnguo@...nel.org>
Subject: Re: [PATCH V2] net: fec: Fix phy_device lookup for
phy_reset_after_clk_enable()
On Sat, 10 Oct 2020 11:10:00 +0200 Marek Vasut wrote:
> The phy_reset_after_clk_enable() is always called with ndev->phydev,
> however that pointer may be NULL even though the PHY device instance
> already exists and is sufficient to perform the PHY reset.
>
> This condition happens in fec_open(), where the clock must be enabled
> first, then the PHY must be reset, and then the PHY IDs can be read
> out of the PHY.
>
> If the PHY still is not bound to the MAC, but there is OF PHY node
> and a matching PHY device instance already, use the OF PHY node to
> obtain the PHY device instance, and then use that PHY device instance
> when triggering the PHY reset.
>
> Fixes: 1b0a83ac04e3 ("net: fec: add phy_reset_after_clk_enable() support")
> Signed-off-by: Marek Vasut <marex@...x.de>
> Cc: Christoph Niedermaier <cniedermaier@...electronics.com>
> Cc: David S. Miller <davem@...emloft.net>
> Cc: NXP Linux Team <linux-imx@....com>
> Cc: Richard Leitner <richard.leitner@...data.com>
> Cc: Shawn Guo <shawnguo@...nel.org>
Applied.
Powered by blists - more mailing lists