Message ID | 1408517574.25437.101.camel@ori.omang.mine.nu |
---|---|
State | New |
Headers | show |
On Wed, 2014-08-20 at 08:52 +0200, Knut Omang wrote: > PCI_ARI_CAP_NFN is for reading next function not writing it The commit message is not so clear, maybe something like "Fix incorrect write to ari capability or similar? Other than that the patch looks OK to me. Thanks, Marcel > > 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); > }
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); }
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(-)