[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CH2PR02MB70009FEE62CD2AB6B40911E5C7500@CH2PR02MB7000.namprd02.prod.outlook.com>
Date: Tue, 17 Dec 2019 06:19:47 +0000
From: Radhey Shyam Pandey <radheys@...inx.com>
To: Richard Cochran <richardcochran@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
David Miller <davem@...emloft.net>,
Michal Simek <michals@...inx.com>
Subject: RE: [PATCH net-next 1/3] net: axienet: Propagate registration errors
during probe.
> -----Original Message-----
> From: Richard Cochran <richardcochran@...il.com>
> Sent: Tuesday, December 17, 2019 12:03 AM
> To: netdev@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org; David Miller
> <davem@...emloft.net>; Michal Simek <michals@...inx.com>; Radhey
> Shyam Pandey <radheys@...inx.com>
> Subject: [PATCH net-next 1/3] net: axienet: Propagate registration errors
> during probe.
>
> The function, axienet_mdio_setup(), calls of_mdiobus_register() which
> might return EDEFER_PROBE. However, this error is not propagated to
EPROBE_DEFER. In which scenario we are hitting probe_defer?
> the driver's probe method, and so deferred registration cannot happen.
> This patch fixes the issue by handling the error code properly.
>
> Signed-off-by: Richard Cochran <richardcochran@...il.com>
> ---
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 20746b801959..53644abe52da 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -1835,9 +1835,10 @@ static int axienet_probe(struct platform_device
> *pdev)
> }
>
> ret = axienet_mdio_setup(lp);
> - if (ret)
> - dev_warn(&pdev->dev,
> - "error registering MDIO bus: %d\n", ret);
> + if (ret) {
> + dev_err(&pdev->dev, "error registering MDIO
> bus\n");
Error handling for _mdio_setup failure seems ok. Minor nit- skip printing
message " error registering MDIO bus" for defer case.
> + goto free_netdev;
> + }
> }
>
> lp->phylink_config.dev = &ndev->dev;
> --
> 2.20.1
Powered by blists - more mailing lists