]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit27ae48ae117a2f91da3217dd33bebc4c70024e61
treea84c854cdde90198542c2468f043b75b5dec83a8
parentbc313d30ecbc16c1fc3b6aa857875d6522effc92
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]