aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSteve Glendinning <steve.glendinning@smsc.com>2009-01-29 20:29:15 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-29 20:29:15 -0500
commit1609559547ae0ddc2e4829c7f78ac2c4869875b9 (patch)
tree8f06404437dc425a8c611ea6d9be064892470c97 /drivers
parentb1c4a9dddf09fe99b8f88252718ac5b357363dc4 (diff)
smsc9420: fix interrupt signalling test failures
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/smsc9420.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c
index c14a4c6452c7..d801900a5036 100644
--- a/drivers/net/smsc9420.c
+++ b/drivers/net/smsc9420.c
@@ -1378,6 +1378,7 @@ static int smsc9420_open(struct net_device *dev)
1378 1378
1379 /* test the IRQ connection to the ISR */ 1379 /* test the IRQ connection to the ISR */
1380 smsc_dbg(IFUP, "Testing ISR using IRQ %d", dev->irq); 1380 smsc_dbg(IFUP, "Testing ISR using IRQ %d", dev->irq);
1381 pd->software_irq_signal = false;
1381 1382
1382 spin_lock_irqsave(&pd->int_lock, flags); 1383 spin_lock_irqsave(&pd->int_lock, flags);
1383 /* configure interrupt deassertion timer and enable interrupts */ 1384 /* configure interrupt deassertion timer and enable interrupts */
@@ -1393,8 +1394,6 @@ static int smsc9420_open(struct net_device *dev)
1393 smsc9420_pci_flush_write(pd); 1394 smsc9420_pci_flush_write(pd);
1394 1395
1395 timeout = 1000; 1396 timeout = 1000;
1396 pd->software_irq_signal = false;
1397 smp_wmb();
1398 while (timeout--) { 1397 while (timeout--) {
1399 if (pd->software_irq_signal) 1398 if (pd->software_irq_signal)
1400 break; 1399 break;