From: oulijun Date: Sat, 10 Jun 2017 10:49:24 +0000 (+0800) Subject: IB/hns: Fix the bug with modifying the MAC address without removing the driver X-Git-Tag: v5.15~10628^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d322f004aaa647a5dc9dcddfe5ab1bff1e92f634;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index c3b41f9..d9777b6 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; }