projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d5cfaf
)
RDMA/hns: Fix the size setting error when copying CQE in clean_cq()
author
Wenpeng Liang
<liangwenpeng@huawei.com>
Mon, 27 Sep 2021 12:55:56 +0000
(20:55 +0800)
committer
Jason Gunthorpe
<jgg@nvidia.com>
Mon, 27 Sep 2021 17:49:48 +0000
(14:49 -0300)
The size of CQE is different for different versions of hardware, so the
driver needs to specify the size of CQE explicitly.
Fixes:
09a5f210f67e
("RDMA/hns: Add support for CQE in size of 64 Bytes")
Link:
https://lore.kernel.org/r/20210927125557.15031-2-liangwenpeng@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index
a9c00a2
..
d5f3faa
100644
(file)
--- a/
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@
-3299,7
+3299,7
@@
static void __hns_roce_v2_cq_clean(struct hns_roce_cq *hr_cq, u32 qpn,
dest = get_cqe_v2(hr_cq, (prod_index + nfreed) &
hr_cq->ib_cq.cqe);
owner_bit = hr_reg_read(dest, CQE_OWNER);
- memcpy(dest, cqe,
sizeof(*cqe)
);
+ memcpy(dest, cqe,
hr_cq->cqe_size
);
hr_reg_write(dest, CQE_OWNER, owner_bit);
}
}