--- drivers/net/sungem.old.c 2005-08-27 10:38:36.000000000 +0200 +++ drivers/net/sungem.c 2005-08-27 10:55:30.000000000 +0200 @@ -933,6 +933,7 @@ struct net_device *dev = dev_id; struct gem *gp = dev->priv; unsigned long flags; + u32 gem_status; /* Swallow interrupts when shutting the chip down, though * that shouldn't happen, we should have done free_irq() at @@ -942,14 +943,14 @@ return IRQ_HANDLED; spin_lock_irqsave(&gp->lock, flags); + + if ((gem_status = readl(gp->regs + GREG_STAT)) == 0) { + /* nothing to do */ + spin_unlock_irqrestore(&gp->lock, flags); + return IRQ_NONE; + } if (netif_rx_schedule_prep(dev)) { - u32 gem_status = readl(gp->regs + GREG_STAT); - - if (gem_status == 0) { - spin_unlock_irqrestore(&gp->lock, flags); - return IRQ_NONE; - } gp->status = gem_status; gem_disable_ints(gp); __netif_rx_schedule(dev);