<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/pci/hotplug/pciehp_ctrl.c, branch v4.4.93</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<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.toradex.cn/cgit/linux-toradex.git/commit/?id=bee67756eb4ae51ededeb8ce56e7f4fb91d30b43'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: pciehp: Inline the "handle event" functions into the ISR</title>
<updated>2015-06-18T21:14:49+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-06-15T02:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f092fec67191f899fa111a4eeffdf4368494c77'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: pciehp: Rename queue_interrupt_event() to pciehp_queue_interrupt_event()</title>
<updated>2015-06-18T21:14:49+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-06-15T02:25:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d49eccb3c1a41b847380279d7f88a88421783f37'/>
<id>d49eccb3c1a41b847380279d7f88a88421783f37</id>
<content type='text'>
Rename queue_interrupt_event() to pciehp_queue_interrupt_event() so we can
make it extern and call it from 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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename queue_interrupt_event() to pciehp_queue_interrupt_event() so we can
make it extern and call it from 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;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: pciehp: Make queue_interrupt_event() void</title>
<updated>2015-06-18T21:14:49+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-06-15T02:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d852b68badd257b2cf98c2759b9d93dac7b86a8'/>
<id>7d852b68badd257b2cf98c2759b9d93dac7b86a8</id>
<content type='text'>
Nobody looks at the return value from queue_interrupt_event(), so errors
were silently ignored.  Convert it to a "void" function and note the error
in the dmesg log.

No functional change except the new message.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nobody looks at the return value from queue_interrupt_event(), so errors
were silently ignored.  Convert it to a "void" function and note the error
in the dmesg log.

No functional change except the new message.

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;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: pciehp: Clean up debug logging</title>
<updated>2015-06-17T22:35:28+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-06-15T21:28:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3784e0c6b02d4fa0966abb01b74eedeb8cd64603'/>
<id>3784e0c6b02d4fa0966abb01b74eedeb8cd64603</id>
<content type='text'>
The pciehp debug logging is overly verbose and often redundant.  Almost all
of the information printed by dbg_ctrl() is also printed by the normal PCI
core enumeration code and by pcie_init().

Remove the redundant debug info.

When claiming a pciehp bridge, we print the slot characteristics, e.g.,

  Slot #6 AttnBtn- AttnInd- PwrInd- PwrCtrl- MRL- Interlock- NoCompl+ LLActRep+

Add the Hot-Plug Capable and Hot-Plug Surprise bits to this information,
and print it all in the same order as lspci does.

No functional change except the message text changes.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pciehp debug logging is overly verbose and often redundant.  Almost all
of the information printed by dbg_ctrl() is also printed by the normal PCI
core enumeration code and by pcie_init().

Remove the redundant debug info.

When claiming a pciehp bridge, we print the slot characteristics, e.g.,

  Slot #6 AttnBtn- AttnInd- PwrInd- PwrCtrl- MRL- Interlock- NoCompl+ LLActRep+

Add the Hot-Plug Capable and Hot-Plug Surprise bits to this information,
and print it all in the same order as lspci does.

No functional change except the message text changes.

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;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: pciehp: Handle surprise add even if surprise removal isn't supported</title>
<updated>2015-01-21T16:28:07+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-01-21T16:28:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a93b506e265a83a0f8c56ff003434e2d263961ce'/>
<id>a93b506e265a83a0f8c56ff003434e2d263961ce</id>
<content type='text'>
The PCIe spec (r3.0, sec 7.8.9) says Hot-Plug Surprise indicates support
for surprise *removal*, but pciehp checked this to determine if it should
handle presence detect interrupts for device *addition*.

Allow surprise device addition even if the slot doesn't advertise support
for surprise removal.

Keith has a platform with slots for front-loading SFF devices.  The slots
do not have attention buttons and do not support surprise removal, but they
do have presence detect.  In that case, we still want to use presence
detect for device addition.

Keith's original patch handled surprise insertions only if Hot-Plug Capable
is set.  I think that test is superfluous because pciehp only claims slots
that advertise Hot-Plug Capable (see get_port_device_capability()).

