OSDN Git Service

mlxsw: spectrum: Use port_module_max_width to compute base port index
authorJiri Pirko <jiri@mellanox.com>
Thu, 31 Oct 2019 09:42:18 +0000 (11:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 17:54:47 +0000 (10:54 -0700)
commit013da297911830882611c4ae4764117dacf6713f
tree2c9191cb1167701b93ef484e308aba8087d5c8cd
parent49185277cc451ebae894456384cc8996e8ec4fdc
mlxsw: spectrum: Use port_module_max_width to compute base port index

Instead of using constant value, use port_module_max_width which is
aligned with the cluster size.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Shalom Toledo <shalomt@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h