diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-04-25 21:21:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-27 18:15:10 +0300 |
commit | c55ca688ed99a9cb79367aee2ed2ff6cb80fc039 (patch) | |
tree | b4195e37a404e450b7298001c6b8ed1bf09a7c60 /drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | |
parent | 7dbc73e6124ce4d0cfbdd6166de388e9367c47ad (diff) | |
download | linux-c55ca688ed99a9cb79367aee2ed2ff6cb80fc039.tar.xz |
nfp: don't depend on eth_tbl being available
For very very old generation of the management FW Ethernet port
information table may theoretically not be available. This in
turn will cause the nfp_port structures to not be allocated.
Make sure we don't crash the kernel when there is no eth_tbl:
RIP: 0010:nfp_net_pci_probe+0xf2/0xb40 [nfp]
...
Call Trace:
nfp_pci_probe+0x6de/0xab0 [nfp]
local_pci_probe+0x47/0xa0
work_for_cpu_fn+0x1a/0x30
process_one_work+0x1de/0x3e0
Found while working with broken/development version of management FW.
Fixes: a5950182c00e ("nfp: map mac_stats and vf_cfg BARs")
Fixes: 93da7d9660ee ("nfp: provide nfp_port to of nfp_net_get_mac_addr()")
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/nfp/nfp_app_nic.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_app_nic.c b/drivers/net/ethernet/netronome/nfp/nfp_app_nic.c index 2a2f2fbc8850..b9618c37403f 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_app_nic.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_app_nic.c @@ -69,7 +69,7 @@ int nfp_app_nic_vnic_alloc(struct nfp_app *app, struct nfp_net *nn, if (err) return err < 0 ? err : 0; - nfp_net_get_mac_addr(app->pf, nn->port); + nfp_net_get_mac_addr(app->pf, nn->dp.netdev, nn->port); return 0; } |