Re: Patch "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" has been added to the 5.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Upstream reverted this commit (2c61e821da7a) and then used 6e4ff1c94a04
instead.

Marek
  

On Mon, 25 Nov 2019 14:28:31 +0100
<gregkh@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> know about it.
> 
> 
> From foo@baz Mon 25 Nov 2019 02:27:19 PM CET
> From: "Marek Behún" <marek.behun@xxxxxx>
> 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@xxxxxx>
> 
> [ 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@xxxxxx>
> Fixes: 71dd6c0dff51b ("net: phy: add support for reset-controller")
> Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> Cc: Andrew Lunn <andrew@xxxxxxx>
> Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  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@xxxxxx are
> 
> queue-5.3/mdio_bus-fix-mdio_register_device-when-reset_controller-is-disabled.patch





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux