]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
r8169: Don't update statistics counters when interface is down
authorIvan Vecera <ivecera@redhat.com>
Sat, 7 Feb 2009 05:49:57 +0000 (21:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Feb 2009 05:49:57 +0000 (21:49 -0800)
commit355423d0849f4506bc71ab2738d38cb74429aaef
treeefed57e98981e928f91c239075e4ed4bea5385ec
parent2783ef23128ad0a4b34e4121c1f7ff664785712f
r8169: Don't update statistics counters when interface is down

Some Realtek chips (RTL8169sb/8110sb in my case) are unable to retrieve
ethtool statistics when the interface is down. The process stays in
endless loop in rtl8169_get_ethtool_stats. This is because these chips
need to have receiver enabled (CmdRxEnb bit in ChipCmd register) that is
cleared when the interface is going down. It's better to update statistics
only when the interface is up and otherwise return copy of statistics
grabbed when the interface was up (in rtl8169_close).

It is interesting that PCI-E NICs (like 8168b/8111b...) are not affected.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/r8169.c