Commit eee617a1 authored by David S. Miller's avatar David S. Miller

Merge branch 'mlx4'

Or Gerlitz says:

====================
Mellanox driver fixes

Two small fixes, please apply to net.

Both patches should go to 3.19.y too.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 38674a49 1037ebbb
...@@ -81,12 +81,14 @@ static int mlx4_en_test_loopback(struct mlx4_en_priv *priv) ...@@ -81,12 +81,14 @@ static int mlx4_en_test_loopback(struct mlx4_en_priv *priv)
{ {
u32 loopback_ok = 0; u32 loopback_ok = 0;
int i; int i;
bool gro_enabled;
priv->loopback_ok = 0; priv->loopback_ok = 0;
priv->validate_loopback = 1; priv->validate_loopback = 1;
gro_enabled = priv->dev->features & NETIF_F_GRO;
mlx4_en_update_loopback_state(priv->dev, priv->dev->features); mlx4_en_update_loopback_state(priv->dev, priv->dev->features);
priv->dev->features &= ~NETIF_F_GRO;
/* xmit */ /* xmit */
if (mlx4_en_test_loopback_xmit(priv)) { if (mlx4_en_test_loopback_xmit(priv)) {
...@@ -108,6 +110,10 @@ static int mlx4_en_test_loopback(struct mlx4_en_priv *priv) ...@@ -108,6 +110,10 @@ static int mlx4_en_test_loopback(struct mlx4_en_priv *priv)
mlx4_en_test_loopback_exit: mlx4_en_test_loopback_exit:
priv->validate_loopback = 0; priv->validate_loopback = 0;
if (gro_enabled)
priv->dev->features |= NETIF_F_GRO;
mlx4_en_update_loopback_state(priv->dev, priv->dev->features); mlx4_en_update_loopback_state(priv->dev, priv->dev->features);
return !loopback_ok; return !loopback_ok;
} }
......
...@@ -412,7 +412,6 @@ int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp, gfp_t gfp) ...@@ -412,7 +412,6 @@ int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp, gfp_t gfp)
EXPORT_SYMBOL_GPL(mlx4_qp_alloc); EXPORT_SYMBOL_GPL(mlx4_qp_alloc);
#define MLX4_UPDATE_QP_SUPPORTED_ATTRS MLX4_UPDATE_QP_SMAC
int mlx4_update_qp(struct mlx4_dev *dev, u32 qpn, int mlx4_update_qp(struct mlx4_dev *dev, u32 qpn,
enum mlx4_update_qp_attr attr, enum mlx4_update_qp_attr attr,
struct mlx4_update_qp_params *params) struct mlx4_update_qp_params *params)
......
...@@ -713,7 +713,7 @@ static int update_vport_qp_param(struct mlx4_dev *dev, ...@@ -713,7 +713,7 @@ static int update_vport_qp_param(struct mlx4_dev *dev,
struct mlx4_vport_oper_state *vp_oper; struct mlx4_vport_oper_state *vp_oper;
struct mlx4_priv *priv; struct mlx4_priv *priv;
u32 qp_type; u32 qp_type;
int port; int port, err = 0;
port = (qpc->pri_path.sched_queue & 0x40) ? 2 : 1; port = (qpc->pri_path.sched_queue & 0x40) ? 2 : 1;
priv = mlx4_priv(dev); priv = mlx4_priv(dev);
...@@ -738,7 +738,9 @@ static int update_vport_qp_param(struct mlx4_dev *dev, ...@@ -738,7 +738,9 @@ static int update_vport_qp_param(struct mlx4_dev *dev,
} else { } else {
struct mlx4_update_qp_params params = {.flags = 0}; struct mlx4_update_qp_params params = {.flags = 0};
mlx4_update_qp(dev, qpn, MLX4_UPDATE_QP_VSD, &params); err = mlx4_update_qp(dev, qpn, MLX4_UPDATE_QP_VSD, &params);
if (err)
goto out;
} }
} }
...@@ -773,7 +775,8 @@ static int update_vport_qp_param(struct mlx4_dev *dev, ...@@ -773,7 +775,8 @@ static int update_vport_qp_param(struct mlx4_dev *dev,
qpc->pri_path.feup |= MLX4_FSM_FORCE_ETH_SRC_MAC; qpc->pri_path.feup |= MLX4_FSM_FORCE_ETH_SRC_MAC;
qpc->pri_path.grh_mylmc = (0x80 & qpc->pri_path.grh_mylmc) + vp_oper->mac_idx; qpc->pri_path.grh_mylmc = (0x80 & qpc->pri_path.grh_mylmc) + vp_oper->mac_idx;
} }
return 0; out:
return err;
} }
static int mpt_mask(struct mlx4_dev *dev) static int mpt_mask(struct mlx4_dev *dev)
......
...@@ -427,7 +427,7 @@ struct mlx4_wqe_inline_seg { ...@@ -427,7 +427,7 @@ struct mlx4_wqe_inline_seg {
enum mlx4_update_qp_attr { enum mlx4_update_qp_attr {
MLX4_UPDATE_QP_SMAC = 1 << 0, MLX4_UPDATE_QP_SMAC = 1 << 0,
MLX4_UPDATE_QP_VSD = 1 << 2, MLX4_UPDATE_QP_VSD = 1 << 1,
MLX4_UPDATE_QP_SUPPORTED_ATTRS = (1 << 2) - 1 MLX4_UPDATE_QP_SUPPORTED_ATTRS = (1 << 2) - 1
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment