diff -u --recursive linux-2.5.40org/drivers/net/ni5010.c linux-2.5.40/drivers/net/ni5010.c --- linux-2.5.40org/drivers/net/ni5010.c Thu Oct 3 12:08:00 2002 +++ linux-2.5.40/drivers/net/ni5010.c Wed Oct 9 09:35:26 2002 @@ -86,6 +86,8 @@ { 0x300, 0x320, 0x340, 0x360, 0x380, 0x3a0, 0 }; #endif +static spinlock_t lock = SPIN_LOCK_UNLOCKED; + /* Use 0 for production, 1 for verification, >2 for debug */ #ifndef NI5010_DEBUG #define NI5010_DEBUG 0 @@ -693,9 +695,8 @@ buf_offs = NI5010_BUFSIZE - length; lp->o_pkt_size = length; - save_flags(flags); - cli(); - + spin_lock_irqsave(&lock, flags); + outb(0, EDLC_RMASK); /* Mask all receive interrupts */ outb(0, IE_MMODE); /* Put Xmit buffer on system bus */ outb(0xff, EDLC_RCLR); /* Clear out pending rcv interrupts */ @@ -709,7 +710,7 @@ outb(MM_EN_XMT | MM_MUX, IE_MMODE); /* Begin transmission */ outb(XM_ALL, EDLC_XMASK); /* Cause interrupt after completion or fail */ - restore_flags(flags); + spin_unlock_irqrestore(&lock, flags); netif_wake_queue(dev);