Home Home > GIT Browse
diff options
authorStephen Hemminger <shemminger@osdl.org>2006-09-06 10:17:56 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-08 14:51:40 -0700
commit3489a9e868343cb4c49a8bea541c324ae50366bc (patch)
parentf117ca328f2de3ca2db90d5775031152fe0c2496 (diff)
sky2: MSI test timing
The test for MSI IRQ could have timing issues. The PCI write needs to be pushed out before waiting, and the wait queue should be initialized before the IRQ. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 8a141b20f1b2..52253a835888 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3184,6 +3184,8 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
struct pci_dev *pdev = hw->pdev;
int err;
+ init_waitqueue_head (&hw->msi_wait);
sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
err = request_irq(pdev->irq, sky2_test_intr, SA_SHIRQ, DRV_NAME, hw);
@@ -3193,10 +3195,8 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
return err;
- init_waitqueue_head (&hw->msi_wait);
sky2_write8(hw, B0_CTST, CS_ST_SW_IRQ);
- wmb();
+ sky2_read8(hw, B0_CTST);
wait_event_timeout(hw->msi_wait, hw->msi_detected, HZ/10);