18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef _MLXSW_PORT_H 58c2ecf20Sopenharmony_ci#define _MLXSW_PORT_H 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/types.h> 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#define MLXSW_PORT_MAX_MTU 10000 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define MLXSW_PORT_DEFAULT_VID 1 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#define MLXSW_PORT_SWID_DISABLED_PORT 255 148c2ecf20Sopenharmony_ci#define MLXSW_PORT_SWID_ALL_SWIDS 254 158c2ecf20Sopenharmony_ci#define MLXSW_PORT_SWID_TYPE_IB 1 168c2ecf20Sopenharmony_ci#define MLXSW_PORT_SWID_TYPE_ETH 2 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define MLXSW_PORT_MID 0xd000 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define MLXSW_PORT_MAX_IB_PHY_PORTS 36 218c2ecf20Sopenharmony_ci#define MLXSW_PORT_MAX_IB_PORTS (MLXSW_PORT_MAX_IB_PHY_PORTS + 1) 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#define MLXSW_PORT_CPU_PORT 0x0 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define MLXSW_PORT_DONT_CARE 0xFF 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cienum mlxsw_port_admin_status { 288c2ecf20Sopenharmony_ci MLXSW_PORT_ADMIN_STATUS_UP = 1, 298c2ecf20Sopenharmony_ci MLXSW_PORT_ADMIN_STATUS_DOWN = 2, 308c2ecf20Sopenharmony_ci MLXSW_PORT_ADMIN_STATUS_UP_ONCE = 3, 318c2ecf20Sopenharmony_ci MLXSW_PORT_ADMIN_STATUS_DISABLED = 4, 328c2ecf20Sopenharmony_ci}; 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_cienum mlxsw_reg_pude_oper_status { 358c2ecf20Sopenharmony_ci MLXSW_PORT_OPER_STATUS_UP = 1, 368c2ecf20Sopenharmony_ci MLXSW_PORT_OPER_STATUS_DOWN = 2, 378c2ecf20Sopenharmony_ci MLXSW_PORT_OPER_STATUS_FAILURE = 4, /* Can be set to up again. */ 388c2ecf20Sopenharmony_ci}; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#endif /* _MLXSW_PORT_H */ 41