aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-01-01 11:11:50 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-01-01 11:11:50 +0000
commit895947ea07b0842e34e1b994fcafd0f89af93cb9 (patch)
treef5962cd9d54b5787570b78542e46601ba28dcc8d
parent3b39878e3c63d1d34440d134019b215194b6b09b (diff)
downloadupstream-895947ea07b0842e34e1b994fcafd0f89af93cb9.tar.gz
upstream-895947ea07b0842e34e1b994fcafd0f89af93cb9.tar.bz2
upstream-895947ea07b0842e34e1b994fcafd0f89af93cb9.zip
[adm5120] disable queue of all interfaces when tx ring is full
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10073 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/adm5120/files/drivers/net/adm5120sw.c8
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;