]> git.baikalelectronics.ru Git - kernel.git/commit
macb: avoid lockup when TGO during underrun
authorRichard Röjfors <richard.rojfors@endian.se>
Mon, 19 Jan 2009 05:57:35 +0000 (21:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jan 2009 00:20:16 +0000 (16:20 -0800)
commitbf9f50631781af83f401fa98d38132c09c999a5d
tree840836c811ba0b518be07ff92c1d331e16c94212
parent6430db1e185a2c4e0403f38e6d5a19145ffdad3d
macb: avoid lockup when TGO during underrun

In rare cases when an underrun occur, all macb buffers where consumed
and the netif_queue was stopped infinitely. This happens then the TGO
(transfer ongoing) bit in the TSR is set (and UND). It seems like
clening up after the underrun makes the driver and the macb hardware
end up in an inconsistent state. The result of this is that in the
following calls to macb_tx no TX buffers are released -> the
netif_queue was stopped, and never woken up again.

The solution is to disable the transmitter, if TGO is set, before
clening up after the underrun, and re-enable the transmitter when the
cleaning up is done.

Signed-off-by: Richard Röjfors <richard.rojfors@endian.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macb.c