提交 cb14f930 编写于 作者: W Weihang Li 提交者: Xie XiuQi

RDMA/hns: Initialize last_port_state to IB_PORT_DOWN

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Setting last_port_state to IB_PORT_ACTIVE when initial will cause event
lost, it should be IB_PORT_DOWN.

Fixes: cc591fc6b310 ("RDMA/hns: Deliver net device event to ofed")

Feature or Bugfix: Bugfix
Signed-off-by: NWeihang Li <liweihang@hisilicon.com>
Reviewed-by: Nchenglang <chenglang@huawei.com>
Reviewed-by: Nliuyixian <liuyixian@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 15b0dc1e
...@@ -283,7 +283,7 @@ static int hns_roce_setup_mtu_mac_state(struct hns_roce_dev *hr_dev) ...@@ -283,7 +283,7 @@ static int hns_roce_setup_mtu_mac_state(struct hns_roce_dev *hr_dev)
u8 i; u8 i;
for (i = 0; i < hr_dev->caps.num_ports; i++) { for (i = 0; i < hr_dev->caps.num_ports; i++) {
hr_dev->iboe.last_port_state[i] = IB_PORT_ACTIVE; hr_dev->iboe.last_port_state[i] = IB_PORT_DOWN;
if (hr_dev->hw->set_mtu) if (hr_dev->hw->set_mtu)
hr_dev->hw->set_mtu(hr_dev, hr_dev->iboe.phy_port[i], hr_dev->hw->set_mtu(hr_dev, hr_dev->iboe.phy_port[i],
hr_dev->caps.max_mtu); hr_dev->caps.max_mtu);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册