[PATCH] net/nfp: fix skip reload firmware issue
Chaoyong He
chaoyong.he at corigine.com
Fri Mar 8 11:50:04 CET 2024
From: Peng Zhang <peng.zhang at corigine.com>
When the beat value of all ports are 0, which represent all
ports are unused. But the current port starts beat before
the check process, so it needs to sleep 1 second waiting
the beat value change and to ignore the current port.
Fixes: 8b9a83ea2af2 ("net/nfp: enlarge range of skipping loading firmware")
Cc: stable at dpdk.org
Signed-off-by: Peng Zhang <peng.zhang at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
---
drivers/net/nfp/nfp_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 1e713ee111..31c54a595c 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1193,7 +1193,13 @@ nfp_fw_skip_load(const struct nfp_dev_info *dev_info,
uint32_t offset[dev_info->pf_num_per_unit];
uint8_t abnormal = dev_info->pf_num_per_unit;
+ sleep(1);
for (port_num = 0; port_num < dev_info->pf_num_per_unit; port_num++) {
+ if (port_num == multi_pf->function_id) {
+ abnormal--;
+ continue;
+ }
+
offset[port_num] = NFP_BEAT_OFFSET(port_num);
beat[port_num] = nn_readq(multi_pf->beat_addr + offset[port_num]);
if (beat[port_num] == 0)
--
2.39.1
More information about the stable
mailing list