This is a note to let you know that I've just added the patch titled net: phy: micrel: Make the GPIO to be non-exclusive to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-phy-micrel-make-the-gpio-to-be-non-exclusive.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 7de532302be7d476c6f8a0ca69cb2f4765ea65b7 Author: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx> Date: Tue Aug 30 08:40:55 2022 +0200 net: phy: micrel: Make the GPIO to be non-exclusive [ Upstream commit 4a4ce82212ef014d70f486a427005b2b5bab8e34 ] The same GPIO line can be shared by multiple phys for the coma mode pin. If that is the case then, all the other phys that share the same line will failed to be probed because the access to the gpio line is not non-exclusive. Fix this by making access to the gpio line to be nonexclusive using flag GPIOD_FLAGS_BIT_NONEXCLUSIVE. This allows all the other PHYs to be probed. Fixes: 738871b09250ee ("net: phy: micrel: add coma mode GPIO") Reviewed-by: Andrew Lunn <andrew@xxxxxxx> Signed-off-by: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20220830064055.2340403-1-horatiu.vultur@xxxxxxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 22139901f01c7..34483a4bd688a 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -2838,12 +2838,18 @@ static int lan8814_config_init(struct phy_device *phydev) return 0; } +/* It is expected that there will not be any 'lan8814_take_coma_mode' + * function called in suspend. Because the GPIO line can be shared, so if one of + * the phys goes back in coma mode, then all the other PHYs will go, which is + * wrong. + */ static int lan8814_release_coma_mode(struct phy_device *phydev) { struct gpio_desc *gpiod; gpiod = devm_gpiod_get_optional(&phydev->mdio.dev, "coma-mode", - GPIOD_OUT_HIGH_OPEN_DRAIN); + GPIOD_OUT_HIGH_OPEN_DRAIN | + GPIOD_FLAGS_BIT_NONEXCLUSIVE); if (IS_ERR(gpiod)) return PTR_ERR(gpiod);