Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ded821c8 authored by Nogah Frankel's avatar Nogah Frankel Committed by David S. Miller
Browse files

mlxsw: pci: Add max span resources to resources query



Add max span resources to resources query.

Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 57d316ba
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -268,6 +268,8 @@ struct mlxsw_driver {
};

struct mlxsw_resources {
	u8	max_span_valid:1;
	u8      max_span;
};

struct mlxsw_resources *mlxsw_core_resources_get(struct mlxsw_core *mlxsw_core);
+5 −0
Original line number Diff line number Diff line
@@ -1155,6 +1155,7 @@ mlxsw_pci_config_profile_swid_config(struct mlxsw_pci *mlxsw_pci,
}

#define MLXSW_RESOURCES_TABLE_END_ID 0xffff
#define MLXSW_MAX_SPAN_ID 0x2420
#define MLXSW_RESOURCES_QUERY_MAX_QUERIES 100
#define MLXSW_RESOURCES_PER_QUERY 32

@@ -1162,6 +1163,10 @@ static void mlxsw_pci_resources_query_parse(int id, u64 val,
					    struct mlxsw_resources *resources)
{
	switch (id) {
	case MLXSW_MAX_SPAN_ID:
		resources->max_span = val;
		resources->max_span_valid = 1;
		break;
	default:
		break;
	}