]> git.proxmox.com Git - qemu.git/blobdiff - hw/usb.h
usb: Make port wakeup and complete ops take a USBPort instead of a Device
[qemu.git] / hw / usb.h
index a5f2efa613d194784aad75990ab777c4093124ad..65f45a0ce43df8d7798e7d3aece954c09ed7a520 100644 (file)
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -252,8 +252,13 @@ struct USBDeviceInfo {
 typedef struct USBPortOps {
     void (*attach)(USBPort *port);
     void (*detach)(USBPort *port);
-    void (*wakeup)(USBDevice *dev);
-    void (*complete)(USBDevice *dev, USBPacket *p);
+    void (*wakeup)(USBPort *port);
+    /*
+     * Note that port->dev will be different then the device from which
+     * the packet originated when a hub is involved, if you want the orginating
+     * device use p->owner
+     */
+    void (*complete)(USBPort *port, USBPacket *p);
 } USBPortOps;
 
 /* USB port on which a device can be connected */