diff options
author | Petr Machata <petrm@mellanox.com> | 2018-04-01 16:34:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-01 16:56:43 +0200 |
commit | 59441fef2b10c651261be08aec558e90fbd594f8 (patch) | |
tree | 230ba7148718abcfaf4586c4a3eb8ed51e598867 /drivers/net/ethernet/mellanox | |
parent | mlxsw: spectrum: Pass mlxsw_core as arg of mlxsw_sp_kvdl_resources_register() (diff) | |
download | linux-59441fef2b10c651261be08aec558e90fbd594f8.tar.xz linux-59441fef2b10c651261be08aec558e90fbd594f8.zip |
mlxsw: spectrum: Don't use resource ID of 0
In commit 145307460ba9 ("devlink: Remove top_hierarchy arg to
devlink_resource_register"), the "top_hierarchy" parameter to
devlink_resource_register() was removed in favor of using the parameter
"parent_resource_id" exclusively to determine who the parent is. The
root node's resource ID for this purpose is
DEVLINK_RESOURCE_ID_PARENT_TOP with the value 0. It is therefore
problematic that the resource MLXSW_SP_RESOURCE_KVD has also ID of 0.
Fix this by numbering driver-specific resources from 1.
Fixes: 145307460ba9 ("devlink: Remove top_hierarchy arg to devlink_resource_register")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index c4d47e456737..82820ba43728 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -75,7 +75,7 @@ #define MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS "large_chunks" enum mlxsw_sp_resource_id { - MLXSW_SP_RESOURCE_KVD, + MLXSW_SP_RESOURCE_KVD = 1, MLXSW_SP_RESOURCE_KVD_LINEAR, MLXSW_SP_RESOURCE_KVD_HASH_SINGLE, MLXSW_SP_RESOURCE_KVD_HASH_DOUBLE, |