diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-04-12 05:27:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-13 02:29:15 +0200 |
commit | 0a72d8332ce655c678dc15b0f3b92574c5534d96 (patch) | |
tree | 31b4b022d29a7e4be5a6e9e029f7b446624b4f1f /drivers/net/ethernet/netronome | |
parent | nfp: add a mutex lock for the vNIC ctrl BAR (diff) | |
download | linux-0a72d8332ce655c678dc15b0f3b92574c5534d96.tar.xz linux-0a72d8332ce655c678dc15b0f3b92574c5534d96.zip |
nfp: move vNIC reset before netdev init
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>
Diffstat (limited to 'drivers/net/ethernet/netronome')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index ab84a6c1ce66..e4be04cdef30 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -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; @@ -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) |