Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "Marek Behún" <marek.behun@nic.cz>
To: <stable@vger.kernel.org>
Cc: <gregkh@linuxfoundation.org>, davem@davemloft.net
Subject: Re: Patch "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" has been added to the 5.3-stable tree
Date: Mon, 25 Nov 2019 14:45:38 +0100	[thread overview]
Message-ID: <20191125144538.276daf86@dellmb> (raw)
In-Reply-To: <157468851123632@kroah.com>

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


       reply	other threads:[~2019-11-25 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <157468851123632@kroah.com>
2019-11-25 13:45 ` Marek Behún [this message]
2019-11-26 13:54   ` Patch "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" has been added to the 5.3-stable tree Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191125144538.276daf86@dellmb \
    --to=marek.behun@nic.cz \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox