mlxsw: Introduce Mellanox SwitchX-2 ASIC support
[cascardo/linux.git] / drivers / net / ethernet / mellanox / mlxsw / port.h
index 4606966..726f543 100644 (file)
 #define MLXSW_PORT_MAX_PHY_PORTS       0x40
 #define MLXSW_PORT_MAX_PORTS           MLXSW_PORT_MAX_PHY_PORTS
 
+#define MLXSW_PORT_DEVID_BITS_OFFSET   10
+#define MLXSW_PORT_PHY_BITS_OFFSET     4
+#define MLXSW_PORT_PHY_BITS_MASK       (MLXSW_PORT_MAX_PHY_PORTS - 1)
+
 #define MLXSW_PORT_CPU_PORT            0x0
 
 #define MLXSW_PORT_DONT_CARE           (MLXSW_PORT_MAX_PORTS)