]> git.baikalelectronics.ru Git - kernel.git/commit
DM9000: Do not sleep with spinlock and IRQs held
authorBen Dooks <ben-linux@fluff.org>
Tue, 5 Feb 2008 00:02:07 +0000 (00:02 +0000)
committerJeff Garzik <jeff@garzik.org>
Mon, 11 Feb 2008 16:06:26 +0000 (11:06 -0500)
commit908258bac60cb98aa7b09f6816a8b70d2984d1a5
tree5aed488a12bcf2654990d715b9da314e9a8172ce
parent0e3913c9f9459c756a5a4b90678d9688f66a92b9
DM9000: Do not sleep with spinlock and IRQs held

The phy read and write routines call udelay() with the board
lock held, and with the posibility of IRQs being disabled. Since
these delays can be up to 500usec, and are only required as we
have to save the chip's address register.

To improve the behaviour, hold the lock whilst we are writing
and then restore the state before the delay and then repeat
the process once the delay has happened.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/dm9000.c