]> xenbits.xensource.com Git - qemu-xen-3.4-testing.git/commitdiff
passthrough: magic ioport protocol no longer unplugs passthrough NICs
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 15 Feb 2010 14:08:53 +0000 (14:08 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 16 Feb 2010 17:54:43 +0000 (17:54 +0000)
On Fri, 12 Feb 2010, Zhai, Edwin wrote:
> [bugs:]
>
> 1. Pass-through NICs are also unplugged, although them have different
>    path with vnif and emulated NIC.

You are right, that is a bug and this patch should fix it.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
(cherry picked from commit 60b80e3ee319e908069d1603e5b73f815acdffac)

hw/pci.c

index d7c516e4dd77de18974d846ca7294ce8f4a20750..01eff8d0ded0c99e52fda3986956300b12701e95 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -826,7 +826,8 @@ void pci_unplug_netifs(void)
            dev = bus->devices[x];
            if (dev &&
                dev->config[0xa] == 0 &&
-               dev->config[0xb] == 2) {
+               dev->config[0xb] == 2 &&
+               test_pci_slot(x >> 3) != 1) {
                /* Found a netif.  Remove it from the bus.  Note that
                   we don't free it here, since there could still be
                   references to it floating around.  There are only