From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: stable@kernel.org, netdev@vger.kernel.org
Subject: [PATCH 4/6] sky2: MSI test timing
Date: Wed, 06 Sep 2006 10:17:56 -0700 [thread overview]
Message-ID: <20060906171921.612595000@localhost.localdomain> (raw)
In-Reply-To: 20060906171752.781595000@localhost.localdomain
[-- Attachment #1: sky2-post-bug.patch --]
[-- Type: text/plain, Size: 881 bytes --]
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>
--- linux-2.6.17.11.orig/drivers/net/sky2.c
+++ linux-2.6.17.11/drivers/net/sky2.c
@@ -3184,6 +3184,8 @@ static int __devinit sky2_test_msi(struc
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(struc
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);
--
Stephen Hemminger <shemminger@osdl.org>
next prev parent reply other threads:[~2006-09-06 18:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-06 17:17 [PATCH 0/6] sky2 important fixes backport Stephen Hemminger
2006-09-06 17:17 ` [PATCH 1/6] sky2: accept flow control Stephen Hemminger
2006-09-06 17:17 ` [PATCH 2/6] sky2: clear status IRQ after empty Stephen Hemminger
2006-09-06 17:17 ` [PATCH 3/6] sky2: use dev_alloc_skb for receive buffers Stephen Hemminger
2006-09-06 17:17 ` Stephen Hemminger [this message]
2006-09-06 17:17 ` [PATCH 5/6] sky2: fix fiber support Stephen Hemminger
2006-09-06 17:17 ` [PATCH 6/6] sky2: version 1.6.1 Stephen Hemminger
2006-09-06 21:19 ` [stable] [PATCH 0/6] sky2 important fixes backport Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060906171921.612595000@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).