summaryrefslogtreecommitdiff
path: root/hw/usb.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-12-10 11:37:45 +0100
committerGerd Hoffmann <kraxel@redhat.com>2011-01-11 17:24:42 +0100
commitc7a2196a4fcdaba977b99aca0b6a6de5e5e7f64a (patch)
tree5067804286a0d78287d28f1443e05058387d3538 /hw/usb.h
parentfa7935c1e1f84b600fcb1983485352b8d99e01d3 (diff)
downloadqemu-c7a2196a4fcdaba977b99aca0b6a6de5e5e7f64a.tar.gz
qemu-c7a2196a4fcdaba977b99aca0b6a6de5e5e7f64a.tar.bz2
qemu-c7a2196a4fcdaba977b99aca0b6a6de5e5e7f64a.zip
usb: keep track of physical port address.
Add a path string to USBPort. Add usb_port_location() function to set the physical location of the usb port. Update all drivers implementing usb ports to call it. Update the monitor commands to print it. Wind it up in qdev. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb.h')
-rw-r--r--hw/usb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb.h b/hw/usb.h
index 99139e22e0..8fdda2971e 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -240,6 +240,7 @@ typedef struct USBPortOps {
struct USBPort {
USBDevice *dev;
int speedmask;
+ char path[16];
USBPortOps *ops;
void *opaque;
USBDevice *pdev;
@@ -354,6 +355,7 @@ USBDevice *usb_create_simple(USBBus *bus, const char *name);
USBDevice *usbdevice_create(const char *cmdline);
void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index,
USBDevice *pdev, USBPortOps *ops, int speedmask);
+void usb_port_location(USBPort *downstream, USBPort *upstream, int portnr);
void usb_unregister_port(USBBus *bus, USBPort *port);
int usb_device_attach(USBDevice *dev);
int usb_device_detach(USBDevice *dev);