From: Nikunj A Dadhania Date: Thu, 2 Jul 2015 06:23:09 +0000 (+1000) Subject: spapr_pci: encode class code including Prog IF register X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4a7c34741584e91aa838a9e45b8ec5cdc65a343b;p=qmiga%2Fqemu.git spapr_pci: encode class code including Prog IF register 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 Reviewed-by: Thomas Huth Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 870fe81156..7660a203b7 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -900,8 +900,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)));