diff options
author | Wei Hu (Xavier) <xavier.huwei@huawei.com> | 2016-09-20 19:06:59 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-10-03 18:43:15 +0300 |
commit | 97f0e39fa51406e7d73b37e635c04c85829ce9ab (patch) | |
tree | 6af9853dce04dcb69c70299a92d0ac23c5fe137d /drivers/infiniband/hw/hns/hns_roce_hem.h | |
parent | 76445703e54326f9039d6302b78ad6e8dab17777 (diff) | |
download | linux-97f0e39fa51406e7d73b37e635c04c85829ce9ab.tar.xz |
IB/hns: Fix bug of clear hem
In hip06, there's no interface to release hem memory. So, hardware can't
identify whether hem memory released or not.
If all context in a hem memory released, the related hem memory will be
released by driver and reused by others. But, hardware don't know that
this memory can't be used already.
In order to fix this bug, hns roce driver reserved 128K memory for each
type of hem(QPC/CQC/MTPT). While unmap hem memory, hns roce driver will
write base address of reserved memory according to hem type.
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_hem.h')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hem.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.h b/drivers/infiniband/hw/hns/hns_roce_hem.h index ad6617588fba..435748858252 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hem.h +++ b/drivers/infiniband/hw/hns/hns_roce_hem.h @@ -34,6 +34,10 @@ #ifndef _HNS_ROCE_HEM_H #define _HNS_ROCE_HEM_H +#define HW_SYNC_TIMEOUT_MSECS 500 +#define HW_SYNC_SLEEP_TIME_INTERVAL 20 +#define BT_CMD_SYNC_SHIFT 31 + enum { /* MAP HEM(Hardware Entry Memory) */ HEM_TYPE_QPC = 0, |