mlxsw: Add interface to access registers and process events
authorIdo Schimmel <idosch@mellanox.com>
Wed, 29 Jul 2015 21:33:48 +0000 (23:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Jul 2015 07:05:00 +0000 (00:05 -0700)
commit4ec14b7634b298186f18f65d959354dc3c60e02c
treea84c854cdde90198542c2468f043b75b5dec83a8
parenteda6500a987a027b78a275c11db6454404a626aa
mlxsw: Add interface to access registers and process events

Ethernet Management Datagrams (EMADs) are Ethernet packets sent between
the host and the device in order to configure the available device registers.
Another use case is notifications sent from the device to the host,
letting it know about certain events, such as port up / down.

Add the ability to construct EMADs with provisions to construct and
parse the registers' payloads. Implement EMAD transaction layer
which is responsible for the reliable transmission of EMADs. Also, add
an infrastructure used by the switch driver to register for particular
events generated by the device.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Elad Raz <eladr@mellanox.com>
Reviewed-by: Scott Feldman <sfeldma@gmail.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/emad.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlxsw/port.h
drivers/net/ethernet/mellanox/mlxsw/reg.h [new file with mode: 0644]