modify 3c589_cs to be SMP safe

1. EL3WINDOW is always 1 when lock is not held.

2. The second argument of el3_interrupt is 'void *dev_id',
not 'struct el3_private *lp'.

Signed-off-by: komurojun-mbn@nifty.com
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by Komuro and committed by Jeff Garzik d08d2839 2596627c

+5 -2
+5 -2
drivers/net/pcmcia/3c589_cs.c
··· 606 606 { 607 607 kio_addr_t ioaddr = dev->base_addr; 608 608 struct el3_private *priv = netdev_priv(dev); 609 + unsigned long flags; 609 610 610 611 DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " 611 612 "status %4.4x.\n", dev->name, (long)skb->len, 612 613 inw(ioaddr + EL3_STATUS)); 614 + 615 + spin_lock_irqsave(&priv->lock, flags); 613 616 614 617 priv->stats.tx_bytes += skb->len; 615 618 ··· 631 628 632 629 dev_kfree_skb(skb); 633 630 pop_tx_status(dev); 631 + spin_unlock_irqrestore(&priv->lock, flags); 634 632 635 633 return 0; 636 634 } ··· 733 729 734 730 if (!netif_device_present(dev)) goto reschedule; 735 731 736 - EL3WINDOW(1); 737 732 /* Check for pending interrupt with expired latency timer: with 738 733 this, we can limp along even if the interrupt is blocked */ 739 734 if ((inw(ioaddr + EL3_STATUS) & IntLatch) && 740 735 (inb(ioaddr + EL3_TIMER) == 0xff)) { 741 736 if (!lp->fast_poll) 742 737 printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); 743 - el3_interrupt(dev->irq, lp); 738 + el3_interrupt(dev->irq, dev); 744 739 lp->fast_poll = HZ; 745 740 } 746 741 if (lp->fast_poll) {