net/via-rhine: Fix scheduling while atomic bugs
authorJarek Poplawski <jarkao2@gmail.com>
Thu, 24 Dec 2009 05:54:29 +0000 (21:54 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Dec 2009 05:54:29 +0000 (21:54 -0800)
commitc0d7a0212becebe11ffe6979ee3d6f1c4104568d
treec15c91cec8b1d547def8c2381594fef0ae077f98
parent656ab8172a49d3931e64f866c080260be638c8a9
net/via-rhine: Fix scheduling while atomic bugs

There are BUGs "scheduling while atomic" triggered by the timer
rhine_tx_timeout(). They are caused by calling napi_disable() (with
msleep()). This patch fixes it by moving most of the timer content to
the workqueue function (similarly to other drivers, like tg3), with
spin_lock() changed to BH version.

Additionally, there is spin_lock_irq() moved in rhine_close() to
exclude napi_disable() etc., also tg3's way.

Reported-by: Andrey Rahmatullin <wrar@altlinux.org>
Tested-by: Andrey Rahmatullin <wrar@altlinux.org>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/via-rhine.c