Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-10 Thread Marek Vasut
On 10/9/20 8:02 PM, Jakub Kicinski wrote: > On Fri, 9 Oct 2020 19:34:10 +0200 Marek Vasut wrote: > To an untrained eye this looks pretty weird. I see, I'm not quite sure how to address this comment. >>> >>> If ndev->phydev sometimes is not-NULL on open, then that's a valid >>> s

Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-09 Thread Jakub Kicinski
On Fri, 9 Oct 2020 19:34:10 +0200 Marek Vasut wrote: > >>> To an untrained eye this looks pretty weird. > >> > >> I see, I'm not quite sure how to address this comment. > > > > If ndev->phydev sometimes is not-NULL on open, then that's a valid > > state to be in. Why not make sure that we're

Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-09 Thread Marek Vasut
On 10/9/20 5:15 PM, Jakub Kicinski wrote: > On Fri, 9 Oct 2020 09:20:30 +0200 Marek Vasut wrote: >>> Can you describe your problem in detail? >> >> Yes, I tried to do that in the commit message and the extra detailed >> comment above the code. What exactly do you not understand from that? > > Wh

Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-09 Thread Jakub Kicinski
On Fri, 9 Oct 2020 09:20:30 +0200 Marek Vasut wrote: > > Can you describe your problem in detail? > > Yes, I tried to do that in the commit message and the extra detailed > comment above the code. What exactly do you not understand from that? Why it's not bound on the first open (I'm guessing i

Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-09 Thread Marek Vasut
On 10/9/20 2:46 AM, Jakub Kicinski wrote: > On Wed, 7 Oct 2020 00:02:42 +0200 Marek Vasut wrote: >> On 10/6/20 11:09 PM, Florian Fainelli wrote: >>> On 10/6/2020 1:20 PM, Marek Vasut wrote: The phy_reset_after_clk_enable() is always called with ndev->phydev, however that pointer may be

Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-08 Thread Jakub Kicinski
On Wed, 7 Oct 2020 00:02:42 +0200 Marek Vasut wrote: > On 10/6/20 11:09 PM, Florian Fainelli wrote: > > On 10/6/2020 1:20 PM, 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 > >>

Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-06 Thread Marek Vasut
On 10/6/20 11:09 PM, Florian Fainelli wrote: > > > On 10/6/2020 1:20 PM, 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.

Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-06 Thread Florian Fainelli
On 10/6/2020 1:20 PM, 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. If the PHY still is not bound to the MAC, but there is

RE: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable() [Klartext]

2020-10-06 Thread Christoph Niedermaier
From: Marek Vasut Sent: Tuesday, October 6, 2020 10:20 PM > 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. > > If the PHY still is not bound t

[PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-06 Thread Marek Vasut
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. If the PHY still is not bound to the MAC, but there is OF PHY node and a matching PHY device instance