aboutsummaryrefslogtreecommitdiffstats
path: root/trace-events
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-09-01 13:56:37 +0200
committerGerd Hoffmann <kraxel@redhat.com>2011-09-07 09:58:26 +0200
commit891fb2cd4592b6fe76106a69e0ca40efbf82726a (patch)
tree9f7c75abb2c3de0e1f856cdd4179518f1603b04b /trace-events
parent7755260f015dcbb8fa47bcc6f1e2ca317b2205aa (diff)
usb: claim port at device initialization time.
This patch makes qemu assign a port when creating the device, not when attaching it. For most usb devices this isn't a noticable difference because they are in attached state all the time. The change affects usb-host devices which live in detached state while the real device is unplugged from the host. They have a fixed port assigned all the time now instead of getting grabbing one on attach and releasing it at detach, i.e. they stop floating around at the usb bus. The change also allows to simplify usb-hub. It doesn't need the handle_attach() callback any more to configure the downstream ports. This can be done at device initialitation time now. The changed initialization order (first grab upstream port, then register downstream ports) also fixes some icky corner cases. For example it is not possible any more to plug the hub into one of its own downstream ports. The usb host adapters must care too. USBPort->dev being non-NULL doesn't imply any more the device is in attached state. The host adapters must additionally check the USBPort->dev->attached flag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'trace-events')
-rw-r--r--trace-events6
1 files changed, 6 insertions, 0 deletions
diff --git a/trace-events b/trace-events
index 593619228..3fdd60faa 100644
--- a/trace-events
+++ b/trace-events
@@ -209,6 +209,12 @@ sun4m_iommu_page_get_flags(uint64_t pa, uint64_t iopte, uint32_t ret) "get flags
sun4m_iommu_translate_pa(uint64_t addr, uint64_t pa, uint32_t iopte) "xlate dva %"PRIx64" => pa %"PRIx64" iopte = %x"
sun4m_iommu_bad_addr(uint64_t addr) "bad addr %"PRIx64""
+# hw/usb-bus.c
+usb_port_claim(int bus, const char *port) "bus %d, port %s"
+usb_port_attach(int bus, const char *port) "bus %d, port %s"
+usb_port_detach(int bus, const char *port) "bus %d, port %s"
+usb_port_release(int bus, const char *port) "bus %d, port %s"
+
# hw/usb-ehci.c
usb_ehci_reset(void) "=== RESET ==="
usb_ehci_mmio_readl(uint32_t addr, const char *str, uint32_t val) "rd mmio %04x [%s] = %x"