[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1381691821-25498-1-git-send-email-mpa@pengutronix.de>
Date: Sun, 13 Oct 2013 21:17:01 +0200
From: Markus Pargmann <mpa@...gutronix.de>
To: "David S. Miller" <davem@...emloft.net>
Cc: Florian Fainelli <florian@...nwrt.org>,
Mugunthan V N <mugunthanvnm@...com>,
Peter Korsgaard <peter@...sgaard.com>,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
kernel@...gutronix.de, Markus Pargmann <mpa@...gutronix.de>
Subject: [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi
If interrupts happen before napi_enable was called, the driver will not
work as expected. Network transmissions are impossible in this state.
This bug can be reproduced easily by restarting the network interface in
a loop. After some time any network transmissions on the network
interface will fail.
This patch fixes the bug by enabling napi before enabling the network
interface interrupts.
Signed-off-by: Markus Pargmann <mpa@...gutronix.de>
---
drivers/net/ethernet/ti/cpsw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 804846e..fccd9d4 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1169,9 +1169,9 @@ static int cpsw_ndo_open(struct net_device *ndev)
}
}
+ napi_enable(&priv->napi);
cpdma_ctlr_start(priv->dma);
cpsw_intr_enable(priv);
- napi_enable(&priv->napi);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX);
--
1.8.4.rc3
--
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