IB/mlx4: Saturate RoCE port PMA counters in case of overflow
authorMajd Dibbiny <majd@mellanox.com>
Wed, 18 Mar 2015 14:51:37 +0000 (16:51 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 24 Apr 2015 21:14:11 +0000 (17:14 -0400)
commit02d51afc23e02e580e872cfc57d043c7a018505b
treecbe008b9ee48db1ec55a574ba52c7c3c9161a39b
parentaaa2bf750a05c56aafaa3cf51214d4bd59610f8d
IB/mlx4: Saturate RoCE port PMA counters in case of overflow

[ Upstream commit 61a3855bb726cbb062ef02a31a832dea455456e0 ]

For RoCE ports, we set the u32 PMA values based on u64 HCA counters. In case of
overflow, according to the IB spec, we have to saturate a counter to its
max value, do that.

Fixes: c37791349cc7 ('IB/mlx4: Support PMA counters for IBoE')
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/infiniband/hw/mlx4/mad.c