diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-01-01 11:11:50 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-01-01 11:11:50 +0000 |
commit | f6f43b9d40531a24a0391ad9d44d757a48446624 (patch) | |
tree | dd28843b58293de53961b65fff5a1875ff769079 /target/linux/adm5120 | |
parent | beb32bfbbc9310c91b6aad716288f29798b38f3c (diff) | |
download | upstream-f6f43b9d40531a24a0391ad9d44d757a48446624.tar.gz upstream-f6f43b9d40531a24a0391ad9d44d757a48446624.tar.bz2 upstream-f6f43b9d40531a24a0391ad9d44d757a48446624.zip |
disable queue of all interfaces when tx ring is full
SVN-Revision: 10073
Diffstat (limited to 'target/linux/adm5120')
-rw-r--r-- | target/linux/adm5120/files/drivers/net/adm5120sw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/target/linux/adm5120/files/drivers/net/adm5120sw.c b/target/linux/adm5120/files/drivers/net/adm5120sw.c index c8c3f1d5b2..234b6c5146 100644 --- a/target/linux/adm5120/files/drivers/net/adm5120sw.c +++ b/target/linux/adm5120/files/drivers/net/adm5120sw.c @@ -843,6 +843,7 @@ static int adm5120_if_hard_start_xmit(struct sk_buff *skb, struct adm5120_if_priv *priv = netdev_priv(dev); unsigned int entry; unsigned long data; + int i; /* lock switch irq */ spin_lock_irq(&tx_lock); @@ -875,8 +876,11 @@ static int adm5120_if_hard_start_xmit(struct sk_buff *skb, cur_txl++; if (cur_txl == dirty_txl + TX_QUEUE_LEN) { - /* FIXME: stop queue for all devices */ - netif_stop_queue(dev); + for (i = 0; i < SWITCH_NUM_PORTS; i++) { + if (!adm5120_devs[i]) + continue; + netif_stop_queue(dev); + } } dev->trans_start = jiffies; |