git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
net/hns3: fix configure FEC when concurrent with reset
[dpdk.git]
/
drivers
/
net
/
hns3
/
hns3_ethdev.c
diff --git
a/drivers/net/hns3/hns3_ethdev.c
b/drivers/net/hns3/hns3_ethdev.c
index
53a0b54
..
846e5a2
100644
(file)
--- a/
drivers/net/hns3/hns3_ethdev.c
+++ b/
drivers/net/hns3/hns3_ethdev.c
@@
-6433,11
+6433,16
@@
hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
return -EINVAL;
}
+ rte_spinlock_lock(&hw->lock);
ret = hns3_set_fec_hw(hw, mode);
- if (ret)
+ if (ret) {
+ rte_spinlock_unlock(&hw->lock);
return ret;
+ }
pf->fec_mode = mode;
+ rte_spinlock_unlock(&hw->lock);
+
return 0;
}