pch_gbe: fix transmit races
authorEric Dumazet <edumazet@google.com>
Mon, 14 May 2012 09:26:06 +0000 (09:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 May 2012 17:41:43 +0000 (13:41 -0400)
commit3ab77bf271e6a41512e366dfa5110edb981ed1d3
treed3ff26916d49bba577ea29fc58fe4f3319366056
parent4e6304b8420aba5311ba21fd68dab2924ae4d91a
pch_gbe: fix transmit races

Andy reported pch_gbe triggered "NETDEV WATCHDOG" errors.

May 11 11:06:09 kontron kernel: WARNING: at net/sched/sch_generic.c:261
dev_watchdog+0x1ec/0x200() (Not tainted)
May 11 11:06:09 kontron kernel: Hardware name: N/A
May 11 11:06:09 kontron kernel: NETDEV WATCHDOG: eth0 (pch_gbe):
transmit queue 0 timed out

It seems pch_gbe has a racy tx path (races with TX completion path)

Remove tx_queue_lock lock since it has no purpose, we must use tx_lock
instead.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Andy Cress <andy.cress@us.kontron.com>
Tested-by: Andy Cress <andy.cress@us.kontron.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c