* Re: Patch "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" has been added to the 5.3-stable tree
[not found] <157468851123632@kroah.com>
@ 2019-11-25 13:45 ` Marek Behún
2019-11-26 13:54 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Marek Behún @ 2019-11-25 13:45 UTC (permalink / raw)
To: stable; +Cc: gregkh, davem
Upstream reverted this commit (2c61e821da7a) and then used 6e4ff1c94a04
instead.
Marek
On Mon, 25 Nov 2019 14:28:31 +0100
<gregkh@linuxfoundation.org> wrote:
> This is a note to let you know that I've just added the patch titled
>
> mdio_bus: fix mdio_register_device when RESET_CONTROLLER is
> disabled
>
> to the 5.3-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:
> 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 <stable@vger.kernel.org> know about it.
>
>
> From foo@baz Mon 25 Nov 2019 02:27:19 PM CET
> From: "Marek Behún" <marek.behun@nic.cz>
> Date: Mon, 18 Nov 2019 19:15:05 +0100
> Subject: mdio_bus: fix mdio_register_device when RESET_CONTROLLER is
> disabled
>
> From: "Marek Behún" <marek.behun@nic.cz>
>
> [ Upstream commit 075e238d12c21c8bde700d21fb48be7a3aa80194 ]
>
> When CONFIG_RESET_CONTROLLER is disabled, the
> devm_reset_control_get_exclusive function returns -ENOTSUPP. This is
> not handled in subsequent check and then the mdio device fails to
> probe.
>
> When CONFIG_RESET_CONTROLLER is enabled, its code checks in OF for
> reset device, and since it is not present, returns -ENOENT. -ENOENT
> is handled. Add -ENOTSUPP also.
>
> This happened to me when upgrading kernel on Turris Omnia. You either
> have to enable CONFIG_RESET_CONTROLLER or use this patch.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Fixes: 71dd6c0dff51b ("net: phy: add support for reset-controller")
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/net/phy/mdio_bus.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -68,11 +68,12 @@ static int mdiobus_register_reset(struct
> if (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
> marek.behun@nic.cz are
>
> queue-5.3/mdio_bus-fix-mdio_register_device-when-reset_controller-is-disabled.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" has been added to the 5.3-stable tree
2019-11-25 13:45 ` Patch "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" has been added to the 5.3-stable tree Marek Behún
@ 2019-11-26 13:54 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-11-26 13:54 UTC (permalink / raw)
To: Marek Behún; +Cc: stable, davem
On Mon, Nov 25, 2019 at 02:45:38PM +0100, Marek Behún wrote:
> Upstream reverted this commit (2c61e821da7a) and then used 6e4ff1c94a04
> instead.
Thanks for the info, I'll go make that change here too.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-26 13:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <157468851123632@kroah.com>
2019-11-25 13:45 ` Patch "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" has been added to the 5.3-stable tree Marek Behún
2019-11-26 13:54 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).