Skip to content

Commit

Permalink
staging: dpaa2-ethsw: ignore state interrupts when the interface is n…
Browse files Browse the repository at this point in the history
…ot 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>
  • Loading branch information
Ioana Ciornei authored and Greg Kroah-Hartman committed Jul 15, 2020
1 parent 06ddf55 commit 2cde641
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/staging/fsl-dpaa2/ethsw/ethsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2cde641

Please sign in to comment.