aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/arm
diff options
context:
space:
mode:
authorzeal <zealcook@gmail.com>2009-11-16 04:58:09 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-16 23:51:47 -0800
commitfa6cae143d58c74d800b8dbdd8b9f058614874f2 (patch)
tree1c6fe4587fb192ceef6b47ad2ea650a7b1aef732 /drivers/net/arm
parent3fd434d846a2c87f8f705b6876f81e4053f93749 (diff)
KS8695: fix ks8695_rx_irq() bug.
ks8695 rx irq is edge-level. Before arriving at irq handler, the corresponding status bit has been clear(irq's ack). So we should not check it after that. Signed-off-by: zeal <zealcook@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/arm')
-rw-r--r--drivers/net/arm/ks8695net.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c
index 0073d198715..e15451a8510 100644
--- a/drivers/net/arm/ks8695net.c
+++ b/drivers/net/arm/ks8695net.c
@@ -433,24 +433,16 @@ ks8695_rx_irq(int irq, void *dev_id)
{
struct net_device *ndev = (struct net_device *)dev_id;
struct ks8695_priv *ksp = netdev_priv(ndev);
- unsigned long status;
-
- unsigned long mask_bit = 1 << ks8695_get_rx_enable_bit(ksp);
spin_lock(&ksp->rx_lock);
- status = readl(KS8695_IRQ_VA + KS8695_INTST);
-
- /*clean rx status bit*/
- writel(status | mask_bit , KS8695_IRQ_VA + KS8695_INTST);
-
- if (status & mask_bit) {
- if (napi_schedule_prep(&ksp->napi)) {
- /*disable rx interrupt*/
- status &= ~mask_bit;
- writel(status , KS8695_IRQ_VA + KS8695_INTEN);
- __napi_schedule(&ksp->napi);
- }
+ if (napi_schedule_prep(&ksp->napi)) {
+ unsigned long status = readl(KS8695_IRQ_VA + KS8695_INTEN);
+ unsigned long mask_bit = 1 << ks8695_get_rx_enable_bit(ksp);
+ /*disable rx interrupt*/
+ status &= ~mask_bit;
+ writel(status , KS8695_IRQ_VA + KS8695_INTEN);
+ __napi_schedule(&ksp->napi);
}
spin_unlock(&ksp->rx_lock);