Skip to content

Commit

Permalink
nfp: move vNIC reset before netdev init
Browse files Browse the repository at this point in the history
During probe we clear vNIC configuration in case the device
wasn't closed cleanly by previous driver.  Move that code
before netdev init, so netdev init can already try to apply
its config parameters.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Apr 13, 2019
1 parent dd5b249 commit 0a72d83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/netronome/nfp/nfp_net_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -3986,9 +3986,6 @@ int nfp_net_init(struct nfp_net *nn)
nn->dp.ctrl |= NFP_NET_CFG_CTRL_IRQMOD;
}

if (nn->dp.netdev)
nfp_net_netdev_init(nn);

/* Stash the re-configuration queue away. First odd queue in TX Bar */
nn->qcp_cfg = nn->tx_bar + NFP_QCP_QUEUE_ADDR_SZ;

Expand All @@ -4001,6 +3998,9 @@ int nfp_net_init(struct nfp_net *nn)
if (err)
return err;

if (nn->dp.netdev)
nfp_net_netdev_init(nn);

nfp_net_vecs_init(nn);

if (!nn->dp.netdev)
Expand Down

0 comments on commit 0a72d83

Please sign in to comment.