diff options
author | Sriram <srk@ti.com> | 2009-10-07 02:44:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-13 12:02:53 -0700 |
commit | 0fe7463a35aadfaf22d1ca58325ab3851b8d757c (patch) | |
tree | a61b3d59ebc28c3eea7134680e250d2ddd261a40 /net | |
parent | daf9df6d8d0f5a4a406632d4da027655d065d3ba (diff) |
TI DaVinci EMAC: Clear statistics register properly.
The mechanism to clear the statistics register is dependent
on the status of GMIIEN bit in MAC control register. If the
GMIIEN bit is set, the stats registers are write to decrement.
If the GMIIEN bit is cleared, the stats registers are plain
read/write registers. The stats register clearing operation
must take into account the current state of GMIIEN as it
can be cleared when the interface is brought down.
With existing implementation logic, querying for interface stats
when the interface is down, can corrupt the statistics counters.
This patch examines the GMIIEN bit status in MAC_CONTROL
register before choosing an appropriate mask for clearing stats
registers.
Signed-off-by: Sriramakrishnan <srk@ti.com>
Acked-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions