dm9000: fix "BUG: spinlock recursion"
commit3589bef7c2755ab044274f7cdea656bba29a94ae
authorBaruch Siach <baruch@tkos.co.il>
Tue, 18 May 2010 00:45:48 +0000 (17 17:45 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:30:12 +0000 (2 10:30 -0700)
tree869c277d184e19f9c22ff33f9b1ee41e6f61fa74
parent3fe45b2885d414bcfc05d61d025b8cc1bcf790e3
dm9000: fix "BUG: spinlock recursion"

commit 380fefb2ddabd4cd5f14dbe090481f0544e65078 upstream.

dm9000_set_rx_csum and dm9000_hash_table are called from atomic context (in
dm9000_init_dm9000), and from non-atomic context (via ethtool_ops and
net_device_ops respectively). This causes a spinlock recursion BUG. Fix this by
renaming these functions to *_unlocked for the atomic context, and make the
original functions locking wrappers for use in the non-atomic context.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/dm9000.c