mlxsw: reg: Extend SBPM register for occupancy control
authorJiri Pirko <jiri@mellanox.com>
Thu, 14 Apr 2016 16:19:27 +0000 (18:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Apr 2016 20:22:06 +0000 (16:22 -0400)
commit42a7f1d7747904d89e9831fb85a678add00facf3
tree6db4fa64894f25d60f933c3deb3f3c5957098b44
parent26176def3c1e7933601d04de3d4980199c1c87d1
mlxsw: reg: Extend SBPM register for occupancy control

Since it is not possible to get and clear Port-Pool occupancy data using
SBSR register, there's a need to implement that using SBPM.
Extend pack helper and add unpack helper to get occupancy values.

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