diff options
author | hselasky <hselasky@FreeBSD.org> | 2016-09-23 08:17:51 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2016-09-23 08:17:51 +0000 |
commit | c09479e02ec36fee071c973614c3aff982640196 (patch) | |
tree | 20197bbaf460d7bed237ae57b4adac1a04996cac /sys/dev/mlx5/mlx5_en/mlx5_en_main.c | |
parent | 2db9387ac81b5c39996bd69f4d8e7d8d8ffcc4f5 (diff) | |
download | FreeBSD-src-c09479e02ec36fee071c973614c3aff982640196.zip FreeBSD-src-c09479e02ec36fee071c973614c3aff982640196.tar.gz |
MFC r305867:
Update the MLX5 core module:
- Add new firmware commands and update existing ones.
- Add more firmware related structures and update existing ones.
- Some minor fixes, like adding missing \n to some prints.
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/dev/mlx5/mlx5_en/mlx5_en_main.c')
-rw-r--r-- | sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 2136567..0a73b95 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -181,7 +181,7 @@ mlx5e_update_carrier(struct mlx5e_priv *priv) u8 i; port_state = mlx5_query_vport_state(mdev, - MLX5_QUERY_VPORT_STATE_IN_OP_MOD_VNIC_VPORT); + MLX5_QUERY_VPORT_STATE_IN_OP_MOD_VNIC_VPORT, 0); if (port_state == VPORT_STATE_UP) { priv->media_status_last |= IFM_ACTIVE; @@ -2235,6 +2235,7 @@ mlx5e_open_locked(struct ifnet *ifp) { struct mlx5e_priv *priv = ifp->if_softc; int err; + u16 set_id; /* check if already opened */ if (test_bit(MLX5E_STATE_OPENED, &priv->state) != 0) @@ -2253,13 +2254,17 @@ mlx5e_open_locked(struct ifnet *ifp) __func__, err); return (err); } - err = mlx5_vport_alloc_q_counter(priv->mdev, &priv->counter_set_id); + err = mlx5_vport_alloc_q_counter(priv->mdev, + MLX5_INTERFACE_PROTOCOL_ETH, &set_id); if (err) { if_printf(priv->ifp, "%s: mlx5_vport_alloc_q_counter failed: %d\n", __func__, err); goto err_close_tises; } + /* store counter set ID */ + priv->counter_set_id = set_id; + err = mlx5e_open_channels(priv); if (err) { if_printf(ifp, "%s: mlx5e_open_channels failed, %d\n", @@ -2310,7 +2315,8 @@ err_close_channels: mlx5e_close_channels(priv); err_dalloc_q_counter: - mlx5_vport_dealloc_q_counter(priv->mdev, priv->counter_set_id); + mlx5_vport_dealloc_q_counter(priv->mdev, + MLX5_INTERFACE_PROTOCOL_ETH, priv->counter_set_id); err_close_tises: mlx5e_close_tises(priv); @@ -2352,7 +2358,8 @@ mlx5e_close_locked(struct ifnet *ifp) mlx5e_close_tirs(priv); mlx5e_close_rqt(priv); mlx5e_close_channels(priv); - mlx5_vport_dealloc_q_counter(priv->mdev, priv->counter_set_id); + mlx5_vport_dealloc_q_counter(priv->mdev, + MLX5_INTERFACE_PROTOCOL_ETH, priv->counter_set_id); mlx5e_close_tises(priv); return (0); |