summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome/nfp/nfp_main.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-06-08 20:56:13 -0700
committerDavid S. Miller <davem@davemloft.net>2017-06-09 12:52:08 -0400
commit0be40e66e72a544e2d4a5bca9328463ebf2c55df (patch)
tree13d2e602f834290655f835198676995ca9fbd129 /drivers/net/ethernet/netronome/nfp/nfp_main.c
parent9baa48859bd31f06b9170e86afd92585ff0bbb1f (diff)
downloadlinux-0be40e66e72a544e2d4a5bca9328463ebf2c55df.tar.bz2
nfp: keep MIP object around
Microcode Information Page contains some useful information, like application firmware build name. Keep it around, similar to RTSym and HWInfo. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_main.c')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c
index 94211e245257..4e59dcb78c36 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c
@@ -375,7 +375,8 @@ static int nfp_pci_probe(struct pci_dev *pdev,
if (err)
goto err_devlink_unreg;
- pf->rtbl = nfp_rtsym_table_read(pf->cpp);
+ pf->mip = nfp_mip_open(pf->cpp);
+ pf->rtbl = __nfp_rtsym_table_read(pf->cpp, pf->mip);
err = nfp_pcie_sriov_read_nfd_limit(pf);
if (err)
@@ -399,6 +400,7 @@ err_sriov_unlimit:
pci_sriov_set_totalvfs(pf->pdev, 0);
err_fw_unload:
kfree(pf->rtbl);
+ nfp_mip_close(pf->mip);
if (pf->fw_loaded)
nfp_fw_unload(pf);
kfree(pf->eth_tbl);
@@ -437,6 +439,7 @@ static void nfp_pci_remove(struct pci_dev *pdev)
devlink_unregister(devlink);
kfree(pf->rtbl);
+ nfp_mip_close(pf->mip);
if (pf->fw_loaded)
nfp_fw_unload(pf);