net/mlx5: Add support for plugged-disabled cable status in PME
authorMikhael Goikhman <migo@mellanox.com>
Mon, 10 Dec 2018 21:15:11 +0000 (13:15 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 10 Dec 2018 22:00:08 +0000 (14:00 -0800)
Support a new hardware module status in port module events:
- module_status=0x4 (Cable plugged, but disabled)

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

index ba9249bcfcbadfca6696c668fc1cf31bc31cf003..900fdd235ba04f2445f7f87c4ec9dbfea67d6f1b 100644 (file)
@@ -166,6 +166,8 @@ static const char *mlx5_pme_status_to_string(enum port_module_event_status_type
                return "Cable unplugged";
        case MLX5_MODULE_STATUS_ERROR:
                return "Cable error";
+       case MLX5_MODULE_STATUS_DISABLED:
+               return "Cable disabled";
        default:
                return "Unknown status";
        }
index 979970f8fa0fe31ee236ce06a1f33412a3fce1b2..397a2847867a8cc42e719ce4b90f9b1ef74dd3a1 100644 (file)
@@ -51,6 +51,7 @@ enum port_module_event_status_type {
        MLX5_MODULE_STATUS_PLUGGED   = 0x1,
        MLX5_MODULE_STATUS_UNPLUGGED = 0x2,
        MLX5_MODULE_STATUS_ERROR     = 0x3,
+       MLX5_MODULE_STATUS_DISABLED  = 0x4,
        MLX5_MODULE_STATUS_NUM,
 };