summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroulijun <oulijun@huawei.com>2017-06-10 13:49:24 +0300
committerDoug Ledford <dledford@redhat.com>2017-07-18 04:21:29 +0300
commitd322f004aaa647a5dc9dcddfe5ab1bff1e92f634 (patch)
tree35893c38e0d87f382bb6aa2950070cc08bc361d2
parent9de61d3fcdde06087f65b4022a1a966c10ab5803 (diff)
downloadlinux-d322f004aaa647a5dc9dcddfe5ab1bff1e92f634.tar.xz
IB/hns: Fix the bug with modifying the MAC address without removing the driver
When modified the MAC address used hns_roce_mac function, we release and create reserved qp again, It is not necessary to use spin_lock_bh and spin_unlock_bh in handle_en_event, Otherwise, it will occur a error. This patch mainly fixes it. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index c3b41f95e70a..d9777b662eba 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -125,8 +125,6 @@ static int handle_en_event(struct hns_roce_dev *hr_dev, u8 port,
return -ENODEV;
}
- spin_lock_bh(&hr_dev->iboe.lock);
-
switch (event) {
case NETDEV_UP:
case NETDEV_CHANGE:
@@ -144,7 +142,6 @@ static int handle_en_event(struct hns_roce_dev *hr_dev, u8 port,
break;
}
- spin_unlock_bh(&hr_dev->iboe.lock);
return 0;
}