<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/pci/hotplug, branch v3.4-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/pci/hotplug?h=v3.4-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/pci/hotplug?h=v3.4-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-02-27T20:17:16Z</updated>
<entry>
<title>PCI: make acpihp use __pci_remove_bus_device instead</title>
<updated>2012-02-27T20:17:16Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-02-25T21:54:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f6330c3178112a7b7f18e7f51f1cbb89fa1174c7'/>
<id>urn:sha1:f6330c3178112a7b7f18e7f51f1cbb89fa1174c7</id>
<content type='text'>
pci_stop_bus_device gets called before in the same loop.

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: Rename pci_remove_bus_device to pci_stop_and_remove_bus_device</title>
<updated>2012-02-27T20:12:18Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-02-25T21:54:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=210647af897af8ef2d00828aa2a6b1b42206aae6'/>
<id>urn:sha1:210647af897af8ef2d00828aa2a6b1b42206aae6</id>
<content type='text'>
The old pci_remove_bus_device actually did stop and remove.

Make the name reflect that to reduce confusion.

This patch is done by sed scripts and changes back some incorrect
__pci_remove_bus_device changes.

Suggested-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI hotplug: cpcihp: fix debug module parameter to be bool</title>
<updated>2012-02-14T16:45:03Z</updated>
<author>
<name>Danny Kukawka</name>
<email>danny.kukawka@bisect.de</email>
</author>
<published>2012-01-30T22:00:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=309c665110ee6a8d9a28f802c41eaab50ceebbf7'/>
<id>urn:sha1:309c665110ee6a8d9a28f802c41eaab50ceebbf7</id>
<content type='text'>
Fix debug variable from module parameter to be really bool to
fix 'warning: return from incompatible pointer type'.

Acked-by: Scott Murray &lt;scott@spiteful.org&gt;
Signed-off-by: Danny Kukawka &lt;danny.kukawka@bisect.de&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: pciehp: Disable/enable link during slot power off/on</title>
<updated>2012-02-14T16:45:02Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-01-27T18:55:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2debd9289997fc5d1c0043b41201a8b40d5e11d0'/>
<id>urn:sha1:2debd9289997fc5d1c0043b41201a8b40d5e11d0</id>
<content type='text'>
On a system with a repeater on the system board to support gen2 hotplug,
we found that when an ExpressModule is removed from some slots,
/var/log/messages will be full of "card present/not present" warnings.

It turns out the root complex is continually trying to train the link to
the repeater because the repeater has not been reset.

This patch will disable the link at removal time to allow the repeater
to be reset properly.  This also prevents a potential AER message at
removal time.

Also, when testing hotplug on a system under development, we found if we
boot the system without an EM installed, and later hot-add an EM, it
does not work with Linux, but another OS is ok.  The root cause is that
BIOS left link disabled when slot was empty at boot time, and other OS
is modifying the link disable bit in link ctrl during power on/off.

So we should do the same thing to disable/enable link during power off/on.

-v2: check link DLLA bit instead of 100ms waiting.
     Separate link disable/enable functions to another patch.

Signed-off-by: Yinghai Lu &lt;yinghai.lu@oracle.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: pciehp: Add Disable/enable link functions</title>
<updated>2012-02-14T16:45:01Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-01-27T18:55:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7f822999e12a144e68c915194267108f8051cf9b'/>
<id>urn:sha1:7f822999e12a144e68c915194267108f8051cf9b</id>
<content type='text'>
Will use it during power off/on of slots

Signed-off-by: Yinghai Lu &lt;yinghai.lu@oracle.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: pciehp: Add pcie_wait_link_not_active()</title>
<updated>2012-02-14T16:45:01Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-01-27T18:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bffe4f72fcdd92bfb24909d586d1636e5cec500d'/>
<id>urn:sha1:bffe4f72fcdd92bfb24909d586d1636e5cec500d</id>
<content type='text'>
Will use it for link disable status checking.

Signed-off-by: Yinghai Lu &lt;yinghai.lu@oracle.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: pciehp: make check_link_active more helpful</title>
<updated>2012-02-14T16:45:00Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-01-27T18:55:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e2ce405b24eef9f4cc947bf5f430ca27b474f1f'/>
<id>urn:sha1:4e2ce405b24eef9f4cc947bf5f430ca27b474f1f</id>
<content type='text'>
A few changes:
  - remove the 'inline' and let the complier decide
  - return a bool to indicate whether the link was active
  - add a debug message to indicate link state when it beocmes active

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: pciehp: replace unconditional sleep with config space access check</title>
<updated>2012-02-14T16:45:00Z</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2012-01-27T18:55:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2f5d8e4ff947ad6673397083b48719cd6c59cd61'/>
<id>urn:sha1:2f5d8e4ff947ad6673397083b48719cd6c59cd61</id>
<content type='text'>
During reviewing
|	PCI: pciehp: wait 1000 ms before Link Training check
Linus said:
&gt;...
&gt; That's a *long* time, and it's irritating to the user. It makes the
&gt; user think "the machine is slow".
&gt;...
&gt; And quite frankly, an unconditional one-second delay here seems bad.
&gt;Two seconds was unacceptable, one second is just bad.

Try to access the pci conf of a pci device that is supposed to show up
in 1s.  If we can read back a valid vendor/device id, we can return
early.

Related discussion could be found:
	https://lkml.org/lkml/2011/12/6/339

-v2: seperate code to pci_bus_read_dev_vendor_id() from pci_scan_device()
    and reuse it from pciehp code. Suggested by Matthew Wilcox.
-v3: According to Kenj, don't use array in stack, and don't wait too long
    for crs, also return fail status if not found.
    Also separate pci_bus_dev_read_vendor_id() change to another patch.

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: drivers/pci/hotplug/ibmphp_ebda.c: add missing iounmap</title>
<updated>2012-02-14T16:44:47Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2012-01-12T09:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f0cdddcd3f270901765fc909c3aee37a2091e78'/>
<id>urn:sha1:8f0cdddcd3f270901765fc909c3aee37a2091e78</id>
<content type='text'>
Add missing iounmap in error handling code, in a case where the function
already preforms iounmap on some other execution path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression e;
statement S,S1;
int ret;
@@
e = \(ioremap\|ioremap_nocache\)(...)
... when != iounmap(e)
if (&lt;+...e...+&gt;) S
... when any
    when != iounmap(e)
*if (...)
   { ... when != iounmap(e)
     return ...; }
... when any
iounmap(e);
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: Can continually add funcs after adding func0</title>
<updated>2012-02-14T16:44:47Z</updated>
<author>
<name>Amos Kong</name>
<email>akong@redhat.com</email>
</author>
<published>2011-11-25T07:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f382a086f3129edc152b8044b69ccc6682e637bb'/>
<id>urn:sha1:f382a086f3129edc152b8044b69ccc6682e637bb</id>
<content type='text'>
Boot up a KVM guest, and hotplug multifunction
devices(func1,func2,func0,func3) to guest.

for i in 1 2 0 3;do
qemu-img create /tmp/resize$i.qcow2 1G -f qcow2
(qemu) drive_add 0x11.$i id=drv11$i,if=none,file=/tmp/resize$i.qcow2
(qemu) device_add virtio-blk-pci,id=dev11$i,drive=drv11$i,addr=0x11.$i,multifunction=on
done

In linux kernel, when func0 of the slot is hot-added, the whole
slot will be marked as 'enabled', then driver will ignore other new
hotadded funcs.
But in Win7 &amp; WinXP, we can continaully add other funcs after adding
func0, all funcs will be added in guest.

drivers/pci/hotplug/acpiphp_glue.c:
static int acpiphp_check_bridge(struct acpiphp_bridge *bridge)
{
....
        for (slot = bridge-&gt;slots; slot; slot = slot-&gt;next) {
                if (slot-&gt;flags &amp; SLOT_ENABLED) {
                        acpiphp_disable_slot()
                else
                        acpiphp_enable_slot()
....                              |
}                                 v
                            enable_device()
                                  |
                                  v
        //only don't enable slot if func0 is not added
	list_for_each_entry(func, &amp;slot-&gt;funcs, sibling) {
               ...
        }
       slot-&gt;flags |= SLOT_ENABLED; //mark slot to 'enabled'

This patch just make pci driver can continaully add funcs after adding
func 0. Only mark slot to 'enabled' when all funcs are added.

For pci multifunction hotplug, we can add functions one by one(func 0 is
necessary), and all functions will be removed in one time.

Signed-off-by: Amos Kong &lt;akong@redhat.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
</feed>
