RDMA/hns: Don't modify rq next block addr in HIP09 QPC

[ Upstream commit 6928d264e3 ]

The field 'rq next block addr' in QPC can be updated by driver only
on HIP08. On HIP09 HW updates this field while driver is not allowed.

Fixes: 926a01dc00 ("RDMA/hns: Add QP operations support for hip08 SoC")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20240906093444.3571619-2-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Junxian Huang 2024-09-06 17:34:36 +08:00 committed by Greg Kroah-Hartman
parent b972bade15
commit 85e37ac139

View File

@ -4391,12 +4391,14 @@ static int config_qp_rq_buf(struct hns_roce_dev *hr_dev,
upper_32_bits(to_hr_hw_page_addr(mtts[0]))); upper_32_bits(to_hr_hw_page_addr(mtts[0])));
hr_reg_clear(qpc_mask, QPC_RQ_CUR_BLK_ADDR_H); hr_reg_clear(qpc_mask, QPC_RQ_CUR_BLK_ADDR_H);
context->rq_nxt_blk_addr = cpu_to_le32(to_hr_hw_page_addr(mtts[1])); if (hr_dev->pci_dev->revision == PCI_REVISION_ID_HIP08) {
qpc_mask->rq_nxt_blk_addr = 0; context->rq_nxt_blk_addr =
cpu_to_le32(to_hr_hw_page_addr(mtts[1]));
hr_reg_write(context, QPC_RQ_NXT_BLK_ADDR_H, qpc_mask->rq_nxt_blk_addr = 0;
upper_32_bits(to_hr_hw_page_addr(mtts[1]))); hr_reg_write(context, QPC_RQ_NXT_BLK_ADDR_H,
hr_reg_clear(qpc_mask, QPC_RQ_NXT_BLK_ADDR_H); upper_32_bits(to_hr_hw_page_addr(mtts[1])));
hr_reg_clear(qpc_mask, QPC_RQ_NXT_BLK_ADDR_H);
}
return 0; return 0;
} }