diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-02-25 11:59:19 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-02-25 11:59:19 +0000 |
commit | b83545fa99e406ba085ad22593bb23d91e52f933 (patch) | |
tree | 99810ab094ef0a498b8b5c112e8683f41241cd0e /target/linux | |
parent | ebeffb64e9a53c0146857d500ff27eb2be4d5901 (diff) |
ramips: raeth: don't process disabled interrupts
Also rename the 'fe_int' variable.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30713 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c | 16 |
1 files changed, 11 insertions, 5 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 01945872e..86395f1be 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 @@ -755,21 +755,27 @@ static irqreturn_t ramips_eth_irq(int irq, void *dev) { struct raeth_priv *re = netdev_priv(dev); - unsigned long fe_int = ramips_fe_rr(RAMIPS_FE_INT_STATUS); + unsigned int status; - ramips_fe_wr(0xFFFFFFFF, RAMIPS_FE_INT_STATUS); + status = ramips_fe_rr(RAMIPS_FE_INT_STATUS); + status &= ramips_fe_rr(RAMIPS_FE_INT_ENABLE); - if (fe_int & RAMIPS_RX_DLY_INT) { + if (!status) + return IRQ_NONE; + + ramips_fe_wr(status, RAMIPS_FE_INT_STATUS); + + if (status & RAMIPS_RX_DLY_INT) { ramips_fe_int_disable(RAMIPS_RX_DLY_INT); tasklet_schedule(&re->rx_tasklet); } - if (fe_int & RAMIPS_TX_DLY_INT) { + if (status & RAMIPS_TX_DLY_INT) { ramips_fe_int_disable(RAMIPS_TX_DLY_INT); tasklet_schedule(&re->tx_housekeeping_tasklet); } - raeth_debugfs_update_int_stats(re, fe_int); + raeth_debugfs_update_int_stats(re, status); return IRQ_HANDLED; } |