summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/core.h
diff options
context:
space:
mode:
authorNogah Frankel2016-07-21 12:03:09 +0200
committerDavid S. Miller2016-07-25 08:11:58 +0200
commit57d316ba2017d824ed0fd95fc98b020c834023a1 (patch)
tree2256a8bd7035cec8669b15694235c023cf99df76 /drivers/net/ethernet/mellanox/mlxsw/core.h
parentcdc_ether: Improve ZTE MF823/831/910 handling (diff)
downloadkernel-qcow2-linux-57d316ba2017d824ed0fd95fc98b020c834023a1.tar.gz
kernel-qcow2-linux-57d316ba2017d824ed0fd95fc98b020c834023a1.tar.xz
kernel-qcow2-linux-57d316ba2017d824ed0fd95fc98b020c834023a1.zip
mlxsw: pci: Add resources query implementation.
Add resources query implementation. If exists, query the HW for its builtin resources instead of having them as consts in the code. Signed-off-by: Nogah Frankel <nogahf@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/core.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.h b/drivers/net/ethernet/mellanox/mlxsw/core.h
index 2fe385cce203..d57ad0db44bd 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.h
@@ -215,6 +215,7 @@ struct mlxsw_config_profile {
u32 kvd_linear_size;
u32 kvd_hash_single_size;
u32 kvd_hash_double_size;
+ u8 resource_query_enable;
struct mlxsw_swid_config swid_config[MLXSW_CONFIG_PROFILE_SWID_COUNT];
};
@@ -266,10 +267,16 @@ struct mlxsw_driver {
const struct mlxsw_config_profile *profile;
};
+struct mlxsw_resources {
+};
+
+struct mlxsw_resources *mlxsw_core_resources_get(struct mlxsw_core *mlxsw_core);
+
struct mlxsw_bus {
const char *kind;
int (*init)(void *bus_priv, struct mlxsw_core *mlxsw_core,
- const struct mlxsw_config_profile *profile);
+ const struct mlxsw_config_profile *profile,
+ struct mlxsw_resources *resources);
void (*fini)(void *bus_priv);
bool (*skb_transmit_busy)(void *bus_priv,
const struct mlxsw_tx_info *tx_info);