]> git.baikalelectronics.ru Git - kernel.git/commit
myri10ge: force stats update in ethtool gstats
authorBrice Goglin <brice@myri.com>
Thu, 16 Apr 2009 02:23:56 +0000 (02:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Apr 2009 01:00:43 +0000 (18:00 -0700)
commit0f0dd46d0deeff32d49a473de69609804769cbc0
tree74569b7dc4061819495b00ac4321a30f78791dad
parent1145cec226ecdcdead52b026aac3088be47d0c5e
myri10ge: force stats update in ethtool gstats

Force a statistics update when our ethtool gstats routine
is called.  Otherwise, ethtool will continue to read stale
stats until something forces an update by reading /proc/net/dev

This requires putting a lock around the stats update to guard
against 2 threads (one via ethtool, and one via procfs)
updating the stats at once.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/myri10ge/myri10ge.c