diff options
author | Bharat Bhushan <Bharat.Bhushan@nxp.com> | 2017-05-02 11:54:26 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:25 (GMT) |
commit | d1700e48331006ac3b357ae1a2eece107cb9dca0 (patch) | |
tree | 31f3da80b9ad4574c5c5f18308a3715401ef8ea2 /drivers | |
parent | 9ad5979975f9eee7724d0dbe7339b7f6797f4371 (diff) | |
download | linux-d1700e48331006ac3b357ae1a2eece107cb9dca0.tar.xz |
staging: fsl-dpaa2/eth: Defer probing if no DPIO/DPCON
There are possibility that the DPIO/DPCON are probed after
DPNI, so DPNI probing should be deferred.
I observed below prints and no DPAA2-Ethernet interface was available
fsl_dpaa2_eth dpni.0: No affine DPIO for cpu 0
fsl_dpaa2_eth dpni.0: No cpu with an affine DPIO/DPCON
This patch defer DPAA2-ETH driver probing when DPIO/DPPCON
are not yet available.
Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index b9be48d..8af795e 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -1697,7 +1697,7 @@ static int setup_dpio(struct dpaa2_eth_priv *priv) /* Register the new context */ err = dpaa2_io_service_register(NULL, nctx); if (err) { - dev_info(dev, "No affine DPIO for cpu %d\n", i); + dev_dbg(dev, "No affine DPIO for cpu %d\n", i); /* If no affine DPIO for this core, there's probably * none available for next cores either. */ @@ -1742,7 +1742,7 @@ err_service_reg: free_channel(priv, channel); err_alloc_ch: if (cpumask_empty(&priv->dpio_cpumask)) { - dev_err(dev, "No cpu with an affine DPIO/DPCON\n"); + dev_dbg(dev, "No cpu with an affine DPIO/DPCON\n"); return -ENODEV; } cpumask_copy(&priv->txconf_cpumask, &priv->dpio_cpumask); @@ -2954,8 +2954,11 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev) goto err_dpni_setup; err = setup_dpio(priv); - if (err) + if (err) { + dev_info(dev, "Defer probing as no DPIO available\n"); + err = -EPROBE_DEFER; goto err_dpio_setup; + } setup_fqs(priv); |