<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/probe.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-08-22T21:37:11Z</updated>
<entry>
<title>PCI: Disable all BAR sizing for devices with non-compliant BARs</title>
<updated>2016-08-22T21:37:11Z</updated>
<author>
<name>Prarit Bhargava</name>
</author>
<published>2016-05-11T16:27:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74fcab224b14554d1bc107ed5f26ce441710dc58'/>
<id>urn:sha1:74fcab224b14554d1bc107ed5f26ce441710dc58</id>
<content type='text'>
commit ad67b437f187ea818b2860524d10f878fadfdd99 upstream.

b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with non-compliant
BARs") disabled BAR sizing for BARs 0-5 of devices that don't comply with
the PCI spec.  But it didn't do anything for expansion ROM BARs, so we
still try to size them, resulting in warnings like this on Broadwell-EP:

  pci 0000:ff:12.0: BAR 6: failed to assign [mem size 0x00000001 pref]

Move the non-compliant BAR check from __pci_read_base() up to
pci_read_bases() so it applies to the expansion ROM BAR as well as
to BARs 0-5.

Note that direct callers of __pci_read_base(), like sriov_init(), will now
bypass this check.  We haven't had reports of devices with broken SR-IOV
BARs yet.

[bhelgaas: changelog]
Fixes: b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with non-compliant BARs")
Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Ingo Molnar &lt;mingo@redhat.com&gt;
CC: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
CC: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>PCI: Disable IO/MEM decoding for devices with non-compliant BARs</title>
<updated>2016-04-30T22:05:15Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2016-02-25T20:35:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c85e3d6901273bf7b28af947e5d6b6ede3111f7'/>
<id>urn:sha1:5c85e3d6901273bf7b28af947e5d6b6ede3111f7</id>
<content type='text'>
commit b84106b4e2290c081cdab521fa832596cdfea246 upstream.

The PCI config header (first 64 bytes of each device's config space) is
defined by the PCI spec so generic software can identify the device and
manage its usage of I/O, memory, and IRQ resources.

Some non-spec-compliant devices put registers other than BARs where the
BARs should be.  When the PCI core sizes these "BARs", the reads and writes
it does may have unwanted side effects, and the "BAR" may appear to
describe non-sensical address space.

Add a flag bit to mark non-compliant devices so we don't touch their BARs.
Turn off IO/MEM decoding to prevent the devices from consuming address
space, since we can't read the BARs to find out what that address space
would be.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Tested-by: Andi Kleen &lt;ak@linux.intel.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>PCI: Restore detection of read-only BARs</title>
<updated>2015-02-20T00:49:24Z</updated>
<author>
<name>Myron Stowe</name>
</author>
<published>2014-10-30T17:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e316075b3cada625bfae9a80dcf4ca3776f77db7'/>
<id>urn:sha1:e316075b3cada625bfae9a80dcf4ca3776f77db7</id>
<content type='text'>
commit 36e8164882ca6d3c41cb91e6f09a3ed236841f80 upstream.

Commit 6ac665c63dca ("PCI: rewrite PCI BAR reading code") masked off
low-order bits from 'l', but not from 'sz'.  Both are passed to pci_size(),
which compares 'base == maxbase' to check for read-only BARs.  The masking
of 'l' means that comparison will never be 'true', so the check for
read-only BARs no longer works.

Resolve this by also masking off the low-order bits of 'sz' before passing
it into pci_size() as 'maxbase'.  With this change, pci_size() will once
again catch the problems that have been encountered to date:

  - AGP aperture BAR of AMD-7xx host bridges: if the AGP window is
    disabled, this BAR is read-only and read as 0x00000008 [1]

  - BARs 0-4 of ALi IDE controllers can be non-zero and read-only [1]

  - Intel Sandy Bridge - Thermal Management Controller [8086:0103];
    BAR 0 returning 0xfed98004 [2]

  - Intel Xeon E5 v3/Core i7 Power Control Unit [8086:2fc0];
    Bar 0 returning 0x00001a [3]

Link: [1] https://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/drivers/pci/probe.c?id=1307ef6621991f1c4bc3cec1b5a4ebd6fd3d66b9 ("PCI: probing read-only BARs" (pre-git))
Link: [2] https://bugzilla.kernel.org/show_bug.cgi?id=43331
Link: [3] https://bugzilla.kernel.org/show_bug.cgi?id=85991
Reported-by: William Unruh &lt;unruh@physics.ubc.ca&gt;
Reported-by: Martin Lucina &lt;martin@lucina.net&gt;
Signed-off-by: Myron Stowe &lt;myron.stowe@redhat.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>PCI: Check P2P bridge for invalid secondary/subordinate range</title>
<updated>2012-10-17T02:48:34Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2012-09-11T00:19:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f714c689f6cbc7c196d7aa12f739009bc9dccca'/>
<id>urn:sha1:9f714c689f6cbc7c196d7aa12f739009bc9dccca</id>
<content type='text'>
commit 1965f66e7db08d1ebccd24a59043eba826cc1ce8 upstream.

For bridges with "secondary &gt; subordinate", i.e., invalid bus number
apertures, we don't enumerate anything behind the bridge unless the
user specified "pci=assign-busses".

This patch makes us automatically try to reassign the downstream bus
numbers in this case (just for that bridge, not for all bridges as
"pci=assign-busses" does).

We don't discover all the devices on the Intel DP43BF motherboard
without this change (or "pci=assign-busses") because its BIOS configures
a bridge as:

    pci 0000:00:1e.0: PCI bridge to [bus 20-08] (subtractive decode)

[bhelgaas: changelog, change message to dev_info]
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=18412
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=625754
Reported-by: Brian C. Huffman &lt;bhuffman@graze.net&gt;
Reported-by: VL &lt;vl.homutov@gmail.com&gt;
Tested-by: VL &lt;vl.homutov@gmail.com&gt;
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>PCI: workaround hard-wired bus number V2</title>
<updated>2012-03-01T00:30:51Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2012-01-30T11:25:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=608951f12d572bd36c95a5629a9c5bb7b6cf244c'/>
<id>urn:sha1:608951f12d572bd36c95a5629a9c5bb7b6cf244c</id>
<content type='text'>
commit 71f6bd4a23130cd2f4b036010c5790b1295290b9 upstream.

Fixes PCI device detection on IBM xSeries IBM 3850 M2 / x3950 M2
when using ACPI resources (_CRS).
This is default, a manual workaround (without this patch)
would be pci=nocrs boot param.

V2: Add dev_warn if the workaround is hit. This should reveal
how common such setups are (via google) and point to possible
problems if things are still not working as expected.
-&gt; Suggested by Jan Beulich.

Tested-by: garyhade@us.ibm.com
Signed-off-by: Yinghai Lu &lt;yinghai.lu@oracle.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PCI: Clean-up MPS debug output</title>
<updated>2011-10-27T19:45:44Z</updated>
<author>
<name>Jon Mason</name>
</author>
<published>2011-10-14T19:56:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a513a99a7cebfb452839cc09c9c0586f72d96414'/>
<id>urn:sha1:a513a99a7cebfb452839cc09c9c0586f72d96414</id>
<content type='text'>
Clean-up MPS debug output to make it a single line and aligned, thus
making it more readable for a large number of buses and devices in a
single system.

Suggested by Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;

Signed-off-by: Jon Mason &lt;mason@myri.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: enable MPS "performance" setting to properly handle bridge MPS</title>
<updated>2011-10-27T19:45:43Z</updated>
<author>
<name>Jon Mason</name>
</author>
<published>2011-10-14T19:56:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62f392ea5b5f87b641e16e61a4cedda21ef7341f'/>
<id>urn:sha1:62f392ea5b5f87b641e16e61a4cedda21ef7341f</id>
<content type='text'>
Rework the "performance" MPS option to configure the device MPS with the
smaller of the device MPSS or the bridge MPS (which is assumed to be
properly configured at this point to the largest allowable MPS based on
its parent bus).

Also, rework the MRRS setting to report an inability to set the MRRS to
a valid setting.

Signed-off-by: Jon Mason &lt;mason@myri.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: Disable MPS configuration by default</title>
<updated>2011-10-04T16:52:28Z</updated>
<author>
<name>Jon Mason</name>
</author>
<published>2011-10-03T14:50:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f39e6705faade2e89d119958a8c51b9b6e2c53c'/>
<id>urn:sha1:5f39e6705faade2e89d119958a8c51b9b6e2c53c</id>
<content type='text'>
Add the ability to disable PCI-E MPS turning and using the BIOS
configured MPS defaults.  Due to the number of issues recently
discovered on some x86 chipsets, make this the default behavior.

Also, add the option for peer to peer DMA MPS configuration.  Peer to
peer DMA is outside the scope of this patch, but MPS configuration could
prevent it from working by having the MPS on one root port different
than the MPS on another.  To work around this, simply make the system
wide MPS the smallest possible value (128B).

Signed-off-by: Jon Mason &lt;mason@myri.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pci: Don't crash when reading mpss from root complex</title>
<updated>2011-09-13T23:08:31Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
</author>
<published>2011-09-13T18:16:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a4b1a41b8a3d5256019854e851beed063b34344'/>
<id>urn:sha1:1a4b1a41b8a3d5256019854e851beed063b34344</id>
<content type='text'>
In pcie_find_smpss(), we have the following statement:

 	if (dev-&gt;is_hotplug_bridge &amp;&amp; (!list_is_singular(&amp;dev-&gt;bus-&gt;devices) ||
	    dev-&gt;bus-&gt;self-&gt;pcie_type != PCI_EXP_TYPE_ROOT_PORT))

The problem is that at least on my machine, this gets called for the
root complex (virtual P2P bridge), and dev-&gt;bus-&gt;self is NULL since
the parent bus for this is not itself anchor to a PCI device.

This adds the necessary NULL check.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Jon Mason &lt;mason@myri.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PCI: Remove MRRS modification from MPS setting code</title>
<updated>2011-09-10T02:49:58Z</updated>
<author>
<name>Jon Mason</name>
</author>
<published>2011-09-08T21:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ed2888e906b56769b4ffabb9c577190438aa68b8'/>
<id>urn:sha1:ed2888e906b56769b4ffabb9c577190438aa68b8</id>
<content type='text'>
Modifying the Maximum Read Request Size to 0 (value of 128Bytes) has
massive negative ramifications on some devices.  Without knowing which
devices have this issue, do not modify from the default value when
walking the PCI-E bus in pcie_bus_safe mode.  Also, make pcie_bus_safe
the default procedure.

Tested-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Tested-by: Simon Kirby &lt;sim@hostway.ca&gt;
Tested-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.com&gt;
Reported-and-tested-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Reported-and-tested-by: Niels Ole Salscheider &lt;niels_ole@salscheider-online.de&gt;
References: https://bugzilla.kernel.org/show_bug.cgi?id=42162
Signed-off-by: Jon Mason &lt;mason@myri.com&gt;
Acked-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
