<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pci/hotplug/pciehp_ctrl.c, branch v4.14.263</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.263</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.263'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-02-03T14:53:51+00:00</updated>
<entry>
<title>Revert "PCI: pciehp: Add runtime PM support for PCIe hotplug ports"</title>
<updated>2017-02-03T14:53:51+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2017-02-03T14:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d98e0929071e7ef63d35c1838b0ad0805ae366dd'/>
<id>urn:sha1:d98e0929071e7ef63d35c1838b0ad0805ae366dd</id>
<content type='text'>
This reverts commit 68db9bc814362e7f24371c27d12a4f34477d9356.

Yinghai reported that the following manual hotplug sequence:

  # echo 0 &gt; /sys/bus/pci/slots/8/power
  # echo 1 &gt; /sys/bus/pci/slots/8/power

worked in v4.9, but fails in v4.10-rc1, and that reverting 68db9bc81436
("PCI: pciehp: Add runtime PM support for PCIe hotplug ports") makes it
work again.

Fixes: 68db9bc81436 ("PCI: pciehp: Add runtime PM support for PCIe hotplug ports")
Link: https://lkml.kernel.org/r/CAE9FiQVCMCa7iVyuwp9z6VrY0cE7V_xghuXip28Ft52=8QmTWw@mail.gmail.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=193951
Reported-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>Merge branch 'pci/pm' into next</title>
<updated>2016-12-12T17:25:04+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2016-12-12T17:25:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=daaed10443da09ad0d2042b71cb99f3927d52164'/>
<id>urn:sha1:daaed10443da09ad0d2042b71cb99f3927d52164</id>
<content type='text'>
* pci/pm:
  x86/platform/intel-mid: Constify mid_pci_platform_pm
  PCI: pciehp: Add runtime PM support for PCIe hotplug ports
  ACPI / hotplug / PCI: Make device_is_managed_by_native_pciehp() public
  ACPI / hotplug / PCI: Use cached copy of PCI_EXP_SLTCAP_HPC bit
  PCI: Unfold conditions to block runtime PM on PCIe ports
  PCI: Consolidate conditions to allow runtime PM on PCIe ports
  PCI: Activate runtime PM on a PCIe port only if it can suspend
  PCI: Speed up algorithm in pci_bridge_d3_update()
  PCI: Autosense device removal in pci_bridge_d3_update()
  PCI: Don't acquire ref on parent in pci_bridge_d3_update()
  USB: UHCI: report non-PME wakeup signalling for Intel hardware
  PCI: Check for PME in targeted sleep state
</content>
</entry>
<entry>
<title>PCI: pciehp: Leave power indicator on when enabling already-enabled slot</title>
<updated>2016-12-08T18:02:25+00:00</updated>
<author>
<name>Ashok Raj</name>
<email>ashok.raj@intel.com</email>
</author>
<published>2016-11-19T08:32:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4ae2adedb38240be5a1a16588406980b948a3e7'/>
<id>urn:sha1:c4ae2adedb38240be5a1a16588406980b948a3e7</id>
<content type='text'>
If an error occurs when enabling a slot, pciehp_power_thread() turns off
the power indicator.  But if the only error is that the slot was already
enabled, we should leave the power indicator on.

Return success if called to enable an already-enabled slot.
This is in the same spirit of the special handling for EEXISTS when
pciehp_configure_device() determines the slot devices already exist.

Signed-off-by: Ashok Raj &lt;ashok.raj@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Keith Busch &lt;keith.busch@intel.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Add runtime PM support for PCIe hotplug ports</title>
<updated>2016-11-18T01:00:29+00:00</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2016-10-28T08:52:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68db9bc814362e7f24371c27d12a4f34477d9356'/>
<id>urn:sha1:68db9bc814362e7f24371c27d12a4f34477d9356</id>
<content type='text'>
Linux 4.8 added support for runtime suspending PCIe ports to D3hot with
commit 006d44e49a25 ("PCI: Add runtime PM support for PCIe ports"), but
excluded hotplug ports.  Those are now afforded runtime PM by the present
commit.

Hotplug ports require a few extra considerations:

- The configuration space of the port remains accessible in D3hot, so all
  the functions to read or modify the Slot Status and Slot Control
  registers need not be modified.  Even turning on slot power doesn't seem
  to require the port to be in D0, at least the PCIe spec doesn't say so
  and I confirmed that by testing with a Thunderbolt controller.

- However D0 is required to access devices on the secondary bus.  This
  happens in pciehp_check_link_status() and pciehp_configure_device() (both
  called from board_added()) and in pciehp_unconfigure_device() (called
  from remove_board()), so acquire a runtime PM ref for their invocation.

