diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-08-28 13:20:34 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-28 16:01:46 -0700 |
commit | 2db100002eed110e08023cc99d953646f4d62605 (patch) | |
tree | ec86f2dc7086fb3f4f8e537837917fa130d75e73 /drivers/net/ethernet/netronome/nfp/nfp_main.c | |
parent | 1c0372b67ccaf1b1fa0709475f4a53619e407e61 (diff) | |
download | linux-stable-2db100002eed110e08023cc99d953646f4d62605.tar.gz linux-stable-2db100002eed110e08023cc99d953646f4d62605.tar.bz2 linux-stable-2db100002eed110e08023cc99d953646f4d62605.zip |
nfp: attempt FW load from flash
Flash may contain a default NFP application FW. This application
can either be put there by the user (with ethtool -f) or shipped
with the card. If file system FW is not found, attempt to load
this flash stored app FW.
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_main.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c index 4a540c5e27fe..61c22c2935d4 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_main.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c @@ -441,8 +441,11 @@ nfp_fw_load(struct pci_dev *pdev, struct nfp_pf *pf, struct nfp_nsp *nsp) } fw = nfp_net_fw_find(pdev, pf); - if (!fw) + if (!fw) { + if (nfp_nsp_has_stored_fw_load(nsp)) + nfp_nsp_load_stored_fw(nsp); return 0; + } dev_info(&pdev->dev, "Soft-reset, loading FW image\n"); err = nfp_nsp_device_soft_reset(nsp); @@ -453,7 +456,6 @@ nfp_fw_load(struct pci_dev *pdev, struct nfp_pf *pf, struct nfp_nsp *nsp) } err = nfp_nsp_load_fw(nsp, fw); - if (err < 0) { dev_err(&pdev->dev, "FW loading failed: %d\n", err); goto exit_release_fw; |