1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */
7 #include <linux/types.h>
9 #define MLXSW_PORT_MAX_MTU 10000
11 #define MLXSW_PORT_DEFAULT_VID 1
13 #define MLXSW_PORT_SWID_DISABLED_PORT 255
14 #define MLXSW_PORT_SWID_ALL_SWIDS 254
15 #define MLXSW_PORT_SWID_TYPE_IB 1
16 #define MLXSW_PORT_SWID_TYPE_ETH 2
18 #define MLXSW_PORT_MID 0xd000
20 #define MLXSW_PORT_MAX_IB_PHY_PORTS 36
21 #define MLXSW_PORT_MAX_IB_PORTS (MLXSW_PORT_MAX_IB_PHY_PORTS + 1)
23 #define MLXSW_PORT_CPU_PORT 0x0
25 #define MLXSW_PORT_DONT_CARE 0xFF
27 enum mlxsw_port_admin_status
{
28 MLXSW_PORT_ADMIN_STATUS_UP
= 1,
29 MLXSW_PORT_ADMIN_STATUS_DOWN
= 2,
30 MLXSW_PORT_ADMIN_STATUS_UP_ONCE
= 3,
31 MLXSW_PORT_ADMIN_STATUS_DISABLED
= 4,
34 enum mlxsw_reg_pude_oper_status
{
35 MLXSW_PORT_OPER_STATUS_UP
= 1,
36 MLXSW_PORT_OPER_STATUS_DOWN
= 2,
37 MLXSW_PORT_OPER_STATUS_FAILURE
= 4, /* Can be set to up again. */
40 #endif /* _MLXSW_PORT_H */