diff options
author | Vadim Pasternak | 2016-11-16 15:20:43 +0100 |
---|---|---|
committer | David S. Miller | 2016-11-17 05:29:04 +0100 |
commit | c711e27a1851c5efe9eb43365d6a3ffaf6d5f37f (patch) | |
tree | 5b4f744f6eacd60b20535055ec4c3012f941019f /drivers/net/ethernet/mellanox/mlxsw/core.h | |
parent | net: netcp: replace IS_ERR_OR_NULL by IS_ERR (diff) | |
download | kernel-qcow2-linux-c711e27a1851c5efe9eb43365d6a3ffaf6d5f37f.tar.gz kernel-qcow2-linux-c711e27a1851c5efe9eb43365d6a3ffaf6d5f37f.tar.xz kernel-qcow2-linux-c711e27a1851c5efe9eb43365d6a3ffaf6d5f37f.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.h b/drivers/net/ethernet/mellanox/mlxsw/core.h index c0acc1b9eb2f..f7a4d83801eb 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.h +++ b/drivers/net/ethernet/mellanox/mlxsw/core.h @@ -268,6 +268,8 @@ u64 mlxsw_core_res_get(struct mlxsw_core *mlxsw_core, #define MLXSW_CORE_RES_GET(res, short_res_id) \ mlxsw_core_res_get(res, MLXSW_RES_ID_##short_res_id) +#define MLXSW_BUS_F_TXRX BIT(0) + struct mlxsw_bus { const char *kind; int (*init)(void *bus_priv, struct mlxsw_core *mlxsw_core, @@ -283,6 +285,7 @@ struct mlxsw_bus { char *in_mbox, size_t in_mbox_size, char *out_mbox, size_t out_mbox_size, u8 *p_status); + u8 features; }; struct mlxsw_bus_info { |