nfp: set config bit (ifup/ifdown) on netdev open/close
authorDirk van der Merwe <dirk.vandermerwe@netronome.com>
Tue, 25 Jul 2017 07:51:08 +0000 (00:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jul 2017 19:29:45 +0000 (12:29 -0700)
commit447e9ebfc19950559ebb9aa08302a7f11ab1508c
treee639ef390d92a1b7ba6ba8ee6695e65f3e811e91
parent81fc9b5ccf84674ad70b1cdf29abd36397097d66
nfp: set config bit (ifup/ifdown) on netdev open/close

When a netdev (PF netdev or representor) is opened or closed, set the
physical port config bit appropriately - which powers UP/DOWN the PHY
module for the physical interface.

The PHY is powered first in the HW/FW configuration step when opening
the netdev and again last in the HW/FW configuration step when closing
the netdev.

This is only applicable when there is a physical port associated with
the netdev and if the NSP support this. Otherwise we silently ignore
this step.

The 'nfp_eth_set_configured' can actually return positive values -
updated the function documentation appropriately.

Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
drivers/net/ethernet/netronome/nfp/nfp_port.c
drivers/net/ethernet/netronome/nfp/nfp_port.h
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c