* [PATCH] ehea: fix losing of NEQ events when one event occurred early
@ 2012-05-10 0:10 Thadeu Lima de Souza Cascardo
2012-05-10 0:29 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-05-10 0:10 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Thadeu Lima de Souza Cascardo
The NEQ interrupt is only triggered when there was no previous pending
interrupt. If we request irq handling after an interrupt has occurred,
we will never get an interrupt until we call H_RESET_EVENTS.
Events seem to be cleared when we first register the NEQ. So, when we
requested irq handling right after registering it, a possible race with
an interrupt was much less likely. Now, there is a chance we may lose
this race and never get any events.
The fix here is to poll and acknowledge any events that might have
happened right after registering the irq handler.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ehea/ehea_main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index c9069a2..f088e59 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -3335,6 +3335,9 @@ static int __devinit ehea_probe_adapter(struct platform_device *dev,
goto out_shutdown_ports;
}
+ /* Handle any events that might be pending. */
+ tasklet_hi_schedule(&adapter->neq_tasklet);
+
ret = 0;
goto out;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ehea: fix losing of NEQ events when one event occurred early
2012-05-10 0:10 [PATCH] ehea: fix losing of NEQ events when one event occurred early Thadeu Lima de Souza Cascardo
@ 2012-05-10 0:29 ` David Miller
2012-05-10 14:00 ` Thadeu Lima de Souza Cascardo
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2012-05-10 0:29 UTC (permalink / raw)
To: cascardo; +Cc: netdev
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Wed, 9 May 2012 21:10:18 -0300
> + /* Handle any events that might be pending. */
> + tasklet_hi_schedule(&adapter->neq_tasklet);
> +
>
> ret = 0;
These extra empty lines are completely unnecessary, please remove
them.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ehea: fix losing of NEQ events when one event occurred early
2012-05-10 0:29 ` David Miller
@ 2012-05-10 14:00 ` Thadeu Lima de Souza Cascardo
2012-05-11 2:46 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2012-05-10 14:00 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Thadeu Lima de Souza Cascardo
The NEQ interrupt is only triggered when there was no previous pending
interrupt. If we request irq handling after an interrupt has occurred,
we will never get an interrupt until we call H_RESET_EVENTS.
Events seem to be cleared when we first register the NEQ. So, when we
requested irq handling right after registering it, a possible race with
an interrupt was much less likely. Now, there is a chance we may lose
this race and never get any events.
The fix here is to poll and acknowledge any events that might have
happened right after registering the irq handler.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index c9069a2..f4d2da0 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -3335,6 +3335,8 @@ static int __devinit ehea_probe_adapter(struct platform_device *dev,
goto out_shutdown_ports;
}
+ /* Handle any events that might be pending. */
+ tasklet_hi_schedule(&adapter->neq_tasklet);
ret = 0;
goto out;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ehea: fix losing of NEQ events when one event occurred early
2012-05-10 14:00 ` Thadeu Lima de Souza Cascardo
@ 2012-05-11 2:46 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-05-11 2:46 UTC (permalink / raw)
To: cascardo; +Cc: netdev
From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Thu, 10 May 2012 11:00:53 -0300
> The NEQ interrupt is only triggered when there was no previous pending
> interrupt. If we request irq handling after an interrupt has occurred,
> we will never get an interrupt until we call H_RESET_EVENTS.
>
> Events seem to be cleared when we first register the NEQ. So, when we
> requested irq handling right after registering it, a possible race with
> an interrupt was much less likely. Now, there is a chance we may lose
> this race and never get any events.
>
> The fix here is to poll and acknowledge any events that might have
> happened right after registering the irq handler.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-11 2:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 0:10 [PATCH] ehea: fix losing of NEQ events when one event occurred early Thadeu Lima de Souza Cascardo
2012-05-10 0:29 ` David Miller
2012-05-10 14:00 ` Thadeu Lima de Souza Cascardo
2012-05-11 2:46 ` 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).