]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
skge: fix occasional BUG during MTU change
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 14 Apr 2009 22:16:55 +0000 (15:16 -0700)
committerChris Wright <chrisw@sous-sol.org>
Mon, 27 Apr 2009 17:37:05 +0000 (10:37 -0700)
commit9fc79ab9a371b45166d80ef18411ea47cf8e3195
treee10cf7cbd66c6295ef7647da5d99f7c0b38dfa77
parent24016c735e651f179692432f18176348caeb82b0
skge: fix occasional BUG during MTU change

upstream commit: d119b3927994e3d620d6adb0dd1ea6bf24427875

The BUG_ON(skge->tx_ring.to_use != skge->tx_ring.to_clean) in skge_up()
was sometimes observed when setting MTU.

skge_down() disables the TX queue, but then reenables it by mistake via
skge_tx_clean().
Fix it by moving the waking of the queue from skge_tx_clean() to the
other caller. And to make sure start_xmit is not in progress on another
CPU, skge_down() should call netif_tx_disable().

The bug was reported to me by Jiri Jilek whose Debian system sometimes
failed to boot. He tested the patch and the bug did not happen anymore.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/net/skge.c