From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpYho-00047H-LH for qemu-devel@nongnu.org; Tue, 05 May 2015 04:59:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpYhl-0001Bh-AA for qemu-devel@nongnu.org; Tue, 05 May 2015 04:59:56 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:47045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpYTs-00053s-7F for qemu-devel@nongnu.org; Tue, 05 May 2015 04:45:32 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 May 2015 18:45:30 +1000 From: Nikunj A Dadhania Date: Tue, 5 May 2015 14:13:14 +0530 Message-Id: <1430815398-24549-7-git-send-email-nikunj@linux.vnet.ibm.com> In-Reply-To: <1430815398-24549-1-git-send-email-nikunj@linux.vnet.ibm.com> References: <1430815398-24549-1-git-send-email-nikunj@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v3 3/6] spapr_pci: encode class code including Prog IF register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, david@gibson.dropbear.id.au Cc: aik@ozlabs.ru, qemu-ppc@nongnu.org, agraf@suse.de, nikunj@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com Current code missed the Prog IF register. All Class Code, Subclass, and Prog IF registers are needed to identify the accurate device type. For example: USB controllers use the PROG IF for denoting: USB FullSpeed, HighSpeed or SuperSpeed. Signed-off-by: Nikunj A Dadhania --- hw/ppc/spapr_pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index ea1a092..8b02a3e 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -899,8 +899,7 @@ static int spapr_populate_pci_child_dt(PCIDevice *dev, void *fdt, int offset, _FDT(fdt_setprop_cell(fdt, offset, "revision-id", pci_default_read_config(dev, PCI_REVISION_ID, 1))); _FDT(fdt_setprop_cell(fdt, offset, "class-code", - pci_default_read_config(dev, PCI_CLASS_DEVICE, 2) - << 8)); + pci_default_read_config(dev, PCI_CLASS_PROG, 3))); if (pci_default_read_config(dev, PCI_INTERRUPT_PIN, 1)) { _FDT(fdt_setprop_cell(fdt, offset, "interrupts", pci_default_read_config(dev, PCI_INTERRUPT_PIN, 1))); -- 1.8.3.1