- The hotplug port stays active as long as it has active children.  If all
  hotplugged devices below the port runtime suspend, the port is allowed to
  runtime suspend as well.  Plug and unplug detection continues to work in
  D3hot.

- Hotplug interrupts are delivered in-band, so while the hotplug port
  itself is allowed to go to D3hot, its parent ports must stay in D0 for
  interrupts to come through.  Add a corresponding restriction to
  pci_dev_check_d3cold().

- Runtime PM may only be allowed if the hotplug port is handled natively by
  the OS.  On ACPI systems, the port may alternatively be handled by the
  firmware and things break if the OS puts the port into D3 behind the
  firmware's back:  E.g. Thunderbolt hotplug ports on non-Macs are handled
  by Intel's firmware in System Management Mode and the firmware is known
  to access devices on the port's secondary bus without checking first if
  the port is in D0: https://bugzilla.kernel.org/show_bug.cgi?id=53811

Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
CC: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Remove useless pciehp_get_latch_status() calls</title>
<updated>2016-09-14T19:25:05+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2016-09-07T22:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=29a654e59f3698d70d85e289fc5ce7261493bba2'/>
<id>urn:sha1:29a654e59f3698d70d85e289fc5ce7261493bba2</id>
<content type='text'>
Long ago, we updated a "switch_save" field based on the latch status.  But
switch_save was unused, and ed6cbcf2ac70 ("[PATCH] pciehp: miscellaneous
cleanups") removed it.

We no longer use the latch status, so remove calls to
pciehp_get_latch_status().  No functional change intended.

Tested-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Clean up dmesg "Slot(%s)" messages</title>
<updated>2016-09-14T19:25:00+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2016-09-08T20:19:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e49b304e379f93c8aa7ebb164628aec1209f371'/>
<id>urn:sha1:6e49b304e379f93c8aa7ebb164628aec1209f371</id>
<content type='text'>
Print slot name consistently as "Slot(%s)".  I don't know whether that's
ideal, but we can at least do it the same way all the time.  No functional
change intended.

Tested-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Don't re-read Slot Status when handling surprise event</title>
<updated>2016-09-14T19:24:45+00:00</updated>
<author>
<name>Mayurkumar Patel</name>
<email>mayurkumar.patel@intel.com</email>
</author>
<published>2016-08-23T08:58:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69bd3c5b28e7c988886efb3c9a7614a612eef45d'/>
<id>urn:sha1:69bd3c5b28e7c988886efb3c9a7614a612eef45d</id>
<content type='text'>
Previously we read Slot Status when handling a surprise event.  But Slot
Status might have changed since we identified the event, and the event_type
already tells us whether to enable or disable the slot, so there's no need
to read it again.

Remove handle_surprise_event() and queue the power work directly.

[bhelgaas: changelog]
Tested-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Mayurkumar Patel &lt;mayurkumar.patel@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Rajat Jain &lt;rajatxjain@gmail.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Clear attention LED on device add</title>
<updated>2016-08-22T16:57:41+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-08-03T23:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8b7c8b46f111ae56df4fd196fcb0fd2495f3b966'/>
<id>urn:sha1:8b7c8b46f111ae56df4fd196fcb0fd2495f3b966</id>
<content type='text'>
Clear the LED attention status after a successful device add.  It is
possible the attention LED was on from a previous power fault or link
failure, and a subsequent successful device insert insertion should clear
it.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Always protect pciehp_disable_slot() with hotplug mutex</title>
<updated>2015-11-25T17:45:42+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-11-01T21:58:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=64609eaab242d36e3e3b7cb81d31a028719feb74'/>
<id>urn:sha1:64609eaab242d36e3e3b7cb81d31a028719feb74</id>
<content type='text'>
When called from pciehp_sysfs_disable_slot(), the call to
pciehp_disable_slot() was not protected by the hotplug mutex.

Hold slot-&gt;hotplug_lock while calling pciehp_disable_slot().

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Rajat Jain &lt;rajatxjain@gmail.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Queue power work requests in dedicated function</title>
<updated>2015-10-21T18:55:37+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-10-12T19:10:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bee67756eb4ae51ededeb8ce56e7f4fb91d30b43'/>
<id>urn:sha1:bee67756eb4ae51ededeb8ce56e7f4fb91d30b43</id>
<content type='text'>
Up to now, work items to be queued to be handled by pciehp_power_thread()
are allocated using kmalloc() in three different locations.  If not needed,
kfree() is called to free the allocated data.

Introduce a separate function to allocate the work item and queue it, and
call it only if needed.  This reduces code duplication and avoids having to
free memory if the work item does not need to get executed.

[bhelgaas: tweak "no memory" message, make pciehp_queue_power_work() static]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
</feed>