Link: http://lkml.kernel.org/r/1419275223-14602-1-git-send-email-keith.busch@intel.com
Based-on-patch-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Rajat Jain &lt;rajatxjain@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PCIe spec (r3.0, sec 7.8.9) says Hot-Plug Surprise indicates support
for surprise *removal*, but pciehp checked this to determine if it should
handle presence detect interrupts for device *addition*.

Allow surprise device addition even if the slot doesn't advertise support
for surprise removal.

Keith has a platform with slots for front-loading SFF devices.  The slots
do not have attention buttons and do not support surprise removal, but they
do have presence detect.  In that case, we still want to use presence
detect for device addition.

Keith's original patch handled surprise insertions only if Hot-Plug Capable
is set.  I think that test is superfluous because pciehp only claims slots
that advertise Hot-Plug Capable (see get_port_device_capability()).

Link: http://lkml.kernel.org/r/1419275223-14602-1-git-send-email-keith.busch@intel.com
Based-on-patch-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Rajat Jain &lt;rajatxjain@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: Merge multi-line quoted strings</title>
<updated>2014-06-11T02:20:42+00:00</updated>
<author>
<name>Ryan Desfosses</name>
<email>ryan@desfo.org</email>
</author>
<published>2014-04-19T00:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=227f06470502c4fea3d93df1f12a77e3e37f6263'/>
<id>227f06470502c4fea3d93df1f12a77e3e37f6263</id>
<content type='text'>
Merge quoted strings that are broken across lines into a single entity.
The compiler merges them anyway, but checkpatch complains about it, and
merging them makes it easier to grep for strings.

No functional change.

[bhelgaas: changelog, do the same for everything under drivers/pci]
Signed-off-by: Ryan Desfosses &lt;ryan@desfo.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge quoted strings that are broken across lines into a single entity.
The compiler merges them anyway, but checkpatch complains about it, and
merging them makes it easier to grep for strings.

No functional change.

[bhelgaas: changelog, do the same for everything under drivers/pci]
Signed-off-by: Ryan Desfosses &lt;ryan@desfo.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: Whitespace cleanup</title>
<updated>2014-06-11T02:20:19+00:00</updated>
<author>
<name>Ryan Desfosses</name>
<email>ryan@desfo.org</email>
</author>
<published>2014-04-19T00:13:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c78bc61f5ef3bc87e7f94f67ec737d2273f120b'/>
<id>3c78bc61f5ef3bc87e7f94f67ec737d2273f120b</id>
<content type='text'>
Fix various whitespace errors.

No functional change.

[bhelgaas: fix other similar problems]
Signed-off-by: Ryan Desfosses &lt;ryan@desfo.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix various whitespace errors.

No functional change.

[bhelgaas: fix other similar problems]
Signed-off-by: Ryan Desfosses &lt;ryan@desfo.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: pciehp: Cleanup whitespace</title>
<updated>2014-02-19T22:05:25+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-02-11T22:26:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9cad7f582055513fe13a93fee3ddb213656a6a5d'/>
<id>9cad7f582055513fe13a93fee3ddb213656a6a5d</id>
<content type='text'>
Minor whitespace cleanup; no functional change.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Minor whitespace cleanup; no functional change.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: pciehp: Remove a non-existent card, regardless of "surprise" capability</title>
<updated>2014-02-19T22:04:14+00:00</updated>
<author>
<name>Rajat Jain</name>
<email>rajatxjain@gmail.com</email>
</author>
<published>2014-02-19T02:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2b3940b60626ac4932fa048cc74f2a872cc4bfb4'/>
<id>2b3940b60626ac4932fa048cc74f2a872cc4bfb4</id>
<content type='text'>
In case a card is physically yanked out, it should immediately be removed,
regardless of the "surprise" capability bit. Thus:

  - Always handle the physical removal - regardless of the "surprise" bit.
  - Don't use "surprise" capability when making decisions about enabling
    presence detect notifications.
  - Reword the comments to indicate the intent.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case a card is physically yanked out, it should immediately be removed,
regardless of the "surprise" capability bit. Thus:

  - Always handle the physical removal - regardless of the "surprise" bit.
  - Don't use "surprise" capability when making decisions about enabling
    presence detect notifications.
  - Reword the comments to indicate the intent.

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;</pre>
</div>
</content>
</entry>
</feed>
