diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-02-26 10:54:13 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-02-26 10:54:13 +0000 |
commit | 990c8a3efaf81a5967b0af9dd5583fdc102e71ea (patch) | |
tree | 8ea350fc62d0f52c10b019c9613e59b47459f447 /target | |
parent | d2cd4c0438fde7b9bb8a8b2b9db06f7fd81562b8 (diff) | |
download | master-187ad058-990c8a3efaf81a5967b0af9dd5583fdc102e71ea.tar.gz master-187ad058-990c8a3efaf81a5967b0af9dd5583fdc102e71ea.tar.bz2 master-187ad058-990c8a3efaf81a5967b0af9dd5583fdc102e71ea.zip |
ramips: don't read RAMIPS_RX_CALC_IDX0 register in the loop
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30733 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c b/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c index 60001e3bc1..beceb9441e 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c @@ -717,13 +717,15 @@ ramips_eth_rx_hw(unsigned long ptr) int rx; int max_rx = 16; + rx = ramips_fe_rr(RAMIPS_RX_CALC_IDX0); + while (max_rx) { struct raeth_rx_info *rxi; struct ramips_rx_dma *rxd; struct sk_buff *rx_skb, *new_skb; int pktlen; - rx = (ramips_fe_rr(RAMIPS_RX_CALC_IDX0) + 1) % NUM_RX_DESC; + rx = (rx + 1) % NUM_RX_DESC; rxi = &re->rx_info[rx]; rxd = rxi->rx_desc; |