Skip to content
Snippets Groups Projects
Commit ec70b46b authored by Knut Omang's avatar Knut Omang Committed by Michael S. Tsirkin
Browse files

pcie: Fix incorrect write to the ari capability next function field


PCI_ARI_CAP_NFN, a macro for reading next function was used instead of
the intended write.

Signed-off-by: default avatarKnut Omang <knut.omang@oracle.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent cec391d7
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment