summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/netronome/nfp/abm/main.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-11-20 02:21:47 +0300
committerDavid S. Miller <davem@davemloft.net>2018-11-20 05:53:46 +0300
commit14780c34294f41da8f02d99d7b6ada990e685561 (patch)
tree70cb8d6c243481b1763d5f66f57cdad376b5afc9 /drivers/net/ethernet/netronome/nfp/abm/main.c
parent068ceb3555397dbd82593fb505688c5bd200a4ad (diff)
downloadlinux-14780c34294f41da8f02d99d7b6ada990e685561.tar.xz
nfp: abm: calculate PRIO map len and check mailbox size
In preparation for PRIO offload calculate how long the prio map for FW will be and make sure the configuration can be performed via the vNIC mailbox. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/abm/main.c')
-rw-r--r--drivers/net/ethernet/netronome/nfp/abm/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/abm/main.c b/drivers/net/ethernet/netronome/nfp/abm/main.c
index 4f95f7b4430b..aeb0c9a1f260 100644
--- a/drivers/net/ethernet/netronome/nfp/abm/main.c
+++ b/drivers/net/ethernet/netronome/nfp/abm/main.c
@@ -315,6 +315,10 @@ nfp_abm_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, unsigned int id)
alink->id = id;
alink->total_queues = alink->vnic->max_rx_rings;
+ err = nfp_abm_ctrl_read_params(alink);
+ if (err)
+ goto err_free_alink;
+
/* This is a multi-host app, make sure MAC/PHY is up, but don't
* make the MAC/PHY state follow the state of any of the ports.
*/
@@ -325,7 +329,6 @@ nfp_abm_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, unsigned int id)
netif_keep_dst(nn->dp.netdev);
nfp_abm_vnic_set_mac(app->pf, abm, nn, id);
- nfp_abm_ctrl_read_params(alink);
INIT_RADIX_TREE(&alink->qdiscs, GFP_KERNEL);
return 0;