diff options
| author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2015-02-26 20:35:05 +0000 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-03-04 15:40:54 -0500 |
| commit | 4398f9c817028b3b654923b3b614ea174cbc2c67 (patch) | |
| tree | 9d96b086dfaacd00f69528cfa57d54acdf01cf2b /net/switchdev/switchdev.c | |
| 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>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
