aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/microchip/ksz_common.c
diff options
context:
space:
mode:
authorAmit Cohen <amcohen@nvidia.com>2022-08-26 18:06:51 +0200
committerJakub Kicinski <kuba@kernel.org>2022-08-30 23:20:43 -0700
commitcf735d4c9bab8398259a3635fcd698726a2f1bbe (patch)
tree69368d9ba61b87f0ced753d0b137937fb27a42db /drivers/net/dsa/microchip/ksz_common.c
parentmlxsw: Support configuring 'max_lag' via CONFIG_PROFILE (diff)
downloadlinux-dev-cf735d4c9bab8398259a3635fcd698726a2f1bbe.tar.xz
linux-dev-cf735d4c9bab8398259a3635fcd698726a2f1bbe.zip
mlxsw: Add a helper function for getting maximum LAG ID
Currently the driver queries the maximum supported LAG ID from firmware. This will not be accurate anymore once the driver will configure 'max_lag' via CONFIG_PROFILE command. For resource query, firmware returns the maximum LAG ID which is supported by hardware. Software can configure firmware to do not allocate entries for all the supported LAGs, and to limit LAG IDs. In this case, the resource query will not return the actual maximum LAG ID. Add a helper function for getting this value. In case that 'max_lag' field was set during initialization, return the value which was used, otherwise, query firmware for the maximum supported ID. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.c')
0 files changed, 0 insertions, 0 deletions