提交 8d3ee0ae 编写于 作者: J Junxian Huang 提交者: ZhouJuan

RDMA/hns: Fix the driver uninit order during bond setting

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6Z4E9

---------------------------------------------------------------

In the slave list of bond_grp, the first slave is always the main_hr_dev,
and the main_hr_dev is responsible for bonding netdev event handling. If
the main_hr_dev is uninit too early, some CHANGELOWERSTATE events may be
missed before the main_hr_dev is re-register, which may cause the HW is
configured with an outdated slave state.

This patch reverses the order of uniniting slave hr_dev to ensure
main_hr_dev is the last one being uninited.

Fixes: e62a2027 ("RDMA/hns: support RoCE bonding")
Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com>
上级 bc80b728
......@@ -185,7 +185,7 @@ static void hns_roce_set_bond(struct hns_roce_bond_group *bond_grp)
int ret;
int i;
for (i = 0; i < ROCE_BOND_FUNC_MAX; i++) {
for (i = ROCE_BOND_FUNC_MAX - 1; i >= 0; i--) {
net_dev = bond_grp->bond_func_info[i].net_dev;
if (net_dev)
hns_roce_bond_uninit_client(bond_grp, i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册