<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/pci/hotplug/pciehp.h, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-08-10T19:24:09Z</updated>
<entry>
<title>PCI: pciehp: Remove ignored MRL sensor interrupt events</title>
<updated>2015-08-10T19:24:09Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-07-01T22:17:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2db0f71f56795f6b04d386b15c3b32b570558ebd'/>
<id>urn:sha1:2db0f71f56795f6b04d386b15c3b32b570558ebd</id>
<content type='text'>
We queued interrupt events for the MRL being opened or closed, but the code
in interrupt_event_handler() that handles these events ignored them.

Stop enabling MRL interrupts and remove the ignored events.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Remove unused interrupt events</title>
<updated>2015-08-10T19:24:09Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-07-01T22:01:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=58fa2405bd44805cb6166603100b0183ce26a0c8'/>
<id>urn:sha1:58fa2405bd44805cb6166603100b0183ce26a0c8</id>
<content type='text'>
The list of interrupt events (INT_BUTTON_IGNORE, INT_PRESENCE_ON, etc.) was
copied from other hotplug drivers, but pciehp doesn't use them all.

Remove the interrupt events that aren't used by pciehp.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Inline the "handle event" functions into the ISR</title>
<updated>2015-06-18T21:14:49Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-06-15T02:35:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4f092fec67191f899fa111a4eeffdf4368494c77'/>
<id>urn:sha1:4f092fec67191f899fa111a4eeffdf4368494c77</id>
<content type='text'>
The pciehp_handle_*() functions (pciehp_handle_attention_button(), etc.)
only contain a line or two of useful code, so it's clumsy to put
them in separate functions.  All they so is add an event to a work queue,
and it's clearer to see that directly in the ISR.

Inline them directly into pcie_isr().  No functional change.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Rajat Jain &lt;rajatja@google.com&gt;
Acked-by: Yinghai Lu &lt;yinghai@kernel.org&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Drop pointless ACPI-based "slot detection" check</title>
<updated>2015-05-21T16:01:12Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-05-19T13:27:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e705c2959b06b9db184842852da619a0b1672bbc'/>
<id>urn:sha1:e705c2959b06b9db184842852da619a0b1672bbc</id>
<content type='text'>
Jarod Wilson reports that ExpressCard hotplug doesn't work on HP ZBook G2.
The problem turns out to be the ACPI-based "slot detection" code called
from pciehp_probe() which uses questionable heuristics based on what ACPI
objects are present for the PCIe port device to figure out whether to
register a hotplug slot for that port.

That code is used if there is at least one PCIe port having an ACPI device
configuration object related to hotplug (such as _EJ0 or _RMV), and the
Thunderbolt port on the ZBook has _RMV.  Of course, Thunderbolt and PCIe
native hotplug need not be mutually exclusive (as they aren't on the
ZBook), so that rule is simply incorrect.

Moreover, the ACPI-based "slot detection" check does not add any value if
pciehp_probe() is called at all and the service type of the device object
it has been called for is PCIE_PORT_SERVICE_HP, because PCIe hotplug
services are only registered if the _OSC handshake in acpi_pci_root_add()
allows the kernel to control the PCIe native hotplug feature.  No more
checks need to be carried out to decide whether or not to register a native
PCIe hotlug slot in that case.

For the above reasons, make pciehp_probe() check if it has been called for
the right service type and drop the pointless ACPI-based "slot detection"
check from it.  Also remove the entire code whose only user is that check
(the entire pciehp_acpi.c file goes away as a result) and drop function
headers related to it from the internal pciehp header file.

Link: http://lkml.kernel.org/r/1431632038-39917-1-git-send-email-jarod@redhat.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=98581
Reported-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Tested-by: Jarod Wilson &lt;jarod@redhat.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Reduce PCIe slot_ctrl to 16 bits</title>
<updated>2014-09-13T02:12:29Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-08-15T23:18:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d537a3abb4b7085ebc3ce35e64acbad8ece1eece'/>
<id>urn:sha1:d537a3abb4b7085ebc3ce35e64acbad8ece1eece</id>
<content type='text'>
4283c70e91dc ("PCI: pciehp: Make pcie_wait_cmd() self-contained") added
a cache of the most recent command written to the Slot Control register.
This register is only 16 bits wide, but the cache ("slot_ctrl") is 32 bits.

Reduce slot_ctrl to a u16 so it matches the register size.  No functional
change.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Remove struct controller.no_cmd_complete</title>
<updated>2014-07-05T17:38:26Z</updated>
<author>
<name>Rajat Jain</name>
<email>rajatxjain@gmail.com</email>
</author>
<published>2014-06-26T18:58:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6c1a32e06758ba1c997f81a3c41e780cfc77b3c2'/>
<id>urn:sha1:6c1a32e06758ba1c997f81a3c41e780cfc77b3c2</id>
<content type='text'>
"no_cmd_complete" is only used once, and it duplicates read-only
information we already have in the cached Slot Capabilities value.

