All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Helge Deller <deller@gmx.de>
Cc: linux-pci@vger.kernel.org
Subject: Re: pci_is_pcie() returns true for PCI-cards?
Date: Sun, 11 Dec 2011 15:53:43 -0700	[thread overview]
Message-ID: <20111211225342.GA20129@parisc-linux.org> (raw)
In-Reply-To: <4EE5220B.1090207@gmx.de>

On Sun, Dec 11, 2011 at 10:35:07PM +0100, Helge Deller wrote:
> In my machine I'm running two dual-DVI PCI video cards (NVidia GeForce 7300 LE PCI, ATI FireMV 2200 PCI).
> Both are PCI and not PCI-Express cards.
> 
> Somewhere after kernel 2.6.34 the nouveau and the radeon DRM drivers switched their
> initialization code to set the GART/aperture size to 64MB (for PCI) or 512MB (for PCIE),
> and the pci_is_pcie() function is used to determine if the graphics card is PCI or PCIE.
> 
> Now my question:
> My assumption is, that pci_is_pcie() should return true for PCI-E cards only.
> PCI-only cards should return false. Is this assumption correct?

Yes.

> If yes, there is probably a bug somewhere and maybe someone here has an idea what I could test to fix this bug?
> If not, then the nouveau and radeon drivers should not use pci_is_pcie() to determine if this is a PCI or PCI-E card...
> 
> I did some testing with kernel 3.1.5.
> For the nVidia card (PCI 01:00.0) I got:
> - pci_is_pcie(dev->pdev) = 1
> - pci_find_capability(dev->pdev, PCI_CAP_ID_EXP) = 120
> 
> lspci output:
> 00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03)
> 00:01.0 PCI bridge: Intel Corporation 4 Series Chipset PCI Express Root Port (rev 03)
> 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)
> 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01)
> 00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01)
> 00:1d.0 USB Controller: Intel Corporation N10/ICH7 Family USB UHCI Controller #1 (rev 01)
> 00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01)
> 00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01)
> 00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01)
> 00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01)
> 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
> 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
> 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
> 00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01)
> 01:00.0 VGA compatible controller: nVidia Corporation G72 [GeForce 7300 LE] (rev a1)
> 02:00.0 Ethernet controller: Atheros Communications AR8121/AR8113/AR8114 Gigabit or Fast Ethernet (rev b0)
> 04:01.0 VGA compatible controller: ATI Technologies Inc RV280 [FireMV 2200 PCI] (rev 01)
> 04:01.1 Display controller: ATI Technologies Inc RV280 [FireMV 2200 PCI] (secondary) (rev 01)

Can you send
lspci -xxxxs01:00.0
lspci -xxxxs04:01.0
lspci -xxxxs04:01.1

(that is four 'x' characters).

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2011-12-11 22:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-11 21:35 pci_is_pcie() returns true for PCI-cards? Helge Deller
2011-12-11 22:53 ` Matthew Wilcox [this message]
2011-12-12 21:24   ` Helge Deller

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=20111211225342.GA20129@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=deller@gmx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.