diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2018-11-09 15:26:46 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-09 20:08:58 -0800 |
commit | 5500598abbfb5b46201b9768bd9ea873a5eeaece (patch) | |
tree | 83d8fa6c45d48ae8307a1a0aa4fad3365593a89a /drivers/net/ethernet/freescale | |
parent | d7f5a9d89a55af68908a013811404971f88d661e (diff) |
dpaa2-ptp: defer probe when portal allocation failed
The fsl_mc_portal_allocate can fail when the requested MC portals are
not yet probed by the fsl_mc_allocator. In this situation, the driver
should defer the probe.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c index 84b942b1eccc..9b150db3b510 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c @@ -140,7 +140,10 @@ static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev) err = fsl_mc_portal_allocate(mc_dev, 0, &mc_dev->mc_io); if (err) { - dev_err(dev, "fsl_mc_portal_allocate err %d\n", err); + if (err == -ENXIO) + err = -EPROBE_DEFER; + else + dev_err(dev, "fsl_mc_portal_allocate err %d\n", err); goto err_exit; } |