OSDN Git Service

mlxsw: spectrum: Use PMTM register to get max module width
authorJiri Pirko <jiri@mellanox.com>
Thu, 31 Oct 2019 09:42:08 +0000 (11:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 17:54:46 +0000 (10:54 -0700)
commit25911e1b97971a06b4c053f70c7c1eb0c33a607e
treea09367e68929eab8e5f4fc5093093996087c20d6
parenta513b1a5910bfc15d5a42e969e66a7986fd32819
mlxsw: spectrum: Use PMTM register to get max module width

Currently the max module width is hard-coded according to ASIC type.
That is not entirely correct, as the max module width might differ
per-board. Use PMTM register to query FW for maximal width of a module.

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