diff options
author | Russell King <[email protected]> | 2016-11-01 10:50:01 +0000 |
---|---|---|
committer | David S. Miller <[email protected]> | 2016-11-01 12:17:16 -0400 |
commit | b9b84fc07dbc6ac74d85f1b1a401b41c403fecb1 (patch) | |
tree | e938511fe8a1bbf73eed926c1f96cac7d0da86fc /lib/mpi/mpi-cmp.c | |
parent | 42fb18fd5852dba9c43ac008558e4bc8062bda57 (diff) |
net: mv643xx_eth: ensure coalesce settings survive read-modify-write
The coalesce settings behave badly when changing just one value:
... # ethtool -c eth0
rx-usecs: 249
... # ethtool -C eth0 tx-usecs 250
... # ethtool -c eth0
rx-usecs: 248
This occurs due to rounding errors when calculating the microseconds
value - the divisons round down. This causes (eg) the rx-usecs to
decrease by one every time the tx-usecs value is set as per the above.
Fix this by making the divison round-to-nearest.
Signed-off-by: Russell King <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions