diff options
author | Rini van Zetten <rini@arvoo.nl> | 2009-02-27 03:18:48 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-27 03:18:48 -0800 |
commit | 7958a45310519811134a5b911d863201786978ab (patch) | |
tree | d2f95d6c105e112429316289a8e30d1821e00e87 /drivers/net/gianfar.c | |
parent | 1844f747947bb89d7f12cd3034548805113f764b (diff) | |
download | kernel_samsung_smdk4412-7958a45310519811134a5b911d863201786978ab.zip kernel_samsung_smdk4412-7958a45310519811134a5b911d863201786978ab.tar.gz kernel_samsung_smdk4412-7958a45310519811134a5b911d863201786978ab.tar.bz2 |
gianfar: Do right check on num_txbdfree
This patch fixes a wrong check on num_txbdfree. It could lead to
num_txbdfree become nagative. Result was that the gianfar stops
sending data.
Changes from first version :
- removed a space between parens (David Millers comment)
- full email address in signed off line
Signed-off-by: Rini van Zetten <rini@arvoo.nl>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 9b12a13..9831b3f 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -1284,7 +1284,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) spin_lock_irqsave(&priv->txlock, flags); /* check if there is space to queue this packet */ - if (nr_frags > priv->num_txbdfree) { + if ((nr_frags+1) > priv->num_txbdfree) { /* no space, stop the queue */ netif_stop_queue(dev); dev->stats.tx_fifo_errors++; |