From: Junxian Huang huangjunxian6@hisilicon.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6ZACP
---------------------------------------------------------------
When the third slave is going to be added to a bond group, a ChangeLowerState event happens firstly and notifies the driver to queue a ChangeState mission. However, the hr_dev of the third slave and bond group will both be notified and queue a repetitive mission separately. As the mission is triggered twice, there will be also repetitive mission printing, which is misleading and incorrect.
Applying this patch, only the hr_dev of the bond group will queue and trigger the mission.
Fixes: e62a20278f18 ("RDMA/hns: support RoCE bonding") Signed-off-by: Junxian Huang huangjunxian6@hisilicon.com --- drivers/infiniband/hw/hns/hns_roce_bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_bond.c b/drivers/infiniband/hw/hns/hns_roce_bond.c index 09119c91f034..c2aab5bbd1ca 100644 --- a/drivers/infiniband/hw/hns/hns_roce_bond.c +++ b/drivers/infiniband/hw/hns/hns_roce_bond.c @@ -527,7 +527,7 @@ static bool hns_roce_bond_lowerstate_event(struct hns_roce_dev *hr_dev, if (!bond_lower_info) return false;
- if (!bond_grp) { + if (!bond_grp || hr_dev != bond_grp->main_hr_dev) { hr_dev->slave_state = *bond_lower_info; return false; }