summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fsl-dpaa2
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2020-07-14 16:34:29 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-15 16:22:36 +0200
commit03ad6de9bb3e6e48b2ab87226f545f8a301017fa (patch)
tree7de30822e0b05654efce7b3f527fe44bb1a3664f /drivers/staging/fsl-dpaa2
parentb53bb527d88ae963bdf9bd71f222cf459fc59d2b (diff)
downloadlinux-03ad6de9bb3e6e48b2ab87226f545f8a301017fa.tar.gz
linux-03ad6de9bb3e6e48b2ab87226f545f8a301017fa.tar.bz2
linux-03ad6de9bb3e6e48b2ab87226f545f8a301017fa.zip
staging: dpaa2-ethsw: disable switch ports are probe time
The MC firmware will enable the switch interfaces at DPSW creation without waiting for an 'ifconfig up' on the switch interfaces. When this happens, the states held by the Linux software vs the firmware are not in sync. Make sure to disable the switch ports at probe time to not encounter this issue. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/20200714133431.17532-5-ioana.ciornei@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/ethsw/ethsw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index a1917842536e..f283ce195c1e 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -1672,6 +1672,10 @@ static int ethsw_probe(struct fsl_mc_device *sw_dev)
goto err_free_ports;
}
+ /* Make sure the switch ports are disabled at probe time */
+ for (i = 0; i < ethsw->sw_attr.num_ifs; i++)
+ dpsw_if_disable(ethsw->mc_io, 0, ethsw->dpsw_handle, i);
+
/* Setup IRQs */
err = ethsw_setup_irqs(sw_dev);
if (err)