netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] smsc9420: fix interrupt signalling test failures
@ 2009-01-29 16:39 Steve Glendinning
  2009-01-29 16:39 ` [PATCH 1/1] " Steve Glendinning
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Glendinning @ 2009-01-29 16:39 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Ian Saturley, Steve Glendinning

Hi David,

One important driver fix for you, please apply to 2.6.29 as the driver 
will fail to initialise on some platforms without it.

I'm amazed this test ever passed, I guess it's because I'm on a fast
SMP machine which managed to beat the race.

Steve Glendinning (1):
  smsc9420: fix interrupt signalling test failures

 drivers/net/smsc9420.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] smsc9420: fix interrupt signalling test failures
  2009-01-29 16:39 [PATCH 0/1] smsc9420: fix interrupt signalling test failures Steve Glendinning
@ 2009-01-29 16:39 ` Steve Glendinning
  2009-01-30  1:29   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Glendinning @ 2009-01-29 16:39 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Ian Saturley, Steve Glendinning

smsc9420 performs an interrupt signalling test when the interface is
brought up.  The current code mistakenly sets its test flag to false
AFTER enabling the software interrupt source, making failure quite
likely.

This patch changes the code to set the test flag BEFORE enabling
interrupts. I've also removed an smp_wmb because the following spinlock
provides an implicit memory barrier.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
 drivers/net/smsc9420.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c
index c14a4c6..d801900 100644
--- a/drivers/net/smsc9420.c
+++ b/drivers/net/smsc9420.c
@@ -1378,6 +1378,7 @@ static int smsc9420_open(struct net_device *dev)
 
 	/* test the IRQ connection to the ISR */
 	smsc_dbg(IFUP, "Testing ISR using IRQ %d", dev->irq);
+	pd->software_irq_signal = false;
 
 	spin_lock_irqsave(&pd->int_lock, flags);
 	/* configure interrupt deassertion timer and enable interrupts */
@@ -1393,8 +1394,6 @@ static int smsc9420_open(struct net_device *dev)
 	smsc9420_pci_flush_write(pd);
 
 	timeout = 1000;
-	pd->software_irq_signal = false;
-	smp_wmb();
 	while (timeout--) {
 		if (pd->software_irq_signal)
 			break;
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] smsc9420: fix interrupt signalling test failures
  2009-01-29 16:39 ` [PATCH 1/1] " Steve Glendinning
@ 2009-01-30  1:29   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-01-30  1:29 UTC (permalink / raw)
  To: steve.glendinning; +Cc: netdev, ian.saturley

From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Thu, 29 Jan 2009 16:39:23 +0000

> smsc9420 performs an interrupt signalling test when the interface is
> brought up.  The current code mistakenly sets its test flag to false
> AFTER enabling the software interrupt source, making failure quite
> likely.
> 
> This patch changes the code to set the test flag BEFORE enabling
> interrupts. I've also removed an smp_wmb because the following spinlock
> provides an implicit memory barrier.
> 
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>

Applied, thanks Steve.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-30  1:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29 16:39 [PATCH 0/1] smsc9420: fix interrupt signalling test failures Steve Glendinning
2009-01-29 16:39 ` [PATCH 1/1] " Steve Glendinning
2009-01-30  1:29   ` 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).