mlxsw: Add bus capability flag
authorVadim Pasternak <vadimp@mellanox.com>
Wed, 16 Nov 2016 14:20:43 +0000 (15:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Nov 2016 04:29:04 +0000 (23:29 -0500)
commitc711e27a1851c5efe9eb43365d6a3ffaf6d5f37f
tree5b4f744f6eacd60b20535055ec4c3012f941019f
parentd01eb808c7b8bf2faf89901f1fddfa836d330057
mlxsw: Add bus capability flag

The mlxsw core infrastructure currently assumes that communication with
the ASIC is always possible using Ethernet management datagrams (EMADs),
but this is only possible when the PCI bus is used.

The bus capability flag is added to indicate EMAD support and make core
initialize EMAD communication only when it's set. Otherwise, register
access is done using command interface.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@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/pci.c