summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasaru Nagai <masaru.nagai.vx@renesas.com>2015-11-13 11:24:49 +0100
committerDavid S. Miller <davem@davemloft.net>2015-11-16 20:44:32 +0100
commit2452cb0c6503f05ab371b26c3216c5fba54d4476 (patch)
treebec6ce7536a6b6bf20e51e367739bfeac598ad48
parentnet: smsc911x: Reset PHY during initialization (diff)
downloadlinux-2452cb0c6503f05ab371b26c3216c5fba54d4476.tar.xz
linux-2452cb0c6503f05ab371b26c3216c5fba54d4476.zip
ravb: Fix int mask value overwritten issue
When RX/TX interrupt for Network Control queue and Best Effort queue is issued at the same time, the interrupt mask of Network Control queue will be reset when the mask of Best Effort queue is set. This patch fixes this problem. Signed-off-by: Masaru Nagai <masaru.nagai.vx@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/renesas/ravb_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index aa7b2083cb53..7180e26f5c67 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -733,8 +733,10 @@ static irqreturn_t ravb_interrupt(int irq, void *dev_id)
((tis & tic) & BIT(q))) {
if (napi_schedule_prep(&priv->napi[q])) {
/* Mask RX and TX interrupts */
- ravb_write(ndev, ric0 & ~BIT(q), RIC0);
- ravb_write(ndev, tic & ~BIT(q), TIC);
+ ric0 &= ~BIT(q);
+ tic &= ~BIT(q);
+ ravb_write(ndev, ric0, RIC0);
+ ravb_write(ndev, tic, TIC);
__napi_schedule(&priv->napi[q]);
} else {
netdev_warn(ndev,