Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-21 Thread Ahmad Fatoum
On 08/21/2018 03:34 PM, Andrew Lunn wrote: > I don't see where this is happening. It is looking for a gpio called > 'link-gpios'. First while registering the MDIO bus in __mdiobus_register: gpiod = devm_gpiod_get_optional(>dev, "reset", GPIOD_OUT_LOW); and then again when registering

Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-21 Thread Andrew Lunn
> I've traced it some more: While mdiobus_register fails to find a PHY, > creation of the "MDIO" bus is still successful and it returns successfully, > having claimed the reset GPIO. > > of_phy_fixed_link_register tries to claim the same GPIO and fails. I don't see where this is happening. It

Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-21 Thread Ahmad Fatoum
On 08/20/2018 09:06 PM, Andrew Lunn wrote: > I would actually say, this is your real issue here. The warnings are > annoying, but i don't think they are fatal. This -EBUSY is what is > stopping the driver from loading, causing the real regression. My real issue is that a specific commit broke the

Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-20 Thread Andrew Lunn
On Mon, Aug 20, 2018 at 05:56:53PM +0200, Ahmad Fatoum wrote: > On 08/20/2018 03:55 PM, Andrew Lunn wrote: > > Why is of_phy_register_fixed_link(np) failing? > > Apparently, the fixed-link's gpio's FLAG_REQUESTED bit remained set > causing gpiod_request_commit to return -EBUSY in (v4.18.0): > >

Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-20 Thread Ahmad Fatoum
On 08/20/2018 03:55 PM, Andrew Lunn wrote: > Why is of_phy_register_fixed_link(np) failing? Apparently, the fixed-link's gpio's FLAG_REQUESTED bit remained set causing gpiod_request_commit to return -EBUSY in (v4.18.0): [] (gpiod_request_commit) from [] (gpiod_request+0x64/0x88) []

Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-20 Thread Andrew Lunn
On Mon, Aug 20, 2018 at 02:12:35PM +0200, Ahmad Fatoum wrote: > The referenced commit broke initializing macb on the EVB-KSZ9477 eval board. > There, of_mdiobus_register was called even for the fixed-link representing > the SPI-connected switch PHY, with the result that the driver attempts to >

[PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-20 Thread Ahmad Fatoum
The referenced commit broke initializing macb on the EVB-KSZ9477 eval board. There, of_mdiobus_register was called even for the fixed-link representing the SPI-connected switch PHY, with the result that the driver attempts to enumerate PHYs on a non-existent MDIO bus: libphy: