projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08eb301
)
RDMA/hns: Replace condition statement using hardware version information
author
Wei Hu(Xavier)
<
[email protected]
>
Wed, 30 Aug 2017 09:23:17 +0000
(17:23 +0800)
committer
Doug Ledford
<
[email protected]
>
Wed, 27 Sep 2017 12:34:56 +0000
(08:34 -0400)
This patch replaces condition statement to reduce usage of hardware version
information in common driver.
Signed-off-by: Wei Hu (Xavier) <
[email protected]
>
Signed-off-by: Shaobo Xu <
[email protected]
>
Signed-off-by: Lijun Ou <
[email protected]
>
Signed-off-by: Doug Ledford <
[email protected]
>
drivers/infiniband/hw/hns/hns_roce_main.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hns/hns_roce_main.c
b/drivers/infiniband/hw/hns/hns_roce_main.c
index a110f968987f2ccac3337ec8110eb51e900aa33b..7a0c1e8f45ddcd69fb85f7bf8acb7daa257485b3 100644
(file)
--- a/
drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/
drivers/infiniband/hw/hns/hns_roce_main.c
@@
-381,7
+381,8
@@
static int hns_roce_mmap(struct ib_ucontext *context,
to_hr_ucontext(context)->uar.pfn,
PAGE_SIZE, vma->vm_page_prot))
return -EAGAIN;
- } else if (vma->vm_pgoff == 1 && hr_dev->hw_rev == HNS_ROCE_HW_VER1) {
+ } else if (vma->vm_pgoff == 1 && hr_dev->tptr_dma_addr &&
+ hr_dev->tptr_size) {
/* vm_pgoff: 1 -- TPTR */
if (io_remap_pfn_range(vma, vma->vm_start,
hr_dev->tptr_dma_addr >> PAGE_SHIFT,