From 6a986993e43f176e07c28df560b1cfc3e9b80505 Mon Sep 17 00:00:00 2001 From: Vadim Pasternak Date: Sun, 3 Mar 2019 09:12:16 +0000 Subject: mlxsw: i2c: Extend initialization by querying resources data Extend initialization flow by query requests for chip resources data in order to obtain chip's specific capabilities, like the number of ports. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'drivers/net/ethernet/mellanox/mlxsw/minimal.c') diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c index 9108149640b2..68bee9572a1b 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c @@ -333,11 +333,12 @@ static void mlxsw_m_fini(struct mlxsw_core *mlxsw_core) static const struct mlxsw_config_profile mlxsw_m_config_profile; static struct mlxsw_driver mlxsw_m_driver = { - .kind = mlxsw_m_driver_name, - .priv_size = sizeof(struct mlxsw_m), - .init = mlxsw_m_init, - .fini = mlxsw_m_fini, - .profile = &mlxsw_m_config_profile, + .kind = mlxsw_m_driver_name, + .priv_size = sizeof(struct mlxsw_m), + .init = mlxsw_m_init, + .fini = mlxsw_m_fini, + .profile = &mlxsw_m_config_profile, + .res_query_enabled = true, }; static const struct i2c_device_id mlxsw_m_i2c_id[] = { -- cgit v1.2.3-59-g8ed1b