staging: dpaa2-ethsw: use netif_running when checking for port up
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 14 Jul 2020 13:34:28 +0000 (16:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jul 2020 14:22:36 +0000 (16:22 +0200)
commitb53bb527d88ae963bdf9bd71f222cf459fc59d2b
tree65586b32963b8f3b72e0c0c52d1739ade9a9aef5
parent2cde6410c13d63cc306f395d9fa4b72605468061
staging: dpaa2-ethsw: use netif_running when checking for port up

There are some cases where the switch interface needs to be disabled so
that changes in the configuration can be made. In such cases, we should
check for a running interface (bit __LINK_STATE_START of the netdev)
instead of netif_carrier_ok(). This is because on open() we enable the
switch interface even though the link up has not come out yet.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20200714133431.17532-4-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-dpaa2/ethsw/ethsw.c