]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net/via-rhine: Fix scheduling while atomic bugs
authorJarek Poplawski <jarkao2@gmail.com>
Thu, 24 Dec 2009 05:54:29 +0000 (21:54 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 15:49:43 +0000 (08:49 -0700)
commit34299ab10551905d26fc13166edc4d149ab497a9
tree92c3e5b505ac0da390127270982e8ca6755c36c9
parent654b0f73a1ab0de2bf650e86f47462562c7cdb99
net/via-rhine: Fix scheduling while atomic bugs

commit c0d7a0212becebe11ffe6979ee3d6f1c4104568d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/via-rhine.c