tg3: Fix phylib locking strategy
authorMatt Carlson <mcarlson@broadcom.com>
Mon, 5 Oct 2009 17:55:29 +0000 (17:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Oct 2009 10:37:39 +0000 (03:37 -0700)
commit24bb4fb6dac59f220f42fb375ba0e0f19365a227
treef3c14601de35332b12260e89526426c220578121
parent083925d5432d910025e84d445d1243dd260d4afb
tg3: Fix phylib locking strategy

Felix Radensky noted that chip resets were generating stack trace dumps.
This is because the driver is attempting to acquire the mdio bus mutex
while holding the tp->lock spinlock.  The fix is to change the code such
that every phy access takes the tp->lock spinlock instead.

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