public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brice Goglin <Brice.Goglin@ens-lyon.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	Jay Cliburn <jacliburn@bellsouth.net>,
	Grzegorz Krzystek <ninex@NineX.eu.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <ak@suse.de>,
	ninex@o2.pl, linux-kernel@vger.kernel.org,
	linux-pci@atrey.karlin.mff.cuni.cz,
	Michael Ellerman <michael@ellerman.id.au>,
	David Miller <davem@davemloft.net>,
	Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH 1/2] msi: Invert the sense of the MSI enables.
Date: Fri, 25 May 2007 23:47:03 +0200	[thread overview]
Message-ID: <46575957.8080905@ens-lyon.org> (raw)
In-Reply-To: <m1veehcz7m.fsf_-_@ebiederm.dsl.xmission.com>

Eric W. Biederman wrote:
> @@ -1677,43 +1650,16 @@ static int __devinit msi_ht_cap_enabled(struct pci_dev *dev)
>  	return 0;
>  }
>  
> -/* Check the hypertransport MSI mapping to know whether MSI is enabled or not */
> +/* Enable MSI on hypertransport chipsets supporting MSI */
>  static void __devinit quirk_msi_ht_cap(struct pci_dev *dev)
>  {
> -	if (dev->subordinate && !msi_ht_cap_enabled(dev)) {
> -		printk(KERN_WARNING "PCI: MSI quirk detected. "
> -		       "MSI disabled on chipset %s.\n",
> -		       pci_name(dev));
> -		dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
> +	if (dev->subordinate && msi_ht_cap_enabled(dev)) {
> +		printk(KERN_INFO "PCI: Enabled MSI on chipset %s.\n",
> +			pci_name(dev));
> +		dev->subordinate->bus_flags |= PCI_BUS_FLAGS_MSI;
>  	}
>  }
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE,
> -			quirk_msi_ht_cap);
> +DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_msi_ht_cap);
>  
> -/* The nVidia CK804 chipset may have 2 HT MSI mappings.
> - * MSI are supported if the MSI capability set in any of these mappings.
> - */
> -static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev)
> -{
> -	struct pci_dev *pdev;
> -
> -	if (!dev->subordinate)
> -		return;
>  
> -	/* check HT MSI cap on this chipset and the root one.
> -	 * a single one having MSI is enough to be sure that MSI are supported.
> -	 */
> -	pdev = pci_get_slot(dev->bus, 0);
> -	if (!pdev)
> -		return;
> -	if (!msi_ht_cap_enabled(dev) && !msi_ht_cap_enabled(pdev)) {
> -		printk(KERN_WARNING "PCI: MSI quirk detected. "
> -		       "MSI disabled on chipset %s.\n",
> -		       pci_name(dev));
> -		dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
> -	}
> -	pci_dev_put(pdev);
> -}
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
> -			quirk_nvidia_ck804_msi_ht_cap);
>   

Are you sure that calling quirk_msi_ht_cap() on all devices will really
replace my nVidia CK804 specific quirk above?

I haven't looked at all this for a while, but if I remember correctly,
the PCI hierarchy with an AMD8131 and a CK804 looks like the following.

-+-[08]-+-0a.0-[09]--
 \-[00]-+-00.0
        +-0e.0-[02]--


The HT MSI mapping of the CK804 may be either on device 00.0 (10de:005e)
and 0e.0 (10de:005d). The devices that are physically behind the CK804
chipset are on bus 02.

To get MSI enabled for these devices, the MSI flag should be set either
on bus 00 (looks impossible here) or on bus 02 (if the HT MSI mapping is
found on 0e.0). However, if the MSI mapping is found on device 00.0, I
don't see your code could enable MSI behind on bus 02.

