mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-19 03:06:35 +00:00
cns3xxx: ethernet - clean the tx ring before refilling the rx ring to reduce memory pressure
SVN-Revision: 35953
This commit is contained in:
parent
d7a529709a
commit
bd6c9d6252
@ -718,6 +718,10 @@ static int eth_poll(struct napi_struct *napi, int budget)
|
|||||||
enable_irq(IRQ_CNS3XXX_SW_R0RXC);
|
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);
|
cns3xxx_alloc_rx_buf(sw, received);
|
||||||
|
|
||||||
rx_ring->cur_index = i;
|
rx_ring->cur_index = i;
|
||||||
@ -725,10 +729,6 @@ static int eth_poll(struct napi_struct *napi, int budget)
|
|||||||
wmb();
|
wmb();
|
||||||
enable_rx_dma(sw);
|
enable_rx_dma(sw);
|
||||||
|
|
||||||
spin_lock_bh(&tx_lock);
|
|
||||||
eth_complete_tx(sw);
|
|
||||||
spin_unlock_bh(&tx_lock);
|
|
||||||
|
|
||||||
return received;
|
return received;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user