• Breno Leitao's avatar
    S2io: fix statistics flush after a MTU change · dc56e634
    Breno Leitao authored
    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: default avatarBreno Leitao <leitao@linux.vnet.ibm.com>
    Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
    Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    dc56e634
s2io.c 246 KB