mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 20:21:06 +07:00
nfp: flower: obtain repr link state only from firmware
Instead of starting up reprs assuming that there is link, only respond to the link state reported by firmware. Furthermore, ensure link is down after repr netdevs are created. 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>
This commit is contained in:
parent
ee7e16b66a
commit
c6d20ab4d7
@ -110,7 +110,6 @@ nfp_flower_repr_netdev_open(struct nfp_app *app, struct nfp_repr *repr)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
netif_carrier_on(repr->netdev);
|
||||
netif_tx_wake_all_queues(repr->netdev);
|
||||
|
||||
return 0;
|
||||
@ -119,7 +118,6 @@ nfp_flower_repr_netdev_open(struct nfp_app *app, struct nfp_repr *repr)
|
||||
static int
|
||||
nfp_flower_repr_netdev_stop(struct nfp_app *app, struct nfp_repr *repr)
|
||||
{
|
||||
netif_carrier_off(repr->netdev);
|
||||
netif_tx_disable(repr->netdev);
|
||||
|
||||
return nfp_flower_cmsg_portmod(repr, false);
|
||||
|
@ -336,6 +336,8 @@ struct net_device *nfp_repr_alloc(struct nfp_app *app)
|
||||
if (!netdev)
|
||||
return NULL;
|
||||
|
||||
netif_carrier_off(netdev);
|
||||
|
||||
repr = netdev_priv(netdev);
|
||||
repr->netdev = netdev;
|
||||
repr->app = app;
|
||||
|
Loading…
Reference in New Issue
Block a user