aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2015-07-02 16:23:09 +1000
committerAlexander Graf <agraf@suse.de>2015-07-07 17:44:50 +0200
commit4a7c34741584e91aa838a9e45b8ec5cdc65a343b (patch)
treecf34720a37d48321fffdce3863e0f64647773613
parent72187935b475454792512d44782a33f112b120e6 (diff)
downloadqemu-4a7c34741584e91aa838a9e45b8ec5cdc65a343b.zip
qemu-4a7c34741584e91aa838a9e45b8ec5cdc65a343b.tar.gz
qemu-4a7c34741584e91aa838a9e45b8ec5cdc65a343b.tar.bz2
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 <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r--hw/ppc/spapr_pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 870fe81..7660a20 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)));