<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux-stable.git/drivers/pci, branch linux-3.6.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-3.6.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-3.6.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/'/>
<updated>2012-12-17T17:27:17+00:00</updated>
<entry>
<title>PCI/PM: Fix deadlock when unbinding device if parent in D3cold</title>
<updated>2012-12-17T17:27:17+00:00</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2012-10-24T06:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=50439c4394f0731dca76ef29916ce36abc093ad9'/>
<id>urn:sha1:50439c4394f0731dca76ef29916ce36abc093ad9</id>
<content type='text'>
commit 90b5c1d7c45eeb622302680ff96ed30c1a2b6f0e upstream.

If a PCI device and its parents are put into D3cold, unbinding the
device will trigger deadlock as follow:

- driver_unbind
  - device_release_driver
    - device_lock(dev)				&lt;--- previous lock here
    - __device_release_driver
      - pm_runtime_get_sync
        ...
          - rpm_resume(dev)
            - rpm_resume(dev-&gt;parent)
              ...
                - pci_pm_runtime_resume
                  ...
                  - pci_set_power_state
                    - __pci_start_power_transition
                      - pci_wakeup_bus(dev-&gt;parent-&gt;subordinate)
                        - pci_walk_bus
                          - device_lock(dev)	&lt;--- deadlock here


If we do not do device_lock in pci_walk_bus, we can avoid deadlock.
Device_lock in pci_walk_bus is introduced in commit:
d71374dafbba7ec3f67371d3b7e9f6310a588808, corresponding email thread
is: https://lkml.org/lkml/2006/5/26/38.  The patch author Zhang Yanmin
said device_lock is added to pci_walk_bus because:

  Some error handling functions call pci_walk_bus. For example, PCIe
  aer. Here we lock the device, so the driver wouldn't detach from the
  device, as the cb might call driver's callback function.

So I fixed the deadlock as follows:

- remove device_lock from pci_walk_bus
- add device_lock into callback if callback will call driver's callback

I checked pci_walk_bus users one by one, and found only PCIe aer needs
device lock.

Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
CC: stable@vger.kernel.org		# v3.6+
CC: Zhang Yanmin &lt;yanmin.zhang@intel.com&gt;


</content>
</entry>
<entry>
<title>PCI/PM: Fix proc config reg access for D3cold and bridge suspending</title>
<updated>2012-11-26T20:14:06+00:00</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2012-10-25T01:36:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=ee62ff8a0db9d64cdd41abd1acfa1447d78dd5b4'/>
<id>urn:sha1:ee62ff8a0db9d64cdd41abd1acfa1447d78dd5b4</id>
<content type='text'>
commit b3c32c4f9565f93407921c0d8a4458042eb8998e upstream.

In https://bugzilla.kernel.org/show_bug.cgi?id=48981
Peter reported that /proc/bus/pci/??/??.? does not work for 3.6.
This is because the device configuration space registers are
not accessible if the corresponding parent bridge is suspended or
the device is put into D3cold state.

This is the same as /sys/bus/pci/devices/0000:??:??.?/config access
issue.  So the function used to solve sysfs issue is used to solve
this issue.

This patch moves pci_config_pm_runtime_get()/_put() from pci/pci-sysfs.c
to pci/pci.c and makes them extern so they can be used by both the
sysfs and proc paths.

[bhelgaas: changelog, references, reporters]
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=48981
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=49031
Reported-by: Forrest Loomis &lt;cybercyst@gmail.com&gt;
Reported-by: Peter &lt;lekensteyn@gmail.com&gt;
Reported-by: Micael Dias &lt;kam1kaz3@gmail.com&gt;
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PCI/PM: Resume device before shutdown</title>
<updated>2012-11-26T20:14:06+00:00</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2012-10-24T06:54:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=45f158b2641200ed81c20a118758ddc8cbfc4364'/>
<id>urn:sha1:45f158b2641200ed81c20a118758ddc8cbfc4364</id>
<content type='text'>
commit 3ff2de9ba1a2e22e548979dbcd46e999b22c93d8 upstream.

Some actions during shutdown need device to be in D0 state, such as
MSI shutdown etc, so resume device before shutdown.

Without this patch, a device may not be enumerated after a kexec
because the corresponding bridge is not in D0, so that
configuration space of the device is not accessible.

Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PCI: Check P2P bridge for invalid secondary/subordinate range</title>
<updated>2012-10-12T20:50:23+00:00</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-09-11T00:19:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=69c212a724fd353e05aeb8dff788a71f68a6b1d8'/>
<id>urn:sha1:69c212a724fd353e05aeb8dff788a71f68a6b1d8</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;

</content>
</entry>
<entry>
<title>PCI: Don't print anything while decoding is disabled</title>
<updated>2012-08-23T16:53:08+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2012-08-23T16:53:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=0ff9514b579b4f2f3e6038cd961ce64c224c3c73'/>
<id>urn:sha1:0ff9514b579b4f2f3e6038cd961ce64c224c3c73</id>
<content type='text'>
If we try to print to the console device while its decoding is disabled,
the system will hang.

Reported-and-tested-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;</content>
</entry>
<entry>
<title>PCI/PM: Fix config reg access for D3cold and bridge suspending</title>
<updated>2012-08-21T23:34:24+00:00</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2012-08-15T01:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=3d8387efe1ad9eb5bfe8a2e58cdbd1b88b247eef'/>
<id>urn:sha1:3d8387efe1ad9eb5bfe8a2e58cdbd1b88b247eef</id>
<content type='text'>
This patch fixes the following bug:

http://marc.info/?l=linux-pci&amp;m=134338059022620&amp;w=2

Where lspci does not work properly if a device and the corresponding
parent bridge (such as PCIe port) is suspended.  This is because the
device configuration space registers will be not accessible if the
corresponding parent bridge is suspended or the device is put into
D3cold state.

To solve the issue, the bridge/PCIe port connected to the device is
put into active state before read/write configuration space registers.
If the device is in D3cold state, it will be put into active state
too.

To avoid resume/suspend PCIe port for each configuration register
read/write, a small delay is added before the PCIe port to go
suspended.

Reported-by: Bjorn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;</content>
</entry>
<entry>
<title>PCI/PM: Keep parent bridge active when probing device</title>
<updated>2012-08-21T23:32:07+00:00</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2012-08-08T01:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=ea8c88f13d9fb1d6b39a05bfa07ae076ca1c6803'/>
<id>urn:sha1:ea8c88f13d9fb1d6b39a05bfa07ae076ca1c6803</id>
<content type='text'>
This patch fixes the following bug:

http://marc.info/?l=linux-pci&amp;m=134329923124234&amp;w=2

The root cause of the bug is as follow.

If a device is not bound with the corresponding driver, the device
runtime PM will be disabled and the device will be put into suspended
state.  So that, the bridge/PCIe port connected to it may be put into
suspended and low power state.  When do probing for the device later,
because the bridge/PCIe port connected to it is in low power state,
the IO access to device may fail.

To solve the issue, the bridge/PCIe port connected to the device is
put into active state before probing.

Reported-by: Bjorn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;</content>
</entry>
<entry>
<title>PCI/PM: Enable D3/D3cold by default for most devices</title>
<updated>2012-08-21T23:31:40+00:00</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2012-08-08T01:07:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=4f9c1397e2e80e52b17ec4e39760caa807bd15c7'/>
<id>urn:sha1:4f9c1397e2e80e52b17ec4e39760caa807bd15c7</id>
<content type='text'>
This patch fixes the following bug:

http://marc.info/?l=linux-usb&amp;m=134318961120825&amp;w=2

Originally, device lower power states include D1, D2, D3.  After that,
D3 is further divided into D3hot and D3cold.  To support both scenario
safely, original D3 is mapped to D3cold.

When adding D3cold support, because worry about some device may have
broken D3cold support, D3cold is disabled by default.  This disable D3
on original platform too.  But some original platform may only have
working D3, but no working D1, D2.  The root cause of the above bug is
it too.

To deal with this, this patch enables D3/D3cold by default for most
devices.  This restores the original behavior.  For some devices that
suspected to have broken D3cold support, such as PCIe port, D3cold is
disabled by default.

Reported-by: Bjorn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;</content>
</entry>
<entry>
<title>PCI: EHCI: Fix crash during hibernation on ASUS computers</title>
<updated>2012-08-15T17:51:19+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-08-12T21:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=0b68c8e2c3afaf9807eb1ebe0ccfb3b809570aa4'/>
<id>urn:sha1:0b68c8e2c3afaf9807eb1ebe0ccfb3b809570aa4</id>
<content type='text'>
Commit dbf0e4c (PCI: EHCI: fix crash during suspend on ASUS
computers) added a workaround for an ASUS suspend issue related to
USB EHCI and a bug in a number of ASUS BIOSes that attempt to shut
down the EHCI controller during system suspend if its PCI command
register doesn't contain 0 at that time.

It turns out that the same workaround is necessary in the analogous
hibernation code path, so add it.

References: https://bugzilla.kernel.org/show_bug.cgi?id=45811
Reported-and-tested-by: Oleksij Rempel &lt;bug-track@fisher-privat.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: stable@vger.kernel.org</content>
</entry>
<entry>
<title>PCI / PM: Fix D3/D3cold/D4 messages printed by acpi_pci_set_power_state()</title>
<updated>2012-08-15T17:46:18+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-08-04T21:27:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=3d0882c0d10d4b4785aeaf26043e764e3aaca825'/>
<id>urn:sha1:3d0882c0d10d4b4785aeaf26043e764e3aaca825</id>
<content type='text'>
If a PCI device is put into D3_cold by acpi_bus_set_power(),
the message printed by acpi_pci_set_power_state() says that its
power state has been changed to D4, which doesn't make sense.
In turn, if the device is put into D3_hot, the message simply
says "D3" without specifying the variant of the D3 state.

Fix this by using the pci_power_name() macro for printing the state
name instead of building it from the numeric value corresponding to
the given state directly.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
</feed>
