Re: [Qemu-devel] [PATCH 10/11] usb-uhci: Add support for being a companion controller

2011-06-30 Thread Hans de Goede
Hi, On 06/29/2011 02:29 PM, Gerd Hoffmann wrote: Hi, I agree, but there is a reason why I went with a usb_bus_register_companion function instead of with a usb_bus_register_companion_port function, the uhci controller needs to know how many companion controllers it has (to report this in one o

Re: [Qemu-devel] [PATCH 10/11] usb-uhci: Add support for being a companion controller

2011-06-29 Thread Gerd Hoffmann
Hi, I agree, but there is a reason why I went with a usb_bus_register_companion function instead of with a usb_bus_register_companion_port function, the uhci controller needs to know how many companion controllers it has (to report this in one of its registers). When we're registering ports 1

Re: [Qemu-devel] [PATCH 10/11] usb-uhci: Add support for being a companion controller

2011-06-29 Thread Hans de Goede
Hi, On 06/29/2011 12:57 PM, Gerd Hoffmann wrote: Hi, + if (s->masterbus) { + USBPort *ports[NB_PORTS]; + for(i = 0; i< NB_PORTS; i++) { + s->ports[i].port.ops =&uhci_port_ops; + s->ports[i].port.opaque = s; + s->ports[i].port.index = i; + s->ports[i].port.speedmask = + USB_SPEED_MASK_LOW | USB

Re: [Qemu-devel] [PATCH 10/11] usb-uhci: Add support for being a companion controller

2011-06-29 Thread Gerd Hoffmann
Hi, +if (s->masterbus) { +USBPort *ports[NB_PORTS]; +for(i = 0; i< NB_PORTS; i++) { +s->ports[i].port.ops =&uhci_port_ops; +s->ports[i].port.opaque = s; +s->ports[i].port.index = i; +s->ports[i].port.speedmask = +

[Qemu-devel] [PATCH 10/11] usb-uhci: Add support for being a companion controller

2011-06-24 Thread Hans de Goede
To use as a companion controller set the masterbus property. Signed-off-by: Hans de Goede --- hw/usb-uhci.c | 48 ++-- 1 files changed, 42 insertions(+), 6 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index b081b45..a7ab4a1 100644 --- a/h