]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Fix base port get for split count 4 and 8
authorJiri Pirko <jiri@mellanox.com>
Thu, 31 Oct 2019 09:42:19 +0000 (11:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 17:54:47 +0000 (10:54 -0700)
commit06eac807cff224ec577ee1e3d87f1f39a2a71124
tree80099f51d421e84811580c7672a7d1750b076653
parent21c722c3563751799367eccc895fa50e9b8e75df
mlxsw: spectrum: Fix base port get for split count 4 and 8

The current code considers only split by 2 or 4. Make the base port
getting generic and allow split by 8 to be handled correctly. Generalize
the used port checks as well.

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.c