From: Michael Ellerman <michael@ellerman.id.au>
To: Manu Abraham <abraham.manu@gmail.com>
Cc: Grant Grundler <grundler@parisc-linux.org>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: MSI messages
Date: Tue, 23 Dec 2008 09:29:50 +1100 [thread overview]
Message-ID: <1229984990.8503.1.camel@localhost> (raw)
In-Reply-To: <494FB2DF.9090504@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2851 bytes --]
On Mon, 2008-12-22 at 19:31 +0400, Manu Abraham wrote:
> Michael Ellerman wrote:
> > On Mon, 2008-12-22 at 02:56 +0400, Manu Abraham wrote:
> >> Michael Ellerman wrote:
> >>> On Sun, 2008-12-21 at 01:13 +0400, Manu Abraham wrote:
> >>>> Grant Grundler wrote:
> >>>>> On Sun, Dec 14, 2008 at 03:15:15PM +0400, Manu Abraham wrote:
> >>>>> ...
> >>>>>>> A "GSI" (Generic Sys Interrupt?) is associated with each entry in
> >>>>>>> the MSI-X table. Driver then calls request_irq() to bind an interrupt
> >>>>>>> handler to each GSI. So the driver never directly sees the "message".
> >>>>>> Oh, you mean the array of irq_handlers in the MSI-X table should
> >>>>>> correspond to a particular message ?
> >>>>> No. I mean each MSI-X entry has an address+message pair and each MSI-X entry
> >>>>> is associated with the parameters passed to each call of request_irq().
> >>>>> Pass in unique private data to each call of request_irq() and the driver
> >>>>> can determine which message was delivered when the ISR gets called.
> >>>>> (ISR == Interrupt Service Routine, aka driver IRQ handler)
> >>>> Is it possible that even when the config space says that multiple messages
> >>>> are supported, you cannot enable MSI-X ?
> >>> Yes, absolutely. Have a look at pci_msi_check_device() for starters. MSI
> >>> can be disabled globally, or per-device by a quirk, the bridges above
> >>> your device might not support MSI and the arch code may prevent
> >>> MSI/MSI-X for some reason (ie. platform doesn't support it).
> >>>
> >>> There's also a check in pci_enable_msix() to make sure the entries you
> >>> pass in are valid.
> >>>
> >>>> ------------- with MSI-X -------------
> >>>>
> >>>> saa716x_pci_init (0): found a NEMO reference board PCIe card
> >>>> ACPI: PCI Interrupt 0000:05:00.0[A] -> GSI 19 (level, low) -> IRQ 19
> >>>> PCI: Setting latency timer of device 0000:05:00.0 to 64
> >>>> saa716x_request_irq (0): Using MSI-X mode
> >>>> saa716x_enable_msix (0): MSI-X request failed
> >>> For starters you should print the error code returned by
> >>> pci_enable_msix() - unfortunately it returns EINVAL for many different
> >>> reasons, but it will narrow it down a bit.
> >> It does return -22
> >
> > If you're curious you could try this patch.
>
>
> There's a missing opening brace. I did add it and added more of kernel hacking
> for debugging and loaded the modules after that, which did cause a complete
> freeze of the machine.
Yeah sorry I didn't compile it. I don't see how it would have caused the
kernel to hang though.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-12-22 22:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-13 9:38 MSI messages Manu Abraham
2008-12-14 8:12 ` Grant Grundler
2008-12-14 11:15 ` Manu Abraham
2008-12-14 18:52 ` Grant Grundler
2008-12-20 21:13 ` Manu Abraham
2008-12-21 22:11 ` Michael Ellerman
2008-12-21 22:56 ` Manu Abraham
2008-12-21 23:22 ` Michael Ellerman
2008-12-22 15:31 ` Manu Abraham
2008-12-22 22:29 ` Michael Ellerman [this message]
2008-12-21 23:05 ` Manu Abraham
2008-12-15 5:08 ` Jike Song
2008-12-15 7:07 ` Kenji Kaneshige
2008-12-18 5:47 ` Grant Grundler
-- strict thread matches above, loose matches on Subject: below --
2008-12-13 9:34 Manu Abraham
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=1229984990.8503.1.camel@localhost \
--to=michael@ellerman.id.au \
--cc=abraham.manu@gmail.com \
--cc=grundler@parisc-linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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