mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-07 00:01:56 +02:00
[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
This commit is contained in:
parent
9bab732e67
commit
b1ff7c57dd
@ -843,6 +843,7 @@ static int adm5120_if_hard_start_xmit(struct sk_buff *skb,
|
|||||||
struct adm5120_if_priv *priv = netdev_priv(dev);
|
struct adm5120_if_priv *priv = netdev_priv(dev);
|
||||||
unsigned int entry;
|
unsigned int entry;
|
||||||
unsigned long data;
|
unsigned long data;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* lock switch irq */
|
/* lock switch irq */
|
||||||
spin_lock_irq(&tx_lock);
|
spin_lock_irq(&tx_lock);
|
||||||
@ -875,8 +876,11 @@ static int adm5120_if_hard_start_xmit(struct sk_buff *skb,
|
|||||||
|
|
||||||
cur_txl++;
|
cur_txl++;
|
||||||
if (cur_txl == dirty_txl + TX_QUEUE_LEN) {
|
if (cur_txl == dirty_txl + TX_QUEUE_LEN) {
|
||||||
/* FIXME: stop queue for all devices */
|
for (i = 0; i < SWITCH_NUM_PORTS; i++) {
|
||||||
netif_stop_queue(dev);
|
if (!adm5120_devs[i])
|
||||||
|
continue;
|
||||||
|
netif_stop_queue(dev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->trans_start = jiffies;
|
dev->trans_start = jiffies;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user