mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-21 10:05:00 +08:00
RDMA/hns: Fix the size setting error when copying CQE in clean_cq()
The size of CQE is different for different versions of hardware, so the
driver needs to specify the size of CQE explicitly.
Fixes: 09a5f210f6
("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>
This commit is contained in:
parent
7d5cfafe8b
commit
cc26aee100
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user