summaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorshemminger@osdl.org <shemminger@osdl.org>2006-08-28 10:00:48 -0700
committerJeff Garzik <jeff@garzik.org>2006-08-29 17:18:30 -0400
commitbb507fe11ffda19eee158ce0be42d222135b7aca (patch)
treec31b9bcd880dd4f214ec705e9a4cbaefa95e63f9 /drivers/net/sky2.c
parent97bda706b475655088201d7bb96cb8dd6d0d1aa3 (diff)
downloadop-kernel-dev-bb507fe11ffda19eee158ce0be42d222135b7aca.zip
op-kernel-dev-bb507fe11ffda19eee158ce0be42d222135b7aca.tar.gz
[PATCH] 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: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 6cc5696..2a2adc2 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3189,6 +3189,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, IRQF_SHARED, DRV_NAME, hw);
@@ -3198,10 +3200,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);
OpenPOWER on IntegriCloud