Skip to content

Commit

Permalink
staging: dpaa2-ethsw: disable switch ports are probe time
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ioana Ciornei authored and Greg Kroah-Hartman committed Jul 15, 2020
1 parent b53bb52 commit 03ad6de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/staging/fsl-dpaa2/ethsw/ethsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 03ad6de

Please sign in to comment.