aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-02-25 11:59:19 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-02-25 11:59:19 +0000
commit30143b715c255b2f8c5b512b70503db7032934b2 (patch)
tree249536cf6c0794fab0801fd396762eecfdee3dc4 /target
parent6b37484883f15be3a9001520f908a23a7992d8bd (diff)
downloadupstream-30143b715c255b2f8c5b512b70503db7032934b2.tar.gz
upstream-30143b715c255b2f8c5b512b70503db7032934b2.tar.bz2
upstream-30143b715c255b2f8c5b512b70503db7032934b2.zip
ramips: raeth: don't process disabled interrupts
Also rename the 'fe_int' variable. SVN-Revision: 30713
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ramips/ramips_main.c16
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 01945872eb..86395f1bea 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;
}