commit | 4398f9c817028b3b654923b3b614ea174cbc2c67 | [log] [tgz] |
---|---|---|
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | Thu Feb 26 20:35:05 2015 +0000 |
committer | David S. Miller <davem@davemloft.net> | Wed Mar 04 15:40:54 2015 -0500 |
tree | 9d96b086dfaacd00f69528cfa57d54acdf01cf2b | |
parent | e5fd13f476025f416583149313da85f8a3164414 [diff] |
sh_eth: Mitigate lost statistics updates The statistics registers have write-clear behaviour, which means we will lose any increment between the read and write. Mitigate this by only clearing when we read a non-zero value, so we will never falsely report a total of zero. This also saves time as we only handle error statistics here and they won't often be incremented. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>