diff mbox

mlx4: Fix vlan insertion order

Message ID 20101117133943.GA10589@mtldesk30 (mailing list archive)
State Accepted
Delegated to: Roland Dreier
Headers show

Commit Message

Eli Cohen Nov. 17, 2010, 1:39 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index ec2c9bb..3d0c6d7 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1953,14 +1953,14 @@  int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 			goto out;
 		}
 
-		ctrl->owner_opcode = mlx4_ib_opcode[wr->opcode] |
-			(ind & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0) | blh;
-
 		if (be16_to_cpu(vlan) < 0x1000) {
 			ctrl->ins_vlan = 1 << 6;
 			ctrl->vlan_tag = vlan;
 		}
 
+		ctrl->owner_opcode = mlx4_ib_opcode[wr->opcode] |
+			(ind & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0) | blh;
+
 		stamp = ind + qp->sq_spare_wqes;
 		ind += DIV_ROUND_UP(size * 16, 1U << qp->sq.wqe_shift);