Skip to contentSkip to conversation

RDMA/hns: Fix incorrect vlan enable bit in QPC

PATCH Applied Weihang Li 2 participants 2 messages Jun 23, 2021

Subsystems (2)
lore
Share & tools
lore

Weihang Li

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/hns/hns_roce_hw_v2.c +2 -2
index 3c35ae4..fc985d6 100644
@@ -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);
 	}
 
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 7 lines · Weihang Li

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")
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to for-next, thanks

Jason