]> git.baikalelectronics.ru Git - kernel.git/commit
S2io: fix statistics flush after a MTU change
authorBreno Leitao <leitao@linux.vnet.ibm.com>
Tue, 22 Jul 2008 19:27:20 +0000 (16:27 -0300)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 29 Jul 2008 22:24:30 +0000 (18:24 -0400)
commit5c7e7a97155ed1dae65f300281c0d946686ced17
tree1357c28fa017eca6ee8ed40eb751d02f12469659
parente20cf2d6751950e1f19782891e325485212d45f2
S2io: fix statistics flush after a MTU change

On s2io driver, when you change the interface MTU, it invokes a card
reset, which flush some statistics.  This patch solves this problem, and
also set the net_device->stats as the default statistics structure,
instead of s2io_nic->stats.

To do that, s2io_nic->stats turned into a staging area, where is saved
statistics of the last hardware statistics query. So, the difference
between the current hardware statistics and s2io_nic->stats, is the
value that should be summed up, in order to get the correct statistics
value, even after a reset.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/s2io.c