OSDN Git Service

net/mlx5: Rework handling of port module events
authorMikhael Goikhman <migo@mellanox.com>
Mon, 10 Dec 2018 21:15:09 +0000 (13:15 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 10 Dec 2018 22:00:08 +0000 (14:00 -0800)
commitc2fb3db22d35f01774d0547b1d8e5085df193646
tree8676442d3705fe09d716c51b79a23ac057398338
parent7300375f181e06ba98183509065c6b71bead442d
net/mlx5: Rework handling of port module events

Add explicit HW defined error values. For simplicity, keep counters for all
statuses starting from 0, although currently status=0 is not used.

Additionally, when HW signals an unexpected cable status, it is reported
now rather than ignored. And status counter is now updated on errors.

Signed-off-by: Mikhael Goikhman <migo@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/events.c
drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h