[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/4] pci: Make use of the devfn property when reg
From: |
Knut Omang |
Subject: |
[Qemu-devel] [PATCH v2 1/4] pci: Make use of the devfn property when registering new devices |
Date: |
Tue, 2 Sep 2014 13:00:03 +0200 |
Without this, the devfn argument to pci_create_*()
does not affect the assigned devfn.
Needed to support (VF_STRIDE,VF_OFFSET) values other than (1,1)
for SR/IOV.
Signed-off-by: Knut Omang <address@hidden>
---
hw/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index daeaeac..6b21dee 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1757,7 +1757,7 @@ static int pci_qdev_init(DeviceState *qdev)
bus = PCI_BUS(qdev_get_parent_bus(qdev));
pci_dev = do_pci_register_device(pci_dev, bus,
object_get_typename(OBJECT(qdev)),
- pci_dev->devfn);
+ object_property_get_int(OBJECT(qdev),
"addr", NULL));
if (pci_dev == NULL)
return -1;
--
1.9.0