Patch "net: stmmac: use dev_err_probe() for reporting mdio bus registration failure" has been added to the 5.4-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    net: stmmac: use dev_err_probe() for reporting mdio bus registration failure

to the 5.4-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-stmmac-use-dev_err_probe-for-reporting-mdio-bus-.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 90a94e15248d583935c1fd5dbda48f0c1884fc44
Author: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
Date:   Thu Jun 2 09:48:40 2022 +0200

    net: stmmac: use dev_err_probe() for reporting mdio bus registration failure
    
    [ Upstream commit 839612d23ffd933174db911ce56dc3f3ca883ec5 ]
    
    I have a board where these two lines are always printed during boot:
    
       imx-dwmac 30bf0000.ethernet: Cannot register the MDIO bus
       imx-dwmac 30bf0000.ethernet: stmmac_dvr_probe: MDIO bus (id: 1) registration failed
    
    It's perfectly fine, and the device is successfully (and silently, as
    far as the console goes) probed later.
    
    Use dev_err_probe() instead, which will demote these messages to debug
    level (thus removing the alarming messages from the console) when the
    error is -EPROBE_DEFER, and also has the advantage of including the
    error code if/when it happens to be something other than -EPROBE_DEFER.
    
    While here, add the missing \n to one of the format strings.
    
    Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220602074840.1143360-1-linux@xxxxxxxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Stable-dep-of: e23c0d21ce92 ("net: stmmac: Handle disabled MDIO busses from devicetree")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4eaa65e8d58f2..ee48283b2d967 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4691,9 +4691,9 @@ int stmmac_dvr_probe(struct device *device,
 		/* MDIO bus Registration */
 		ret = stmmac_mdio_register(ndev);
 		if (ret < 0) {
-			dev_err(priv->device,
-				"%s: MDIO bus (id: %d) registration failed",
-				__func__, priv->plat->bus_id);
+			dev_err_probe(priv->device, ret,
+				      "%s: MDIO bus (id: %d) registration failed\n",
+				      __func__, priv->plat->bus_id);
 			goto error_mdio_register;
 		}
 	}
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index 40c42637ad755..846bf51f77b61 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -359,7 +359,7 @@ int stmmac_mdio_register(struct net_device *ndev)
 
 	err = of_mdiobus_register(new_bus, mdio_node);
 	if (err != 0) {
-		dev_err(dev, "Cannot register the MDIO bus\n");
+		dev_err_probe(dev, err, "Cannot register the MDIO bus\n");
 		goto bus_register_fail;
 	}
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux