From: Rajesh Shah <rajesh.shah@intel.com>
To: Ravinandan Arakali <Ravinandan.Arakali@neterion.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
leonid.grossman@neterion.com, ananda.raju@neterion.com,
rapuru.sriram@neterion.com
Subject: Re: [PATCH 2.6.16.18] MSI: Proposed fix for MSI/MSI-X load failure
Date: Fri, 2 Jun 2006 14:55:13 -0700 [thread overview]
Message-ID: <20060602145512.A13024@unix-os.sc.intel.com> (raw)
In-Reply-To: <Pine.GSO.4.10.10606021518500.9289-100000@guinness>; from Ravinandan.Arakali@neterion.com on Fri, Jun 02, 2006 at 03:21:37PM -0400
On Fri, Jun 02, 2006 at 03:21:37PM -0400, Ravinandan Arakali wrote:
>
> Symptoms:
> When a driver is loaded with MSI followed by MSI-X, the load fails indicating
> that the MSI vector is still active. And vice versa.
>
> Suspected rootcause:
> This happens inspite of driver calling free_irq() followed by
> pci_disable_msi/pci_disable_msix. This appears to be a kernel bug
> wherein the pci_disable_msi and pci_disable_msix calls do not
> clear/unpopulate the msi_desc data structure that was populated
> by pci_enable_msi/pci_enable_msix.
>
The current MSI code actually does this deliberately, not by
accident. It's got a lot of complex code to track devices and
vectors and make sure an enable_msi -> disable -> enable sequence
gives a driver the same vector. It also has policies about
reserving vectors based on potential hotplug activity etc.
Frankly, I've never understood the need for such policies, and
am in the process of removing all of them.
> Proposed fix:
> Free the MSI vector in pci_disable_msi and all allocated MSI-X vectors
> in pci_disable_msix.
>
This will break the existing MSI policies. Once you take that away,
a whole lot of additional code and complexity can be removed too.
That's what I'm working on right now, but such a change is likely
too big for -stable.
So, I'm ok with this patch if it actually doesn't break MSI/MSI-X.
Did you try to repeatedly load/unload an MSI capable driver with
this patch? Did you repeatedly try to ifdown/ifup an Ethernet
driver that uses MSI? I'm not in a position to test this today, but
will try it out next week.
thanks,
Rajesh
next prev parent reply other threads:[~2006-06-02 21:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-02 19:21 [PATCH 2.6.16.18] MSI: Proposed fix for MSI/MSI-X load failure Ravinandan Arakali
2006-06-02 21:55 ` Rajesh Shah [this message]
2006-06-03 2:09 ` Paul Mackerras
-- strict thread matches above, loose matches on Subject: below --
2006-06-02 22:05 Ravinandan Arakali
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=20060602145512.A13024@unix-os.sc.intel.com \
--to=rajesh.shah@intel.com \
--cc=Ravinandan.Arakali@neterion.com \
--cc=ananda.raju@neterion.com \
--cc=leonid.grossman@neterion.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rapuru.sriram@neterion.com \
/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