[TG3]: Eliminate all hw IRQ handler spinlocks.
authorDavid S. Miller <davem@davemloft.net>
Sat, 25 Jun 2005 03:18:35 +0000 (20:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Jun 2005 03:18:35 +0000 (20:18 -0700)
commitf47c11eeccc8820010992eb32dbe7370a08f8bd3
tree7cd6308a1796fae227c61208545593b79b12f21a
parentcd024c8baf9756759c57f0a19be639da8d3d4f8c
[TG3]: Eliminate all hw IRQ handler spinlocks.

Move all driver spinlocks to be taken at sw IRQ
context only.

This fixes the skb_copy() we were doing with hw
IRQs disabled (which is illegal and triggers a
BUG() with HIGHMEM enabled).  It also simplifies
the locking all over the driver tremendously.

We accomplish this feat by creating a special
sequence to synchronize with the hw IRQ handler
using a binary state and synchronize_irq().
This idea is from Herbert Xu.

Thanks to Michael Chan for helping to track down
all of the race conditions in initial versions
of this code.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c
drivers/net/tg3.h