RDMA/hns: reset function when removing module
authorLang Cheng <chenglang@huawei.com>
Fri, 14 Jun 2019 14:56:03 +0000 (22:56 +0800)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Jun 2019 19:05:48 +0000 (15:05 -0400)
commit89a6da3cb8f30ee0aeca924d84bef688f22f883e
treee5ddabf4d9c129c33b347b5769113a8b6207a433
parenta49b1dc7ae447d7085360cd587fc1c8b9ec6c871
RDMA/hns: reset function when removing module

During removing the driver, we needs to notify the roce engine to
stop working immediately,and symmetrically recycle the hardware
resources requested during initialization.

The hardware provides a command called function clear that can package
these operations,so that the driver can only focus on releasing
resources that applied from the operating system.
This patch implements the call of this command.

Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h