diff options
author | Benjamin LaHaise <ben.lahaise@neterion.com> | 2009-08-04 06:20:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-05 16:10:43 -0400 |
commit | 4403b371888d5947ed08200ee6351441a188a5c7 (patch) | |
tree | 69b9f54df4340aab236206295da03b14683dc62f | |
parent | 36e89d73e54c8db79d0fd1636cab9236eea7aae9 (diff) |
vxge: don't drop frame on tx queue full
The vxge driver will drop a packet in its transmit function if the number
of TxDs available hits 0. Instead of doing that, simply stop the transmit
queue when transmitting a packet with the last available TxD.
Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/vxge/vxge-main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index 335140d2834a..beee4ab2ed30 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c | |||
@@ -895,6 +895,12 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev) | |||
895 | goto _exit2; | 895 | goto _exit2; |
896 | } | 896 | } |
897 | 897 | ||
898 | /* Last TXD? Stop tx queue to avoid dropping packets. TX | ||
899 | * completion will resume the queue. | ||
900 | */ | ||
901 | if (avail == 1) | ||
902 | vxge_stop_tx_queue(fifo); | ||
903 | |||
898 | status = vxge_hw_fifo_txdl_reserve(fifo_hw, &dtr, &dtr_priv); | 904 | status = vxge_hw_fifo_txdl_reserve(fifo_hw, &dtr, &dtr_priv); |
899 | if (unlikely(status != VXGE_HW_OK)) { | 905 | if (unlikely(status != VXGE_HW_OK)) { |
900 | vxge_debug_tx(VXGE_ERR, | 906 | vxge_debug_tx(VXGE_ERR, |