mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@mellanox.co.il>
To: Brice Goglin <brice@myri.com>
Cc: Greg KH <gregkh@suse.de>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: AMD 8131 MSI quirk called too late, bus_flags not inherited ?
Date: Sun, 21 May 2006 16:10:25 +0300	[thread overview]
Message-ID: <20060521131025.GR30211@mellanox.co.il> (raw)
In-Reply-To: <44705DA4.2020807@myri.com>

Quoting r. Brice Goglin <brice@myri.com>:
> Subject: Re: AMD 8131 MSI quirk called too late, bus_flags not inherited ?
> 
> Michael S. Tsirkin wrote:
> > MSI is an optional feature so things are supposed to work even without MSI -
> > are you getting that great a benefit from MSI?
> >   
> 
> Not great, I would say small.

Me too.

> > All mellanox PCI-X devices have a bridge inside them, so ...
> >   
> 
> Ok so you really need something for 2.6.17. What about the attached
> patch to fix the fact that bus flags are not inherited ?
> 
> Signed-off-by: Brice Goglin <brice@myri.com>

Seems to work for MSI but not for MSI-X. With MSI-X, I still see:

ib_mthca 0000:04:00.0: NOP command failed to generate interrupt (IRQ 217),
aborting.
ib_mthca 0000:04:00.0: Try again with MSI/MSI-X disabled.


> > Doesn't seem to work for me:
> >
> > ib_mthca: Initializing 0000:04:00.0
> > GSI 18 sharing vector 0xB9 and IRQ 18
> > ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 29 (level, low) -> IRQ 185
> > ib_mthca 0000:04:00.0: NOP command failed to generate interrupt (IRQ 217),
> > aborting.
> > ib_mthca 0000:04:00.0: Try again with MSI/MSI-X disabled.
> > ACPI: PCI interrupt for device 0000:04:00.0 disabled
> > ib_mthca: probe of 0000:04:00.0 failed with error -16
> >   
> 
> Ok. Do you at least see the quirk message ?

Yes.

> Thanks,
> Brice
> 
> 
> Index: linux-mm/drivers/pci/msi.c
> ===================================================================
> --- linux-mm.orig/drivers/pci/msi.c	2006-05-21 14:25:53.000000000 +0200
> +++ linux-mm/drivers/pci/msi.c	2006-05-21 14:26:56.000000000 +0200
> @@ -916,6 +916,7 @@
>   **/
>  int pci_enable_msi(struct pci_dev* dev)
>  {
> +	struct pci_bus *bus;
>  	int pos, temp, status = -EINVAL;
>  	u16 control;
>  
> @@ -925,8 +926,9 @@
>  	if (dev->no_msi)
>  		return status;
>  
> -	if (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
> -		return -EINVAL;
> +	for (bus = dev->bus; bus; bus = bus->parent)
> +		if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
> +			return -EINVAL;
>  
>  	temp = dev->irq;
>  
> 
> 

It seems we must add this loop to pci_enable_msix as well.

-- 
MST

  reply	other threads:[~2006-05-21 13:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-15 21:11 Brice Goglin
2006-05-18 15:54 ` Greg KH
2006-05-21 10:16   ` Michael S. Tsirkin
2006-05-21 10:58     ` Brice Goglin
2006-05-21 12:17       ` Michael S. Tsirkin
2006-05-21 12:31         ` Brice Goglin
2006-05-21 13:10           ` Michael S. Tsirkin [this message]
2006-05-21 13:24             ` Brice Goglin
2006-05-23  4:19               ` Greg KH
2006-05-23  7:05                 ` Brice Goglin
2006-05-24 16:59                 ` Michael S. Tsirkin
2006-05-24 17:05                   ` Rajesh Shah
2006-05-21 13:29           ` Michael S. Tsirkin
     [not found] <fa.WOQy7TVxeMkzxI+BbQP2Wqi34A0@ifi.uio.no>
     [not found] ` <fa.7RUPmW8q906KfAmuRItEvwbAUvg@ifi.uio.no>
2006-05-21 19:19   ` Dave Olson
     [not found] <fa.qrx8XYAhsFvMnCfipnnEkuNPFSA@ifi.uio.no>
     [not found] ` <fa.hVNDQ4A/sPeiQKqlsb6JDQFEpLE@ifi.uio.no>
2006-05-23  7:32   ` Dave Olson

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=20060521131025.GR30211@mellanox.co.il \
    --to=mst@mellanox.co.il \
    --cc=brice@myri.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®