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)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
netif_carrier_on(repr->netdev);
|
|
||||||
netif_tx_wake_all_queues(repr->netdev);
|
netif_tx_wake_all_queues(repr->netdev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -119,7 +118,6 @@ nfp_flower_repr_netdev_open(struct nfp_app *app, struct nfp_repr *repr)
|
||||||
static int
|
static int
|
||||||
nfp_flower_repr_netdev_stop(struct nfp_app *app, struct nfp_repr *repr)
|
nfp_flower_repr_netdev_stop(struct nfp_app *app, struct nfp_repr *repr)
|
||||||
{
|
{
|
||||||
netif_carrier_off(repr->netdev);
|
|
||||||
netif_tx_disable(repr->netdev);
|
netif_tx_disable(repr->netdev);
|
||||||
|
|
||||||
return nfp_flower_cmsg_portmod(repr, false);
|
return nfp_flower_cmsg_portmod(repr, false);
|
||||||
|
|
|
@ -336,6 +336,8 @@ struct net_device *nfp_repr_alloc(struct nfp_app *app)
|
||||||
if (!netdev)
|
if (!netdev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
netif_carrier_off(netdev);
|
||||||
|
|
||||||
repr = netdev_priv(netdev);
|
repr = netdev_priv(netdev);
|
||||||
repr->netdev = netdev;
|
repr->netdev = netdev;
|
||||||
repr->app = app;
|
repr->app = app;
|
||||||
|
|
Loading…
Reference in New Issue