Received: from eggs.gnu.org ([2001:4830:134:3::10]:33352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK1pP-0008SG-9V for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:05:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK1pF-0000qD-Pa for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:05:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK1pF-0000q5-IB for qemu-devel@nongnu.org; Wed, 20 Aug 2014 05:05:01 -0400 Message-ID: <1408525468.13594.54.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Wed, 20 Aug 2014 12:04:28 +0300 In-Reply-To: <1408517574.25437.101.camel@ori.omang.mine.nu> References: <1408517574.25437.101.camel@ori.omang.mine.nu> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] pcie: Fix next function setting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Knut Omang Cc: Juan Quintela , Alexey Kardashevskiy , "Michael S.Tsirkin" , Markus Armbruster , qemu-devel@nongnu.org, Gonglei , Igor Mammedov , Paolo Bonzini 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 > --- > 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); > }