Hi Knut, Am 20.08.2014 08:53, schrieb Knut Omang: > > A unique bus name is necessary to be able to refer to each instance > from the command line and monitors. > > Signed-off-by: Knut Omang <knut.om...@oracle.com> > --- > hw/pci-bridge/ioh3420.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c > index 7cd87fc..8f6c8b0 100644 > --- a/hw/pci-bridge/ioh3420.c > +++ b/hw/pci-bridge/ioh3420.c > @@ -95,6 +95,9 @@ static int ioh3420_initfn(PCIDevice *d) > PCIEPort *p = PCIE_PORT(d); > PCIESlot *s = PCIE_SLOT(d); > int rc; > + char tmp[100]; > + sprintf(tmp, "pcie_port.%d", s->slot); > + pci_bridge_map_irq(br, g_strdup(tmp), pci_swizzle_map_irq_fn);
Style issues apart (white line being dropped), this is a rather convoluted way of providing a bus name to something. ;) That makes me think something else is going wrong, or APIs may need to be improved. Could you elaborate for those not intimately familiar with this bridge what name you're seeing before, given a particular command line, and explain why IRQ mapping affects the bus name? Thanks, Andreas > > rc = pci_bridge_initfn(d, TYPE_PCIE_BUS); > if (rc < 0) { > @@ -154,6 +157,7 @@ static void ioh3420_exitfn(PCIDevice *d) > pcie_cap_exit(d); > msi_uninit(d); > pci_bridge_exitfn(d); > + g_free((char*)br->bus_name); > } > > PCIESlot *ioh3420_init(PCIBus *bus, int devfn, bool multifunction, -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg