[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220929085832.622510-3-simon.horman@corigine.com>
Date: Thu, 29 Sep 2022 10:58:29 +0200
From: Simon Horman <simon.horman@...igine.com>
To: David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, oss-drivers@...igine.com,
Yinjun Zhang <yinjun.zhang@...igine.com>,
Fei Qin <fei.qin@...igine.com>
Subject: [PATCH net-next v2 2/5] nfp: avoid halt of driver init process when non-fatal error happens
From: Yinjun Zhang <yinjun.zhang@...igine.com>
It's not a fatal error when setting `hwinfo` into management firmware
fails, no need to halt the whole driver initialization process.
Signed-off-by: Yinjun Zhang <yinjun.zhang@...igine.com>
Signed-off-by: Simon Horman <simon.horman@...igine.com>
---
drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
index e2d4c487e8de..f3852ba8099a 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
@@ -315,18 +315,17 @@ static int nfp_net_pf_cfg_nsp(struct nfp_pf *pf, bool sp_indiff)
int err;
nsp = nfp_nsp_open(pf->cpp);
- if (IS_ERR(nsp)) {
- err = PTR_ERR(nsp);
- return err;
- }
+ if (IS_ERR(nsp))
+ return PTR_ERR(nsp);
snprintf(hwinfo, sizeof(hwinfo), "sp_indiff=%d", sp_indiff);
err = nfp_nsp_hwinfo_set(nsp, hwinfo, sizeof(hwinfo));
+ /* Not a fatal error, no need to return error to stop driver from loading */
if (err)
nfp_warn(pf->cpp, "HWinfo(sp_indiff=%d) set failed: %d\n", sp_indiff, err);
nfp_nsp_close(nsp);
- return err;
+ return 0;
}
static int nfp_net_pf_init_nsp(struct nfp_pf *pf)
--
2.30.2
Powered by blists - more mailing lists