summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeihang Li <liweihang@huawei.com>2021-06-23 16:50:01 +0800
committerJason Gunthorpe <jgg@nvidia.com>2021-06-23 14:37:53 -0300
commite7c07d5e0750e921d60e63dd181886c479a0ee19 (patch)
tree14382ae22776b051e1c8d4c74619b4d6d3b2f2a1
parentc95f60a875d3bd5778c56e862512168893010b04 (diff)
downloadlinux-e7c07d5e0750e921d60e63dd181886c479a0ee19.tar.gz
linux-e7c07d5e0750e921d60e63dd181886c479a0ee19.tar.bz2
linux-e7c07d5e0750e921d60e63dd181886c479a0ee19.zip
RDMA/hns: Fix incorrect vlan enable bit in QPC
The QPC_RQ/SQ_VLAN_EN bit in QPC should be enabled, not the QPC mask. Fixes: f0cb411aad23 ("RDMA/hns: Use new interface to modify QP context") Link: https://lore.kernel.org/r/1624438201-11915-1-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li <liweihang@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 3c35ae4235be..fc985d68cb74 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4676,9 +4676,9 @@ static int hns_roce_v2_set_path(struct ib_qp *ibqp,
/* Only HIP08 needs to set the vlan_en bits in QPC */
if (vlan_id < VLAN_N_VID &&
hr_dev->pci_dev->revision == PCI_REVISION_ID_HIP08) {
- hr_reg_enable(qpc_mask, QPC_RQ_VLAN_EN);
+ hr_reg_enable(context, QPC_RQ_VLAN_EN);
hr_reg_clear(qpc_mask, QPC_RQ_VLAN_EN);
- hr_reg_enable(qpc_mask, QPC_SQ_VLAN_EN);
+ hr_reg_enable(context, QPC_SQ_VLAN_EN);
hr_reg_clear(qpc_mask, QPC_SQ_VLAN_EN);
}