]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
nfp: move vNIC reset before netdev init
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 12 Apr 2019 03:27:06 +0000 (20:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Apr 2019 00:29:15 +0000 (17:29 -0700)
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>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c

index ab84a6c1ce66f57bd3728ccf5cde62f2d4cbf7ba..e4be04cdef301720b215f851034f15c8d71e9918 100644 (file)
@@ -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)