diff options
author | Don Fry <brazilnut@us.ibm.com> | 2006-09-13 10:15:43 -0700 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-13 13:23:52 -0400 |
commit | 5c99346a3358a9c3c3fcf38669c05ac5f06832c9 (patch) | |
tree | 548f8ef561cf81069b41a709f6241704f63d3405 | |
parent | 38ed61d6c0b2c35fbaa1ccdb497543a18509d401 (diff) |
[PATCH] pcnet32: remove unnecessary save/restore register accesses.
Delete unnecessary save/restore of rap in interrupt handler and statistics.
tested ia32 and ppc64.
Signed-off-by: Don Fry <brazilnut@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/net/pcnet32.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 5e26fe806e2..98b7ab28162 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -2262,7 +2262,7 @@ pcnet32_interrupt(int irq, void *dev_id, struct pt_regs *regs) struct net_device *dev = dev_id; struct pcnet32_private *lp; unsigned long ioaddr; - u16 csr0, rap; + u16 csr0; int boguscnt = max_interrupt_work; int must_restart; @@ -2278,7 +2278,6 @@ pcnet32_interrupt(int irq, void *dev_id, struct pt_regs *regs) spin_lock(&lp->lock); - rap = lp->a.read_rap(ioaddr); while ((csr0 = lp->a.read_csr(ioaddr, 0)) & 0x8f00 && --boguscnt >= 0) { if (csr0 == 0xffff) { break; /* PCMCIA remove happened */ @@ -2434,7 +2433,6 @@ pcnet32_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* Set interrupt enable. */ lp->a.write_csr(ioaddr, 0, 0x0040); - lp->a.write_rap(ioaddr, rap); if (netif_msg_intr(lp)) printk(KERN_DEBUG "%s: exiting interrupt, csr0=%#4.4x.\n", @@ -2647,13 +2645,10 @@ static struct net_device_stats *pcnet32_get_stats(struct net_device *dev) { struct pcnet32_private *lp = dev->priv; unsigned long ioaddr = dev->base_addr; - u16 saved_addr; unsigned long flags; spin_lock_irqsave(&lp->lock, flags); - saved_addr = lp->a.read_rap(ioaddr); lp->stats.rx_missed_errors = lp->a.read_csr(ioaddr, 112); - lp->a.write_rap(ioaddr, saved_addr); spin_unlock_irqrestore(&lp->lock, flags); return &lp->stats; |