Message ID | 1434020549-26362-3-git-send-email-nikunj@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
On Thu, Jun 11, 2015 at 04:32:25PM +0530, Nikunj A Dadhania wrote: > 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> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 3ebbcd5..33254b3 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)));