Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102528
b: refs/heads/master
c: 966e37b
h: refs/heads/master
v: v3
  • Loading branch information
Paulius Zaleckas authored and Jeff Garzik committed May 13, 2008
1 parent a7629c9 commit e4668e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 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: de0561c43550f78cd837a24179f1859817f24578
refs/heads/master: 966e37bca6a84299e0c3ed13e741db9c6e0b0f92
21 changes: 8 additions & 13 deletions trunk/drivers/net/acenic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,11 +1457,6 @@ static int __devinit ace_init(struct net_device *dev)
ace_set_txprd(regs, ap, 0);
writel(0, &regs->RxRetCsm);

/*
* Zero the stats before starting the interface
*/
memset(&ap->stats, 0, sizeof(ap->stats));

/*
* Enable DMA engine now.
* If we do this sooner, Mckinley box pukes.
Expand Down Expand Up @@ -2041,8 +2036,8 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
netif_rx(skb);

dev->last_rx = jiffies;
ap->stats.rx_packets++;
ap->stats.rx_bytes += retdesc->size;
dev->stats.rx_packets++;
dev->stats.rx_bytes += retdesc->size;

idx = (idx + 1) % RX_RETURN_RING_ENTRIES;
}
Expand Down Expand Up @@ -2090,8 +2085,8 @@ static inline void ace_tx_int(struct net_device *dev,
}

if (skb) {
ap->stats.tx_packets++;
ap->stats.tx_bytes += skb->len;
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;
dev_kfree_skb_irq(skb);
info->skb = NULL;
}
Expand Down Expand Up @@ -2863,11 +2858,11 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev)
struct ace_mac_stats __iomem *mac_stats =
(struct ace_mac_stats __iomem *)ap->regs->Stats;

ap->stats.rx_missed_errors = readl(&mac_stats->drop_space);
ap->stats.multicast = readl(&mac_stats->kept_mc);
ap->stats.collisions = readl(&mac_stats->coll);
dev->stats.rx_missed_errors = readl(&mac_stats->drop_space);
dev->stats.multicast = readl(&mac_stats->kept_mc);
dev->stats.collisions = readl(&mac_stats->coll);

return &ap->stats;
return &dev->stats;
}


Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/acenic.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ struct ace_private
__attribute__ ((aligned (SMP_CACHE_BYTES)));
u32 last_tx, last_std_rx, last_mini_rx;
#endif
struct net_device_stats stats;
int pci_using_dac;
};

Expand Down

0 comments on commit e4668e2

Please sign in to comment.