Patch "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" has been added to the 5.3-stable tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
Upstream reverted this commit (2c61e821da7a) and then used 6e4ff1c94a04 instead.
Marek
Quoted 77 lines · On Mon, 25 Nov 2019 14:28:31 +0100 <[email protected]> wrote:
This is a note to let you know that I've just added the patch titled
mdio_bus: fixmdio_register_devicewhenRESET_CONTROLLERis
disabledto the 5.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summaryThe filename of the patch is:
mdio_bus-fix-mdio_register_device-when-reset_controller-is-disabled.patch
and it can be found in the queue-5.3 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From foo@baz Mon 25 Nov 2019 02:27:19 PM CET
From: "Marek Behún" <[email protected]>
Date: Mon, 18 Nov 2019 19:15:05 +0100
Subject:mdio_bus: fixmdio_register_devicewhenRESET_CONTROLLERis disabledFrom: "Marek Behún" <[email protected]>
[ Upstream commit
075e238d12c21c8bde700d21fb48be7a3aa80194]When
CONFIG_RESET_CONTROLLERis disabled, thedevm_reset_control_get_exclusivefunction returns-ENOTSUPP. This is not handled in subsequent check and then the mdio device fails to probe.When
CONFIG_RESET_CONTROLLERis enabled, its code checks in OF for reset device, and since it is not present, returns-ENOENT.-ENOENTis handled. Add-ENOTSUPPalso.This happened to me when upgrading kernel on Turris Omnia. You either have to enable
CONFIG_RESET_CONTROLLERor use this patch.Signed-off-by Marek Behún <[email protected]>Fixes 71dd6c0dff51b ("net: phy: add support for reset-controller")Cc Dmitry Torokhov <[email protected]>Cc Andrew Lunn <[email protected]>Cc Andy Shevchenko <[email protected]>Reviewed-by Andrew Lunn <[email protected]>Signed-off-by David S. Miller <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/net/phy/mdio_bus.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)drivers/net/phy/mdio_bus.c +6
-6@@ -68,11 +68,12 @@ static int mdiobus_register_reset(structif (mdiodev->dev.of_node) reset =devm_reset_control_get_exclusive (&mdiodev->dev,"phy" ); -if (PTR_ERR (reset) == -ENOENT || -PTR_ERR (reset) == -ENOTSUPP ) - reset =NULL ; -else if (IS_ERR (reset)) -return PTR_ERR (reset); +if (IS_ERR (reset)) { +if (PTR_ERR (reset) == -ENOENT ||PTR_ERR (reset) == -ENOTSUPP) + reset = NULL; +else +return PTR_ERR (reset); + } mdiodev->reset_ctrl = reset;Patches currently in stable-queue which might be from [email protected] are
queue-5.3/mdio_bus-fix-mdio_register_device-when-reset_controller-is-disabled.patch
Greg KH
maintainerQuoted 2 lines · Marek Behún
Upstream reverted this commit (
2c61e821da7a) and then used6e4ff1c94a04instead.
Thanks for the info, I'll go make that change here too.
greg k-h