cns3xxx: ethernet - clean the tx ring before refilling the rx ring to reduce memory pressure

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35953 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2013-03-11 02:29:53 +00:00
parent 4b1c2fb15f
commit df755284d9
1 changed files with 4 additions and 4 deletions

View File

@ -718,6 +718,10 @@ static int eth_poll(struct napi_struct *napi, int budget)
enable_irq(IRQ_CNS3XXX_SW_R0RXC);
}
spin_lock_bh(&tx_lock);
eth_complete_tx(sw);
spin_unlock_bh(&tx_lock);
cns3xxx_alloc_rx_buf(sw, received);
rx_ring->cur_index = i;
@ -725,10 +729,6 @@ static int eth_poll(struct napi_struct *napi, int budget)
wmb();
enable_rx_dma(sw);
spin_lock_bh(&tx_lock);
eth_complete_tx(sw);
spin_unlock_bh(&tx_lock);
return received;
}