qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/3] pcie: Fix next function setting
@ 2014-08-20  6:52 Knut Omang
  2014-08-20  9:04 ` Marcel Apfelbaum
  0 siblings, 1 reply; 2+ messages in thread
From: Knut Omang @ 2014-08-20  6:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Alexey Kardashevskiy, Juan Quintela,
	Markus Armbruster, Gonglei, Michael S.Tsirkin, Igor Mammedov,
	Paolo Bonzini


      PCI_ARI_CAP_NFN is for reading next function not writing it

Signed-off-by: Knut Omang <knut.omang@oracle.com>
---
 hw/pci/pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index a123c01..de0e967 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -630,5 +630,5 @@ void pcie_ari_init(PCIDevice *dev, uint16_t offset, uint16_t nextfn)
 {
     pcie_add_capability(dev, PCI_EXT_CAP_ID_ARI, PCI_ARI_VER,
                         offset, PCI_ARI_SIZEOF);
-    pci_set_long(dev->config + offset + PCI_ARI_CAP, PCI_ARI_CAP_NFN(nextfn));
+    pci_set_long(dev->config + offset + PCI_ARI_CAP, (nextfn & 0xff) << 8);
 }
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-20  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-20  6:52 [Qemu-devel] [PATCH 1/3] pcie: Fix next function setting Knut Omang
2014-08-20  9:04 ` Marcel Apfelbaum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).