diff options
author | Ioana Radulescu <ruxandra.radulescu@nxp.com> | 2018-03-20 07:04:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-22 18:15:34 +0100 |
commit | 8c3696102f3e76e2ebdd981b6b2ac1de004e1aef (patch) | |
tree | 83462101be7038bdf2bedab5dd1d6ea166ea4245 /drivers/staging/fsl-dpaa2 | |
parent | d59578da2bb8d69266351a399c377fc4bf4265b7 (diff) |
staging: fsl-dpaa2/eth: Defer probing if no MC portal available
MC portals may not be available at the initial probing attempt
due to dependencies on other modules.
Check the return value of the MC portal allocation function and
defer probing in case it's not available yet. For all other error
cases the behaviour stays the same.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Suggested-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-dpaa2')
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index f013af61c447..ac1a75042664 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2441,7 +2441,10 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev) err = fsl_mc_portal_allocate(dpni_dev, FSL_MC_IO_ATOMIC_CONTEXT_PORTAL, &priv->mc_io); if (err) { - dev_err(dev, "MC portal allocation failed\n"); + if (err == -ENXIO) + err = -EPROBE_DEFER; + else + dev_err(dev, "MC portal allocation failed\n"); goto err_portal_alloc; } |