* [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev()
@ 2017-05-18 13:01 Geert Uytterhoeven
2017-05-18 13:01 ` [PATCH 2/2] sh_eth: Do not print an error message for probe deferral Geert Uytterhoeven
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2017-05-18 13:01 UTC (permalink / raw)
To: Sergei Shtylyov, David S . Miller
Cc: Laurent Pinchart, netdev, linux-renesas-soc, Geert Uytterhoeven
The MDIO initialization failure message is printed using the network
device, before it has been registered, leading to:
(null): failed to initialise MDIO
Use the platform device instead to fix this:
sh-eth ee700000.ethernet: failed to initialise MDIO
Fixes: daacf03f0bbfefee ("sh_eth: Register MDIO bus before registering the network device")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/net/ethernet/renesas/sh_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index f68c4db656eda846..c85222b02754f5a7 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -3220,7 +3220,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
/* MDIO bus init */
ret = sh_mdio_init(mdp, pd);
if (ret) {
- dev_err(&ndev->dev, "failed to initialise MDIO\n");
+ dev_err(&pdev->dev, "failed to initialise MDIO\n");
goto out_release;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] sh_eth: Do not print an error message for probe deferral
2017-05-18 13:01 [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Geert Uytterhoeven
@ 2017-05-18 13:01 ` Geert Uytterhoeven
2017-05-18 13:08 ` Laurent Pinchart
` (2 more replies)
2017-05-18 13:08 ` [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Laurent Pinchart
` (2 subsequent siblings)
3 siblings, 3 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2017-05-18 13:01 UTC (permalink / raw)
To: Sergei Shtylyov, David S . Miller
Cc: Laurent Pinchart, netdev, linux-renesas-soc, Geert Uytterhoeven
EPROBE_DEFER is not an error, hence printing an error message like
sh-eth ee700000.ethernet: failed to initialise MDIO
may confuse the user.
To fix this, suppress the error message in case of probe deferral.
While at it, shorten the message, and add the actual error code.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/net/ethernet/renesas/sh_eth.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index c85222b02754f5a7..2d686ccf971b1b65 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -3220,7 +3220,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
/* MDIO bus init */
ret = sh_mdio_init(mdp, pd);
if (ret) {
- dev_err(&pdev->dev, "failed to initialise MDIO\n");
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "MDIO init failed: %d\n", ret);
goto out_release;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev()
2017-05-18 13:01 [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Geert Uytterhoeven
2017-05-18 13:01 ` [PATCH 2/2] sh_eth: Do not print an error message for probe deferral Geert Uytterhoeven
@ 2017-05-18 13:08 ` Laurent Pinchart
2017-05-18 15:21 ` David Miller
2017-05-18 16:32 ` Sergei Shtylyov
3 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2017-05-18 13:08 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Sergei Shtylyov, David S . Miller, Laurent Pinchart, netdev,
linux-renesas-soc
Hi Geert,
Thank you for the patch.
On Thursday 18 May 2017 15:01:34 Geert Uytterhoeven wrote:
> The MDIO initialization failure message is printed using the network
> device, before it has been registered, leading to:
>
> (null): failed to initialise MDIO
>
> Use the platform device instead to fix this:
>
> sh-eth ee700000.ethernet: failed to initialise MDIO
>
> Fixes: daacf03f0bbfefee ("sh_eth: Register MDIO bus before registering the
> network device")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/net/ethernet/renesas/sh_eth.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/renesas/sh_eth.c
> b/drivers/net/ethernet/renesas/sh_eth.c index
> f68c4db656eda846..c85222b02754f5a7 100644
> --- a/drivers/net/ethernet/renesas/sh_eth.c
> +++ b/drivers/net/ethernet/renesas/sh_eth.c
> @@ -3220,7 +3220,7 @@ static int sh_eth_drv_probe(struct platform_device
> *pdev) /* MDIO bus init */
> ret = sh_mdio_init(mdp, pd);
> if (ret) {
> - dev_err(&ndev->dev, "failed to initialise MDIO\n");
> + dev_err(&pdev->dev, "failed to initialise MDIO\n");
> goto out_release;
> }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] sh_eth: Do not print an error message for probe deferral
2017-05-18 13:01 ` [PATCH 2/2] sh_eth: Do not print an error message for probe deferral Geert Uytterhoeven
@ 2017-05-18 13:08 ` Laurent Pinchart
2017-05-18 15:21 ` David Miller
2017-05-18 16:37 ` Sergei Shtylyov
2 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2017-05-18 13:08 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Sergei Shtylyov, David S . Miller, Laurent Pinchart, netdev,
linux-renesas-soc
Hi Geert,
Thank you for the patch.
On Thursday 18 May 2017 15:01:35 Geert Uytterhoeven wrote:
> EPROBE_DEFER is not an error, hence printing an error message like
>
> sh-eth ee700000.ethernet: failed to initialise MDIO
>
> may confuse the user.
>
> To fix this, suppress the error message in case of probe deferral.
> While at it, shorten the message, and add the actual error code.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/net/ethernet/renesas/sh_eth.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/renesas/sh_eth.c
> b/drivers/net/ethernet/renesas/sh_eth.c index
> c85222b02754f5a7..2d686ccf971b1b65 100644
> --- a/drivers/net/ethernet/renesas/sh_eth.c
> +++ b/drivers/net/ethernet/renesas/sh_eth.c
> @@ -3220,7 +3220,8 @@ static int sh_eth_drv_probe(struct platform_device
> *pdev) /* MDIO bus init */
> ret = sh_mdio_init(mdp, pd);
> if (ret) {
> - dev_err(&pdev->dev, "failed to initialise MDIO\n");
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "MDIO init failed: %d\n", ret);
> goto out_release;
> }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev()
2017-05-18 13:01 [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Geert Uytterhoeven
2017-05-18 13:01 ` [PATCH 2/2] sh_eth: Do not print an error message for probe deferral Geert Uytterhoeven
2017-05-18 13:08 ` [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Laurent Pinchart
@ 2017-05-18 15:21 ` David Miller
2017-05-18 16:32 ` Sergei Shtylyov
3 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2017-05-18 15:21 UTC (permalink / raw)
To: geert+renesas
Cc: sergei.shtylyov, laurent.pinchart+renesas, netdev,
linux-renesas-soc
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Thu, 18 May 2017 15:01:34 +0200
> The MDIO initialization failure message is printed using the network
> device, before it has been registered, leading to:
>
> (null): failed to initialise MDIO
>
> Use the platform device instead to fix this:
>
> sh-eth ee700000.ethernet: failed to initialise MDIO
>
> Fixes: daacf03f0bbfefee ("sh_eth: Register MDIO bus before registering the network device")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] sh_eth: Do not print an error message for probe deferral
2017-05-18 13:01 ` [PATCH 2/2] sh_eth: Do not print an error message for probe deferral Geert Uytterhoeven
2017-05-18 13:08 ` Laurent Pinchart
@ 2017-05-18 15:21 ` David Miller
2017-05-18 16:37 ` Sergei Shtylyov
2 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2017-05-18 15:21 UTC (permalink / raw)
To: geert+renesas
Cc: sergei.shtylyov, laurent.pinchart+renesas, netdev,
linux-renesas-soc
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Thu, 18 May 2017 15:01:35 +0200
> EPROBE_DEFER is not an error, hence printing an error message like
>
> sh-eth ee700000.ethernet: failed to initialise MDIO
>
> may confuse the user.
>
> To fix this, suppress the error message in case of probe deferral.
> While at it, shorten the message, and add the actual error code.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev()
2017-05-18 13:01 [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Geert Uytterhoeven
` (2 preceding siblings ...)
2017-05-18 15:21 ` David Miller
@ 2017-05-18 16:32 ` Sergei Shtylyov
3 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2017-05-18 16:32 UTC (permalink / raw)
To: Geert Uytterhoeven, David S . Miller
Cc: Laurent Pinchart, netdev, linux-renesas-soc
On 05/18/2017 04:01 PM, Geert Uytterhoeven wrote:
> The MDIO initialization failure message is printed using the network
> device, before it has been registered, leading to:
>
> (null): failed to initialise MDIO
>
> Use the platform device instead to fix this:
>
> sh-eth ee700000.ethernet: failed to initialise MDIO
>
> Fixes: daacf03f0bbfefee ("sh_eth: Register MDIO bus before registering the network device")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
MBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] sh_eth: Do not print an error message for probe deferral
2017-05-18 13:01 ` [PATCH 2/2] sh_eth: Do not print an error message for probe deferral Geert Uytterhoeven
2017-05-18 13:08 ` Laurent Pinchart
2017-05-18 15:21 ` David Miller
@ 2017-05-18 16:37 ` Sergei Shtylyov
2 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2017-05-18 16:37 UTC (permalink / raw)
To: Geert Uytterhoeven, David S . Miller
Cc: Laurent Pinchart, netdev, linux-renesas-soc
On 05/18/2017 04:01 PM, Geert Uytterhoeven wrote:
> EPROBE_DEFER is not an error, hence printing an error message like
>
> sh-eth ee700000.ethernet: failed to initialise MDIO
>
> may confuse the user.
>
> To fix this, suppress the error message in case of probe deferral.
> While at it, shorten the message, and add the actual error code.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
MBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-05-18 16:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 13:01 [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Geert Uytterhoeven
2017-05-18 13:01 ` [PATCH 2/2] sh_eth: Do not print an error message for probe deferral Geert Uytterhoeven
2017-05-18 13:08 ` Laurent Pinchart
2017-05-18 15:21 ` David Miller
2017-05-18 16:37 ` Sergei Shtylyov
2017-05-18 13:08 ` [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Laurent Pinchart
2017-05-18 15:21 ` David Miller
2017-05-18 16:32 ` Sergei Shtylyov
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).