aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fsl-dpaa2
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2020-07-14 16:34:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-15 16:22:36 +0200
commit2cde6410c13d63cc306f395d9fa4b72605468061 (patch)
tree345768eab8eb8e4372ad8f8a5a741377120df088 /drivers/staging/fsl-dpaa2
parentstaging: dpaa2-ethsw: fix reported link state (diff)
downloadlinux-dev-2cde6410c13d63cc306f395d9fa4b72605468061.tar.xz
linux-dev-2cde6410c13d63cc306f395d9fa4b72605468061.zip
staging: dpaa2-ethsw: ignore state interrupts when the interface is not running
Link state interrupts will be transmitted to the DPSW object even though the user has not yet issued a 'ifconfig up' on a switch interface. Don't act on those interrupts since there are of no interrest. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/20200714133431.17532-3-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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index 46aa37093e86..b57bc705c2ee 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -445,6 +445,12 @@ static int port_carrier_state_sync(struct net_device *netdev)
struct dpsw_link_state state;
int err;
+ /* Interrupts are received even though no one issued an 'ifconfig up'
+ * on the switch interface. Ignore these link state update interrupts
+ */
+ if (!netif_running(netdev))
+ return 0;
+
err = dpsw_if_get_link_state(port_priv->ethsw_data->mc_io, 0,
port_priv->ethsw_data->dpsw_handle,
port_priv->idx, &state);