summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/resources.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2017-03-24 08:02:47 +0100
committerDavid S. Miller <davem@davemloft.net>2017-03-24 13:53:28 -0700
commit8494ab06e06a8ef60db9ad678eb4bcd8def4c85b (patch)
treecbf4ec2e7a84f62586d1703a34d344b5ff848c81 /drivers/net/ethernet/mellanox/mlxsw/resources.h
parentba82427d4a0fdd92b01cb2a1c4c24990f37406a9 (diff)
downloadlinux-0-day-8494ab06e06a8ef60db9ad678eb4bcd8def4c85b.tar.gz
linux-0-day-8494ab06e06a8ef60db9ad678eb4bcd8def4c85b.tar.xz
mlxsw: spectrum_router: Query number of LPM trees from firmware
Instead of hard coding the number of LPM trees in the driver, query it from the firmware, as it may change in future devices. Signed-off-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/resources.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/resources.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/resources.h b/drivers/net/ethernet/mellanox/mlxsw/resources.h
index 905a8e269f874..41553a79d99de 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/resources.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/resources.h
@@ -61,6 +61,7 @@ enum mlxsw_res_id {
MLXSW_RES_ID_MAX_CPU_POLICERS,
MLXSW_RES_ID_MAX_VRS,
MLXSW_RES_ID_MAX_RIFS,
+ MLXSW_RES_ID_MAX_LPM_TREES,
/* Internal resources.
* Determined by the SW, not queried from the HW.
@@ -95,6 +96,7 @@ static u16 mlxsw_res_ids[] = {
[MLXSW_RES_ID_MAX_CPU_POLICERS] = 0x2A13,
[MLXSW_RES_ID_MAX_VRS] = 0x2C01,
[MLXSW_RES_ID_MAX_RIFS] = 0x2C02,
+ [MLXSW_RES_ID_MAX_LPM_TREES] = 0x2C30,
};
struct mlxsw_res {