From: Jeff Garzik <jeff@garzik.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Daniel Barkalow <barkalow@iabervon.org>,
linux-kernel@vger.kernel.org, David Miller <davem@davemloft.net>,
Roland Dreier <rdreier@cisco.com>,
Ayaz Abdulla <aabdulla@nvidia.com>
Subject: Re: [PATCH] Disable INTx when enabling MSI in forcedeth
Date: Tue, 21 Nov 2006 22:43:49 -0500 [thread overview]
Message-ID: <4563C775.8020004@garzik.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0611211839540.3338@woody.osdl.org>
[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]
Linus Torvalds wrote:
>
> On Tue, 21 Nov 2006, Daniel Barkalow wrote:
>> My nVidia ethernet card doesn't disable its own INTx when MSI is
>> enabled. This causes a steady stream of spurious interrupts that
>> eventually kills my SATA IRQ if MSI is used with forcedeth, which is
>> true by default. Simply disabling the INTx interrupt takes care of it.
>>
>> This is against -stable, and would be suitable once someone who knows the
>> code verifies that it's correct.
>
> I _really_ think that we should do this in pci_msi_enable().
>
> Screw cards that are not PCI-2.3 compliant - just make the rule be that if
> you use MSI, you _have_ to allow us to set the disable-INTx bit. It's then
> up to the drivers to decide if they can use MSI or not.
>
> (Even a number of cards that are not PCI-2.3 may simply not _implement_
> the disable-INTx bit, and in that case, they can use MSI if they disable
> INTx automatically - the ).
>
> Comments?
I agree. And it's just a simple matter of remove the PCI-Express
brackets AFAICS, like in the attached patch (untested).
Jeff
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 940 bytes --]
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 9fc9a34..c2828a3 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -255,10 +255,8 @@ static void enable_msi_mode(struct pci_d
pci_write_config_word(dev, msi_control_reg(pos), control);
dev->msix_enabled = 1;
}
- if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
- /* PCI Express Endpoint device detected */
- pci_intx(dev, 0); /* disable intx */
- }
+
+ pci_intx(dev, 0); /* disable intx */
}
void disable_msi_mode(struct pci_dev *dev, int pos, int type)
@@ -276,10 +274,8 @@ void disable_msi_mode(struct pci_dev *de
pci_write_config_word(dev, msi_control_reg(pos), control);
dev->msix_enabled = 0;
}
- if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
- /* PCI Express Endpoint device detected */
- pci_intx(dev, 1); /* enable intx */
- }
+
+ pci_intx(dev, 1); /* enable intx */
}
static int msi_lookup_irq(struct pci_dev *dev, int type)
next prev parent reply other threads:[~2006-11-22 3:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 2:28 [PATCH] Disable INTx when enabling MSI in forcedeth Daniel Barkalow
2006-11-22 2:42 ` Linus Torvalds
2006-11-22 2:53 ` Daniel Barkalow
2006-11-22 3:43 ` Jeff Garzik [this message]
2006-11-22 7:36 ` Yinghai Lu
2006-11-22 7:09 ` Benjamin Herrenschmidt
2006-12-01 1:16 ` Chris Wright
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=4563C775.8020004@garzik.org \
--to=jeff@garzik.org \
--cc=aabdulla@nvidia.com \
--cc=barkalow@iabervon.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=torvalds@osdl.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