162306a36Sopenharmony_ci/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 262306a36Sopenharmony_ci/* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef _MLXSW_PORT_H 562306a36Sopenharmony_ci#define _MLXSW_PORT_H 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#include <linux/types.h> 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#define MLXSW_PORT_MAX_MTU 10000 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define MLXSW_PORT_DEFAULT_VID 1 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#define MLXSW_PORT_SWID_DISABLED_PORT 255 1462306a36Sopenharmony_ci#define MLXSW_PORT_SWID_ALL_SWIDS 254 1562306a36Sopenharmony_ci#define MLXSW_PORT_SWID_TYPE_IB 1 1662306a36Sopenharmony_ci#define MLXSW_PORT_SWID_TYPE_ETH 2 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci#define MLXSW_PORT_MAX_IB_PHY_PORTS 36 1962306a36Sopenharmony_ci#define MLXSW_PORT_MAX_IB_PORTS (MLXSW_PORT_MAX_IB_PHY_PORTS + 1) 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci#define MLXSW_PORT_CPU_PORT 0x0 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci#define MLXSW_PORT_DONT_CARE 0xFF 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_cienum mlxsw_port_admin_status { 2662306a36Sopenharmony_ci MLXSW_PORT_ADMIN_STATUS_UP = 1, 2762306a36Sopenharmony_ci MLXSW_PORT_ADMIN_STATUS_DOWN = 2, 2862306a36Sopenharmony_ci MLXSW_PORT_ADMIN_STATUS_UP_ONCE = 3, 2962306a36Sopenharmony_ci MLXSW_PORT_ADMIN_STATUS_DISABLED = 4, 3062306a36Sopenharmony_ci}; 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_cienum mlxsw_reg_pude_oper_status { 3362306a36Sopenharmony_ci MLXSW_PORT_OPER_STATUS_UP = 1, 3462306a36Sopenharmony_ci MLXSW_PORT_OPER_STATUS_DOWN = 2, 3562306a36Sopenharmony_ci MLXSW_PORT_OPER_STATUS_FAILURE = 4, /* Can be set to up again. */ 3662306a36Sopenharmony_ci}; 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#endif /* _MLXSW_PORT_H */ 39