]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mlxsw: resources: Add local_ports_in_{1x, 2x}
authorShalom Toledo <shalomt@mellanox.com>
Thu, 2 May 2019 11:13:08 +0000 (14:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 May 2019 05:21:36 +0000 (01:21 -0400)
Since the number of local ports in 4x changed between SPC and SPC-2,
firmware expose new resources that the driver can query.

Signed-off-by: Shalom Toledo <shalomt@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/resources.h

index 773ef7fdb2850cf8286e9ec0e6df74d3a6406210..33a9fc9ef6a43f0f5a24ae970fb953e23763aec0 100644 (file)
@@ -24,6 +24,8 @@ enum mlxsw_res_id {
        MLXSW_RES_ID_MAX_SYSTEM_PORT,
        MLXSW_RES_ID_MAX_LAG,
        MLXSW_RES_ID_MAX_LAG_MEMBERS,
+       MLXSW_RES_ID_LOCAL_PORTS_IN_1X,
+       MLXSW_RES_ID_LOCAL_PORTS_IN_2X,
        MLXSW_RES_ID_MAX_BUFFER_SIZE,
        MLXSW_RES_ID_CELL_SIZE,
        MLXSW_RES_ID_MAX_HEADROOM_SIZE,
@@ -78,6 +80,8 @@ static u16 mlxsw_res_ids[] = {
        [MLXSW_RES_ID_MAX_SYSTEM_PORT] = 0x2502,
        [MLXSW_RES_ID_MAX_LAG] = 0x2520,
        [MLXSW_RES_ID_MAX_LAG_MEMBERS] = 0x2521,
+       [MLXSW_RES_ID_LOCAL_PORTS_IN_1X] = 0x2610,
+       [MLXSW_RES_ID_LOCAL_PORTS_IN_2X] = 0x2611,
        [MLXSW_RES_ID_MAX_BUFFER_SIZE] = 0x2802,        /* Bytes */
        [MLXSW_RES_ID_CELL_SIZE] = 0x2803,      /* Bytes */
        [MLXSW_RES_ID_MAX_HEADROOM_SIZE] = 0x2811,      /* Bytes */