From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLg74-0001Wl-Ok for qemu-devel@nongnu.org; Sun, 24 Aug 2014 18:18:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLg70-0000NH-53 for qemu-devel@nongnu.org; Sun, 24 Aug 2014 18:18:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLg6z-0000NB-Tx for qemu-devel@nongnu.org; Sun, 24 Aug 2014 18:18:10 -0400 Date: Mon, 25 Aug 2014 00:18:37 +0200 From: "Michael S. Tsirkin" Message-ID: <1408918641-14167-8-git-send-email-mst@redhat.com> References: <1408918641-14167-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1408918641-14167-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 07/11] pcie: Fix incorrect write to the ari capability next function field List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Knut Omang , Anthony Liguori From: Knut Omang PCI_ARI_CAP_NFN, a macro for reading next function was used instead of the intended write. Signed-off-by: Knut Omang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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); } -- MST