Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3451
b: refs/heads/master
c: 97f568d
h: refs/heads/master
i:
  3449: 0ffae9d
  3447: b6849d8
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Jun 26, 2005
1 parent a965fbc commit 93d2ab2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 223d47278a77091b62e7d063e95860f63ca55e20
refs/heads/master: 97f568d8e3dc031b092e6086c0534d5411fb2cf5
12 changes: 6 additions & 6 deletions trunk/drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1516,22 +1516,22 @@ static void cp_get_ethtool_stats (struct net_device *dev,
struct ethtool_stats *estats, u64 *tmp_stats)
{
struct cp_private *cp = netdev_priv(dev);
unsigned int work = 100;
int i;

memset(cp->nic_stats, 0, sizeof(struct cp_dma_stats));

/* begin NIC statistics dump */
cpw32(StatsAddr + 4, (cp->nic_stats_dma >> 16) >> 16);
cpw32(StatsAddr, (cp->nic_stats_dma & 0xffffffff) | DumpStats);
cpr32(StatsAddr);

while (work-- > 0) {
for (i = 0; i < 1000; i++) {
if ((cpr32(StatsAddr) & DumpStats) == 0)
break;
cpu_relax();
udelay(10);
}

if (cpr32(StatsAddr) & DumpStats)
return /* -EIO */;
cpw32(StatsAddr, 0);
cpw32(StatsAddr + 4, 0);

i = 0;
tmp_stats[i++] = le64_to_cpu(cp->nic_stats->tx_ok);
Expand Down

0 comments on commit 93d2ab2

Please sign in to comment.