aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2017-01-16 11:31:38 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-18 01:11:50 -0400
commit27dedde6895c0364549ee593253700a923ccf710 (patch)
tree94b6b291b91a0623129dbba4459a52f321d95edf
parent48b2f1dd5787c643aa321fc159c11c418407234d (diff)
net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
commit 7c3945bc2073554bb2ecf983e073dee686679c53 upstream. Save the qp context flags byte containing the flag disabling vlan stripping in the RESET to INIT qp transition, rather than in the INIT to RTR transition. Per the firmware spec, the flags in this byte are active in the RESET to INIT transition. As a result of saving the flags in the incorrect qp transition, when switching dynamically from VGT to VST and back to VGT, the vlan remained stripped (as is required for VST) and did not return to not-stripped (as is required for VGT). Fixes: f0f829bf42cd ("net/mlx4_core: Add immediate activate for VGT->VST->VGT") Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/resource_tracker.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index c548beaaf910..32f76bf018c3 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -2980,6 +2980,9 @@ int mlx4_RST2INIT_QP_wrapper(struct mlx4_dev *dev, int slave,
2980 put_res(dev, slave, srqn, RES_SRQ); 2980 put_res(dev, slave, srqn, RES_SRQ);
2981 qp->srq = srq; 2981 qp->srq = srq;
2982 } 2982 }
2983
2984 /* Save param3 for dynamic changes from VST back to VGT */
2985 qp->param3 = qpc->param3;
2983 put_res(dev, slave, rcqn, RES_CQ); 2986 put_res(dev, slave, rcqn, RES_CQ);
2984 put_res(dev, slave, mtt_base, RES_MTT); 2987 put_res(dev, slave, mtt_base, RES_MTT);
2985 res_end_move(dev, slave, RES_QP, qpn); 2988 res_end_move(dev, slave, RES_QP, qpn);
@@ -3772,7 +3775,6 @@ int mlx4_INIT2RTR_QP_wrapper(struct mlx4_dev *dev, int slave,
3772 int qpn = vhcr->in_modifier & 0x7fffff; 3775 int qpn = vhcr->in_modifier & 0x7fffff;
3773 struct res_qp *qp; 3776 struct res_qp *qp;
3774 u8 orig_sched_queue; 3777 u8 orig_sched_queue;
3775 __be32 orig_param3 = qpc->param3;
3776 u8 orig_vlan_control = qpc->pri_path.vlan_control; 3778 u8 orig_vlan_control = qpc->pri_path.vlan_control;
3777 u8 orig_fvl_rx = qpc->pri_path.fvl_rx; 3779 u8 orig_fvl_rx = qpc->pri_path.fvl_rx;
3778 u8 orig_pri_path_fl = qpc->pri_path.fl; 3780 u8 orig_pri_path_fl = qpc->pri_path.fl;
@@ -3814,7 +3816,6 @@ out:
3814 */ 3816 */
3815 if (!err) { 3817 if (!err) {
3816 qp->sched_queue = orig_sched_queue; 3818 qp->sched_queue = orig_sched_queue;
3817 qp->param3 = orig_param3;
3818 qp->vlan_control = orig_vlan_control; 3819 qp->vlan_control = orig_vlan_control;
3819 qp->fvl_rx = orig_fvl_rx; 3820 qp->fvl_rx = orig_fvl_rx;
3820 qp->pri_path_fl = orig_pri_path_fl; 3821 qp->pri_path_fl = orig_pri_path_fl;