summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaker Daibes <shakerd@mellanox.com>2016-06-30 17:34:50 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-01 06:12:04 -0400
commit87424ad52d76535234f217637fcaadcd2ef2334d (patch)
tree88890189376e33b6dff72fe0b5b1a7f76cc9d08b
parentcdcf11212b22ff8e3de88ced1a6eda5bb950e120 (diff)
downloadlinux-87424ad52d76535234f217637fcaadcd2ef2334d.tar.gz
net/mlx5e: Log link state changes
Add Link UP/Down prints to kernel log when link state changes Signed-off-by: Shaker Daibes <shakerd@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 216fe3e1c1b0..7a0dca29c642 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -81,10 +81,13 @@ static void mlx5e_update_carrier(struct mlx5e_priv *priv)
port_state = mlx5_query_vport_state(mdev,
MLX5_QUERY_VPORT_STATE_IN_OP_MOD_VNIC_VPORT, 0);
- if (port_state == VPORT_STATE_UP)
+ if (port_state == VPORT_STATE_UP) {
+ netdev_info(priv->netdev, "Link up\n");
netif_carrier_on(priv->netdev);
- else
+ } else {
+ netdev_info(priv->netdev, "Link down\n");
netif_carrier_off(priv->netdev);
+ }
}
static void mlx5e_update_carrier_work(struct work_struct *work)