Brice


      parent reply	other threads:[~2007-05-25 21:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200705122146.l4CLkH6q012322@fire-2.osdl.org>
     [not found] ` <m1mz09p1t7.fsf@ebiederm.dsl.xmission.com>
     [not found]   ` <20070513014622.c5702928.akpm@linux-foundation.org>
     [not found]     ` <46470209.9000502@bellsouth.net>
     [not found]       ` <46470515.50000@NineX.eu.org>
     [not found]         ` <464707F7.6080600@bellsouth.net>
     [not found]           ` <m1irawpwy2.fsf@ebiederm.dsl.xmission.com>
     [not found]             ` <20070513204407.7ba35010@osprey.hogchain.net>
     [not found]               ` <4647FA38.3090108@NineX.eu.org>
     [not found]                 ` <46480EA5.40400@NineX.eu.org>
     [not found]                   ` <20070514053406.478bf93f@osprey.hogchain.net>
     [not found]                     ` <m1d513oddj.fsf@ebiederm.dsl.xmission.com>
     [not found]                       ` <20070514093829.377e04bc@osprey.hogchain.net>
     [not found]                         ` <m18xbrnyxi.fsf@ebiederm.dsl.xmission.com>
     [not found]                           ` <20070514160005.627435e3@osprey.hogchain.net>
     [not found]                             ` <m1odkmmft4.fsf@ebiederm.dsl.xmission.com>
     [not found]                               ` <20070515212200.517fcba2@osprey.hogchain.net>
     [not found]                                 ` <m14pmcmz8r.fsf@ebiederm.dsl.xmission.com>
     [not found]                                   ` <20070516185225.3f3ac082@osprey.hogchain.net>
     [not found]                                     ` <m1sl9wl28m.fsf@ebiederm.dsl.xmission.com>
     [not found]                                       ` <20070522204103.134bf5a2@osprey.hogchain.net>
2007-05-25  4:19                                         ` [PATCH 1/2] msi: Invert the sense of the MSI enables Eric W. Biederman
2007-05-25  4:26                                           ` [PATCH 2/2] msi: Add support for the Intel chipsets that support MSI Eric W. Biederman
2007-05-25  5:38                                             ` Andi Kleen
2007-05-25  6:10                                               ` Eric W. Biederman
2007-05-25 14:42                                                 ` Chuck Ebbert
2007-05-25 16:52                                                   ` Eric W. Biederman
2007-05-25  4:31                                           ` [PATCH 1/2] msi: Invert the sense of the MSI enables Andrew Morton
2007-05-25  5:20                                             ` Eric W. Biederman
2007-05-25  5:44                                             ` Grant Grundler
2007-05-25  5:51                                             ` Andi Kleen
2007-05-25 20:16                                               ` Jonathan Lundell
2007-05-26  6:52                                                 ` Grant Grundler
2007-05-25  5:14                                           ` Michael Ellerman
2007-05-25  5:59                                             ` Eric W. Biederman
2007-05-25  6:40                                             ` David Miller
2007-05-25  5:20                                           ` Greg KH
2007-05-25  5:57                                             ` Eric W. Biederman
2007-05-25 15:17                                             ` Eric W. Biederman
2007-05-25 15:28                                               ` Chuck Ebbert
2007-05-25 15:40                                               ` Roland Dreier
2007-05-25 15:42                                                 ` Roland Dreier
2007-05-25 16:10                                                   ` Eric W. Biederman
2007-05-25 20:09                                                     ` David Schwartz
2007-05-25 20:25                                                     ` Roland Dreier
2007-05-25 20:35                                               ` Greg KH
2007-05-25 21:06                                                 ` Eric W. Biederman
2007-05-25 21:17                                                   ` Roland Dreier
2007-05-25 21:31                                                   ` Greg KH
2007-05-26  6:43                                                 ` Grant Grundler
2007-05-25 21:47                                           ` Brice Goglin [this message]

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=46575957.8080905@ens-lyon.org \
    --to=brice.goglin@ens-lyon.org \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@suse.de \
    --cc=jacliburn@bellsouth.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=michael@ellerman.id.au \
    --cc=ninex@NineX.eu.org \
    --cc=ninex@o2.pl \
    --cc=tony.luck@intel.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