* [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi
@ 2013-10-13 19:17 Markus Pargmann
2013-10-14 11:48 ` Peter Korsgaard
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Markus Pargmann @ 2013-10-13 19:17 UTC (permalink / raw)
To: David S. Miller
Cc: Florian Fainelli, Mugunthan V N, Peter Korsgaard,
linux-arm-kernel, netdev, kernel, Markus Pargmann
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@pengutronix.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi
2013-10-13 19:17 [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi Markus Pargmann
@ 2013-10-14 11:48 ` Peter Korsgaard
2013-10-16 12:58 ` Mugunthan V N
2013-10-17 19:48 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2013-10-14 11:48 UTC (permalink / raw)
To: Markus Pargmann
Cc: David S. Miller, Florian Fainelli, Mugunthan V N,
linux-arm-kernel, netdev, kernel
>>>>> "Markus" == Markus Pargmann <mpa@pengutronix.de> writes:
Markus> If interrupts happen before napi_enable was called, the driver will not
Markus> work as expected. Network transmissions are impossible in this state.
Markus> This bug can be reproduced easily by restarting the network interface in
Markus> a loop. After some time any network transmissions on the network
Markus> interface will fail.
Markus> This patch fixes the bug by enabling napi before enabling the network
Markus> interface interrupts.
Markus> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi
2013-10-13 19:17 [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi Markus Pargmann
2013-10-14 11:48 ` Peter Korsgaard
@ 2013-10-16 12:58 ` Mugunthan V N
2013-10-17 19:48 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Mugunthan V N @ 2013-10-16 12:58 UTC (permalink / raw)
To: Markus Pargmann, David S. Miller
Cc: kernel, netdev, Peter Korsgaard, Florian Fainelli,
linux-arm-kernel
On Monday 14 October 2013 12:47 AM, Markus Pargmann wrote:
> 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@pengutronix.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Regards
Mugunthan V N
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi
2013-10-13 19:17 [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi Markus Pargmann
2013-10-14 11:48 ` Peter Korsgaard
2013-10-16 12:58 ` Mugunthan V N
@ 2013-10-17 19:48 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-10-17 19:48 UTC (permalink / raw)
To: mpa; +Cc: florian, mugunthanvnm, peter, linux-arm-kernel, netdev, kernel
From: Markus Pargmann <mpa@pengutronix.de>
Date: Sun, 13 Oct 2013 21:17:01 +0200
> 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@pengutronix.de>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-17 19:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-13 19:17 [PATCH] net/ethernet: cpsw: Bugfix interrupts before enabling napi Markus Pargmann
2013-10-14 11:48 ` Peter Korsgaard
2013-10-16 12:58 ` Mugunthan V N
2013-10-17 19:48 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).