[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1425954907-30417-1-git-send-email-yongbae2@gmail.com>
Date: Tue, 10 Mar 2015 11:35:07 +0900
From: Yongbae Park <yongbae2@...il.com>
To: msink@...monline.ru
Cc: davem@...emloft.net, nicolas.ferre@...el.com, tklauser@...tanz.ch,
wsa@...-dreams.de, varkabhadram@...il.com, netdev@...r.kernel.org
Subject: [PATCH] net: WIZnet drivers: enable interrupts after napi_complete()
The interrupt is enabled before napi_complete(). A network timeout
occurs if the interrupt handler is called before napi_complete().
Fix the bug by enabling the interrupt after napi_complete().
Signed-off-by: Yongbae Park <yongbae2@...il.com>
---
drivers/net/ethernet/wiznet/w5100.c | 4 ++--
drivers/net/ethernet/wiznet/w5300.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
index a495931..43daa6a 100644
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
@@ -498,9 +498,9 @@ static int w5100_napi_poll(struct napi_struct *napi, int budget)
}
if (rx_count < budget) {
- w5100_write(priv, W5100_IMR, IR_S0);
- mmiowb();
napi_complete(napi);
+ w5100_write(priv, W5100_IMR, IR_S0);
+ mmiowb();
}
return rx_count;
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
index 09322d9..4b31000 100644
--- a/drivers/net/ethernet/wiznet/w5300.c
+++ b/drivers/net/ethernet/wiznet/w5300.c
@@ -418,9 +418,9 @@ static int w5300_napi_poll(struct napi_struct *napi, int budget)
}
if (rx_count < budget) {
+ napi_complete(napi);
w5300_write(priv, W5300_IMR, IR_S0);
mmiowb();
- napi_complete(napi);
}
return rx_count;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists