[PATCH] mv643xx_eth: Fix tx_timeout to only conditionally wake tx queue
authorDale Farnsworth <dale@farnsworth.org>
Wed, 12 Apr 2006 01:24:26 +0000 (18:24 -0700)
committerJeff Garzik <jeff@garzik.org>
Wed, 12 Apr 2006 22:11:23 +0000 (18:11 -0400)
commit94843566d7119e049a72618a3c939d5c2be022c7
tree4b0b90677e6ad7cbe70914a3ad33bdf57a55997d
parent5c5374087707d7848cb13f15e7c175daf346301c
[PATCH] mv643xx_eth: Fix tx_timeout to only conditionally wake tx queue

After resetting the hardware on a tx_timeout, call netif_wake_queue()
only if we have free tx descriptors.

Also, attempt to recover if mv643xx_eth_start_xmit() is called when
there are fewer free tx descriptors than expected.

The BUG_ON() call we are replacing was hit on a tx_timeout that
called netif_wake_queue(), indirectly via netif_device_attach(),
even though we did not have enough free tx descriptors.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/mv643xx_eth.c