summaryrefslogtreecommitdiffstats
path: root/hw/usb-hub.c
diff options
context:
space:
mode:
authorGleb Natapov2010-12-08 12:35:02 +0100
committerBlue Swirl2010-12-11 22:32:44 +0100
commitab28ccc0c67f52d8966b8172108cb8a6f76e6d2a (patch)
tree603989d1aa783e41ba0bb2bdaf4090ba01583118 /hw/usb-hub.c
parentAdd get_fw_dev_path callback for pci bus. (diff)
downloadqemu-ab28ccc0c67f52d8966b8172108cb8a6f76e6d2a.tar.gz
qemu-ab28ccc0c67f52d8966b8172108cb8a6f76e6d2a.tar.xz
qemu-ab28ccc0c67f52d8966b8172108cb8a6f76e6d2a.zip
Record which USBDevice USBPort belongs too.
Ports on root hub will have NULL here. This is needed to reconstruct path from device to its root hub to build device path. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/usb-hub.c')
-rw-r--r--hw/usb-hub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb-hub.c b/hw/usb-hub.c
index 8e3a96b816..8a3f829c96 100644
--- a/hw/usb-hub.c
+++ b/hw/usb-hub.c
@@ -535,7 +535,7 @@ static int usb_hub_initfn(USBDevice *dev)
for (i = 0; i < s->nb_ports; i++) {
port = &s->ports[i];
usb_register_port(usb_bus_from_device(dev),
- &port->port, s, i, usb_hub_attach);
+ &port->port, s, i, &s->dev, usb_hub_attach);
port->wPortStatus = PORT_STAT_POWER;
port->wPortChange = 0;
}