Remove the field and use the existing macro NO_CMD_CMPL() instead.

[bhelgaas: changelog]
Signed-off-by: Rajat Jain &lt;rajatxjain@gmail.com&gt;
Signed-off-by: Rajat Jain &lt;rajatjain@juniper.net&gt;
Signed-off-by: Guenter Roeck &lt;groeck@juniper.net&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Compute timeout from hotplug command start time</title>
<updated>2014-06-17T21:26:11Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-06-14T15:55:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=40b960831cfa8ee34d4b1035ddd7074bc5b01ecf'/>
<id>urn:sha1:40b960831cfa8ee34d4b1035ddd7074bc5b01ecf</id>
<content type='text'>
If we issue a hotplug command, go do something else, then come back and
wait for the command to complete, we don't have to wait the whole timeout
period, because some of it elapsed while we were doing something else.

Keep track of the time we issued the command, and wait only until the
timeout period from that point has elapsed.

For controllers with errata like Intel CF118, we previously timed out
before issuing the second hotplug command:

  At time T1 (during boot):
    - Write DLLSCE, ABPE, PDCE, etc. to Slot Control
  At time T2 (hotplug event):
    - Wait for command completion (CC) in Slot Status
    - Timeout at T2 + 1 second because CC is never set in Slot Status
    - Write PCC, PIC, etc. to Slot Control

With this change, we wait until T1 + 1 second instead of T2 + 1 second.
If the hotplug event is more than 1 second after the boot-time
initialization, we won't wait for the timeout at all.

We still emit a "Timeout on hotplug command" message if it timed out; we
should see this on the first hotplug event on every controller with this
erratum, as well as on real errors on controllers without the erratum.

Link: http://www.intel.com/content/www/us/en/processors/xeon/xeon-e7-v2-spec-update.html
Tested-by: Rajat Jain &lt;rajatxjain@gmail.com&gt;	(IDT 807a controller)
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Yinghai Lu &lt;yinghai@kernel.org&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Make pcie_wait_cmd() self-contained</title>
<updated>2014-06-16T17:47:59Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-06-13T19:58:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4283c70e91dcabe36f3545afabc5ee2b7d4da34a'/>
<id>urn:sha1:4283c70e91dcabe36f3545afabc5ee2b7d4da34a</id>
<content type='text'>
pcie_wait_cmd() waits for the controller to finish a hotplug command.  Move
the associated logic (to determine whether waiting is required and whether
we're using interrupts or polling) from pcie_write_cmd() to
pcie_wait_cmd().

No functional change.

Tested-by: Rajat Jain &lt;rajatxjain@gmail.com&gt;	(IDT 807a controller)
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Yinghai Lu &lt;yinghai@kernel.org&gt;</content>
</entry>
<entry>
<title>PCI: pciehp: Use PCI_EXP_SLTCAP_PSN define</title>
<updated>2014-04-14T22:06:30Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-04-05T21:05:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=17f830bb83ff64533f02cfd4b114d4a5957c2ee7'/>
<id>urn:sha1:17f830bb83ff64533f02cfd4b114d4a5957c2ee7</id>
<content type='text'>
Use PCI_EXP_SLTCAP_PSN to make it easier to find code that uses the
Physical Slot Number field in the PCIe Slot Capabilities register.

No functional change.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: pciehp: Add hotplug_lock to serialize hotplug events</title>
<updated>2014-02-11T23:13:16Z</updated>
<author>
<name>Rajat Jain</name>
<email>rajatxjain@gmail.com</email>
</author>
<published>2014-02-05T02:31:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=50b52fdee050745935d92e7026373edea2647e60'/>
<id>urn:sha1:50b52fdee050745935d92e7026373edea2647e60</id>
<content type='text'>
Today it is there is no protection around pciehp_enable_slot() and
pciehp_disable_slot() to ensure that they complete before another
hot-plug operation can be done on that particular slot.

This patch introduces the slot-&gt;hotplug_lock to ensure that any hotplug
operations (add / remove) complete before another hotplug event can begin
processing on that particular slot.

Signed-off-by: Rajat Jain &lt;rajatxjain@gmail.com&gt;
Signed-off-by: Rajat Jain &lt;rajatjain@juniper.net&gt;
Signed-off-by: Guenter Roeck &lt;groeck@juniper.net&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
</feed>
